How to create and configure your first map in unity?

After importing the SDK, to add a map to the scene...

  1. Create a new GameObject.

  2. Add a MapRenderer component to the GameObject: Add component -> Scripts -> Microsoft.Maps.Unity -> MapRenderer

  3. In the MapRenderer component, provide the Bing Maps developer key.

For the sample scenes, a Bing Maps developer key will also need to be provided in the MapRenderer.

Once the a valid key is provided, the map will render at runtime and in the editor as well.

Once a valid key has been provided, the map will render in the editor as well, unless the Show Map Data in Editor option has been disabled.

How to change Location and Zoom Level?

The view of the map can be configured in the Location foldout.

The Center is the geolocation where the map is currently focused, represented as a latitude and longitude in degrees.

The ZoomLevel is the area of the map that is visible. Lower zoom levels correspond to zooming out, higher zoom levels correspond to zooming in.

The map uses a web Mercator projection.

Last updated