-
Notifications
You must be signed in to change notification settings - Fork 129
Animating with MapScenes
The MapRenderer's SetMapScene API automatically handles animation of the map view. The MapScene instance will specify a target zoom level and location which the MapRenderer will animate to.
The SetMapScene API returns a yieldable object that can be used within a co-routine to wait until the animation has completed.
private IEnumerator AnimateThroughScenes()
{
foreach (var scene in MapScenes)
{
yield return _map.SetMapScene(scene);
}
}
A similar approach is used in the CityTour scene of the sample project.
Note, it is not required to call the animation from a co-routine. If the yield-ing to wait for the animation to complete is not useful, the object returned from SetMapScene can be ignored.
If during an animation the center or zoom level properties change for other reasons, e.g. the map is being manipulated via other input sources, then the animation will automatically cancel.
Name | Description |
---|---|
MapSceneOfLocationAndZoomLevel | Map is focused to the specified location and zoom level |
MapSceneOfLabelAndZoomLevel | Map is focused to the specified label's location and the specified zoom level |
More to be added... |
- Configuring the map
- Attaching GameObjects
- Adding labels
- Animating the map
- Raycasting the map
- Displaying copyrights
- Customizing map data
- Displaying contour lines
- Microsoft.Geospatial
- Microsoft.Geospatial.VectorMath
-
Microsoft.Maps.Unity
- ClippingVolumeDistanceTextureResolution
- ClusterMapPin
- CoordinateClamping
- DefaultElevationTileLayer
- DefaultTextureTileLayer
- DefaultTrafficTextureTileLayer
- ElevationTile
- ElevationTileLayer
- ElevationTileLayerList
- FontStyle
- FontWeight
- HttpTextureTileLayer
- IMapSceneAnimationController
- Intersection
- IntersectionType
- IPinnable
- LanguageChangedEvent
- LatLonAltUnityEvent
- LatLonUnityEvent
- LatLonWrapper
- MapColliderType
- MapConstants
- MapContourLineLayer
- MapCopyrightAlignment
- MapCopyrightLayer
- MapDataCache
- MapDataCacheBase
- MapDeveloperKeySource
- MapImageryStyle
- MapImageryType
- MapInteractionController
- MapInteractionHandler
- MapLabel
- MapLabelLayer
- MapLayer
- MapMouseInteractionHandler
- MapPin
- MapPinLayer
- MapRenderer
- MapRendererBase
- MapRendererRaycastHit
- MapRendererTransformExtensions
- MapScaleRatioExtensions
- MapScene
- MapSceneAnimationController
- MapSceneAnimationKind
- MapSceneOfBoundingBox
- MapSceneOfLabelAndZoomLevel
- MapSceneOfLocationAndZoomLevel
- MapSession
- MapShape
- MapTerrainType
- MapTouchInteractionHandler
- ObservableList
- ObservableMapPinList
- ServiceOptions
- Style
- SystemLangaugeConverter
- TextureTile
- TextureTileLayer
- TextureTileLayerList
- TileLayer
- TileLayerList
- UnityTaskFactory
- UnityWebRequestAwaiter
- UnityWebRequestAwaiterExtensionMethods
- WaitForMapLoaded
- WaitForMapSceneAnimation
- Microsoft.Maps.Unity.Search