- Home /
Errors with the Google Maps SDK Demo
Hello,
for a university project, I need to get familiar with the Google Maps SDK. Therefore I downloaded the Demo Package.
I did every step according to the quick start guide (https://developers.google.com/maps/documentation/gaming/quick_start)
Step 1: Create a new project
Step 2: Import the SDK
Step 3: Create an empty GameObject
Step 4: Add the MapsService script component
Step 5: Add the Basic Example script component
Step 6: Run the scene
However, if I run the scene several exceptions occur:
ArgumentNullException: Value cannot be null. Parameter name: stringToEscape System.Uri.EscapeUriString (System.String stringToEscape) (at :0) Google.Maps.TileLoading.ProtoTileProducer..ctor (System.String vectorTileApiHostName, System.Boolean useHttp, System.String apiKey, System.Int32 networkPoolSize, System.Int32 networkTimeoutSeconds, Google.Maps.TileLoading.ICountryProvider countryProvider, Google.Maps.Event.MapEvents mapEvents, Google.Maps.Logging.ITileRequestLogger requestLogger, Google.Maps.Util.IRequestFactory requestFactory, Google.Maps.Util.IClock clock) (at :0) Google.Maps.MapsService.MapInit () (at :0) Google.Maps.MapsService.Startup () (at :0) Google.Maps.Unity.HotLoadableMonoBehaviour.TryStartup () (at :0) Google.Maps.Unity.HotLoadableMonoBehaviour.OnEnable () (at :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
ArgumentNullException: Value cannot be null. Parameter name: stringToEscape System.Uri.EscapeUriString (System.String stringToEscape) (at :0) Google.Maps.TileLoading.ProtoTileProducer..ctor (System.String vectorTileApiHostName, System.Boolean useHttp, System.String apiKey, System.Int32 networkPoolSize, System.Int32 networkTimeoutSeconds, Google.Maps.TileLoading.ICountryProvider countryProvider, Google.Maps.Event.MapEvents mapEvents, Google.Maps.Logging.ITileRequestLogger requestLogger, Google.Maps.Util.IRequestFactory requestFactory, Google.Maps.Util.IClock clock) (at :0) Google.Maps.MapsService.MapInit () (at :0) Google.Maps.MapsService.Startup () (at :0) Google.Maps.Unity.HotLoadableMonoBehaviour.TryStartup () (at :0) Google.Maps.MapsService.OnValidate () (at :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
NullReferenceException: Object reference not set to an instance of an object Google.Maps.MapsService.Shutdown () (at :0) Google.Maps.Unity.HotLoadableMonoBehaviour.ShutdownInternal () (at :0) Google.Maps.Util.SimulableBeforeAssemblyReloadHook.ExecuteCallbacks () (at :0) UnityEditor.AssemblyReloadEvents.OnBeforeAssemblyReload () (at :0)
I first thought the issue is with the API-Key and the Vector Tile API Address, but according to the FAQ, an API-Key is not required for the Demo-Version.(https://developers.google.com/maps/documentation/gaming/support/faq#whichapi) Furthermore, the quickstart tutorial also does not mention an API-Key.
Therefore I left the Map Service component in its initial configuration and neither added an API-Key nor the Vector Tile API Address.
Is someone familiar with the Google Maps SDK and has encountered the same problem?
Thanks in advance!
Your answer
![](https://koobas.hobune.stream/wayback/20220612233358im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I make an interactive map on Unity? 0 Answers
,Identifying direction of GameObject in Range 0 Answers
Easy way to build a 3d map based on real world? 2 Answers
google maps 3d API lacks detail 0 Answers
Assigning UV Map to model at runtime 0 Answers