-
Notifications
You must be signed in to change notification settings - Fork 129
Microsoft.Maps.Unity
Texture resolution used to render clipping volume walls. Higher resolution will have the best quality in terms of how closely the wall edge matches the terrain.
public enum Microsoft.Maps.Unity.ClippingVolumeDistanceTextureResolution
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Low | Low resolution texture. |
1 |
Medium | Medium resolution texture. |
2 |
High | High resolution texture. |
Represents a cluster of Microsoft.Maps.Unity.MapPin
s at the specified level of detail.
public class Microsoft.Maps.Unity.ClusterMapPin
: MapPin, IPinnable
Properties
Type | Name | Summary |
---|---|---|
Int16 |
LevelOfDetail | The level of detail represented by this cluster. |
Int32 |
Size | The number of pins in this cluster. |
Helper methods to clamp geographic coordinates to valid ranges.
public static class Microsoft.Maps.Unity.CoordinateClamping
Static Methods
Type | Name | Summary |
---|---|---|
LatLon |
ClampLatLonToValidMercatorRange(LatLon input) |
Clamps a latitude and longitude value to a valid latitude range for Mercator projection and wraps the longitude value to the common range of -180 => +180. |
Double |
WrapMercatorX(Double mercatorX) |
Wraps a longitudinal value to the -0.5 to 0.5 range. |
The Microsoft.Maps.Unity.DefaultElevationTileLayer
is used to display Bing Maps 3D elevation data, which has world-wide coverage.
public class Microsoft.Maps.Unity.DefaultElevationTileLayer
: ElevationTileLayer
Methods
Type | Name | Summary |
---|---|---|
Task<ElevationTile> |
GetElevationTileData(TileId tileId, CancellationToken cancellationToken = null) |
|
Task<Boolean> |
HasElevationTile(TileId tileId, CancellationToken cancellationToken = null) |
A Microsoft.Maps.Unity.TextureTileLayer
that displays Bing Maps imagery.
public class Microsoft.Maps.Unity.DefaultTextureTileLayer
: TextureTileLayer
Properties
Type | Name | Summary |
---|---|---|
Boolean |
AreLabelsEnabled | True if labels are included in the texture. |
Boolean |
AreRoadsEnabled | True if roads, borders, and other lines are included in the texture. |
MapImageryStyle |
ImageryStyle | The style to use for the imagery. |
MapImageryType |
ImageryType | The base imagery to use for the Microsoft.Maps.Unity.TextureTileLayer , aerial or symbolic. |
Boolean |
IsHillShadingEnabled | True if hill shading is enabled. Does not apply to Microsoft.Maps.Unity.MapImageryType.Aerial . |
SystemLanguage |
Language | The language used for labels, if present. This value is synchronized with the Microsoft.Maps.Unity.MapSession.Language . |
Methods
Type | Name | Summary |
---|---|---|
Task<Nullable<TextureTile>> |
GetTexture(TileId tileId, CancellationToken cancellationToken = null) |
This method can only be used by Microsoft.Maps.Unity.MapRendererBase.TextureTileLayers and will fail if called. |
String |
ToString() |
A Microsoft.Maps.Unity.TextureTileLayer
that displays Bing Maps traffic tiles.
public class Microsoft.Maps.Unity.DefaultTrafficTextureTileLayer
: TextureTileLayer
Methods
Type | Name | Summary |
---|---|---|
Task<Nullable<TextureTile>> |
GetTexture(TileId tileId, CancellationToken cancellationToken = null) |
This method can only be used by Microsoft.Maps.Unity.MapRendererBase.TextureTileLayers and will fail if called. |
String |
ToString() |
An Microsoft.Maps.Unity.ElevationTile
contains the elevation data used for rendering, ray casting, and pin placement. The data is provided in some form of a height map where each pixel or entry represents an elevation value in meters relative to the WGS84 ellipsoid. The extents of the tile are defined in Mercator space by the Microsoft.Maps.Unity.ElevationTile.TileId
.
public class Microsoft.Maps.Unity.ElevationTile
Properties
Type | Name | Summary |
---|---|---|
Int32 |
Height | The width of the tile, i.e. number of elevation samples along lines of longitude. |
TileLevelOfDetail |
LevelOfDetail | The level of detail corresponding to the Microsoft.Maps.Unity.ElevationTile.TileId . |
TileId |
TileId | The Microsoft.Maps.Unity.ElevationTile.TileId which defines the extents of this tile. |
Int32 |
Width | The width of the tile, i.e. number of elevation samples along lines of latitude. |
Static Methods
Type | Name | Summary |
---|---|---|
ElevationTile |
FromDataInMeters(TileId tileId, Int32 width, Int32 height, Single[] dataInMeters) |
Creates an Microsoft.Maps.Unity.ElevationTile from elevation data in meters. Data should be row-major with origin in the northwest corner. |
ElevationTile |
FromDataInMeters(TileId tileId, Int32 width, Int32 height, Byte[] dataInMetersAsBytes, Int32 dataOffset = 0) |
Creates an Microsoft.Maps.Unity.ElevationTile from elevation data in meters. Data should be row-major with origin in the northwest corner. |
ElevationTile |
FromNormalizedData(TileId tileId, Int32 width, Int32 height, Single minElevationInMeters, Single elevationRangeInMeters, UInt16[] normalizedData) |
Creates an Microsoft.Maps.Unity.ElevationTile from elevation data normalized into fxied point 16-bit values encoded as ushorts. The original elevation in meters can be reconstructed from the minElevationInMeters, the elevationRangeInMeters, and the normalized data. Data should be row-major with origin in the northwest corner. |
ElevationTile |
FromNormalizedData(TileId tileId, Int32 width, Int32 height, Single minElevationInMeters, Single elevationRangeInMeters, Byte[] normalizedDataAsBytes, Int32 dataOffset = 0) |
Creates an Microsoft.Maps.Unity.ElevationTile from elevation data normalized into fxied point 16-bit values encoded as ushorts. The original elevation in meters can be reconstructed from the minElevationInMeters, the elevationRangeInMeters, and the normalized data. Data should be row-major with origin in the northwest corner. |
Task<ElevationTile> |
FromNull() | Used for an Microsoft.Maps.Unity.ElevationTile that is not present. This is equivalent to returning a task result from null. It is more efficient to use this however as the return value is cached in order to reduce GC allocations. |
The ElevationTileLayer provides elevation data spatially organized in Mercator tiles (EPSG:3857). The elevation data is used by the Microsoft.Maps.Unity.MapRendererBase
to display 3D terrain.
public abstract class Microsoft.Maps.Unity.ElevationTileLayer
: TileLayer
Methods
Type | Name | Summary |
---|---|---|
Task<ElevationTile> |
GetElevationTileData(TileId tileId, CancellationToken cancellationToken = null) |
Gets the data for the specified Microsoft.Geospatial.TileId . Data is organized as a NxN array of floats. Each float represents an elevation value, or altitude, in meters relative to the WGS84 ellipsoid. The array is organized as row-major, with origin at the north-west corner of the tile. |
Task<Boolean> |
HasElevationTile(TileId tileId, CancellationToken cancellationToken = null) |
Returns a bool for the specified Microsoft.Geospatial.TileId for the avaliability of the data. |
A serlizable list of Microsoft.Maps.Unity.ElevationTileLayer
s.
public class Microsoft.Maps.Unity.ElevationTileLayerList
: TileLayerList<ElevationTileLayer>, IReadOnlyList<ElevationTileLayer>, IReadOnlyCollection<ElevationTileLayer>, IEnumerable<ElevationTileLayer>, IEnumerable
The style of the font.
public enum Microsoft.Maps.Unity.FontStyle
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Normal | Default font style. |
1 |
Italic | Slanted font style. |
The weight of the font.
public enum Microsoft.Maps.Unity.FontWeight
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Normal | Default weight. |
1 |
Bold | Thick stroked font weight. |
Provides tiles for a Microsoft.Maps.Unity.TextureTileLayer
. The tiles are fetched by using the HTTP or HTTPS protocol. Results are assumed to be JPEG or PNG, i.e. anything decodable by UnityEngine.ImageConversion.LoadImage(UnityEngine.Texture2D,System.Byte[])
.
public class Microsoft.Maps.Unity.HttpTextureTileLayer
: TextureTileLayer
Properties
Type | Name | Summary |
---|---|---|
IList<String> |
Subdomains | A list of subdomains that can be formatted into the URL. |
String |
UrlFormatString | The UriFormat property accepts the following case-insensitive replacement strings: {x}, {y}, {zoomlevel}/{zoom}/{z}, {quadkey}, and {subdomain}. |
Methods
Type | Name | Summary |
---|---|---|
Task<Nullable<TextureTile>> |
GetTexture(TileId tileId, CancellationToken cancellationToken = null) |
Retrieves the texture data that will be rendered for the specified Microsoft.Geospatial.TileId . |
Animates a MapRenderer to the specified Microsoft.Maps.Unity.MapScene
.
public interface Microsoft.Maps.Unity.IMapSceneAnimationController
Properties
Type | Name | Summary |
---|---|---|
WaitForMapSceneAnimation |
YieldInstruction | Returns a yieldable object that can be used to wait for animation to complete. |
Methods
Type | Name | Summary |
---|---|---|
void |
Initialize(MapRendererBase mapRenderer, MapScene mapScene, Single animationTimeScale, MapSceneAnimationKind mapSceneAnimationKind) |
Initializes the controller to animate the specified Microsoft.Maps.Unity.MapScene . |
Boolean |
UpdateAnimation(Single currentZoomLevel, LatLon currentLocation, Single& zoomLevel, LatLon& location) |
Updates the zoom level and location for this frame of the animation. |
Helpers to do intersection tests.
public static class Microsoft.Maps.Unity.Intersection
Static Methods
Type | Name | Summary |
---|---|---|
Boolean |
IntersectLinePlane(Vector3& linePoint, Vector3& lineDirection, Vector3& planeNormal, Vector3& planePoint, Vector3& intersection, Single& length) |
Intersects a line and a plane. |
Boolean |
IntersectRayCylinder(Single cylinderHeight, Single cylinderRadius, Ray ray, Single& distance, Boolean& isCapHit) |
Intersects a ray and a cylinder that sits on origin. |
Boolean |
IntersectRayTriangle(Ray& ray, Vector3& v0, Vector3& v1, Vector3& v2, Single& distanceAlongRayToIntersection) |
Intersects a ray and a triangle. |
IntersectionType |
IntersectSquareCircle(Vector2 squareCenter, Single squareSideLength, Vector2 circleCenter, Single circleRadius, Single circleRadiusSquared) |
Test for intersection between a square AABB and a circle. |
This enum can be used to determine if primitives partially overlap.
public enum Microsoft.Maps.Unity.IntersectionType
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
None | Does not intersect at all. |
1 |
Overlaps | There is a partial overlap of the primitives. |
2 |
Inside | One primitive is contained completely within or inside the other. |
A type that can be positioned on a map by it's geographic coordinate.
public interface Microsoft.Maps.Unity.IPinnable
Properties
Type | Name | Summary |
---|---|---|
Double |
Altitude | The altitude of the Microsoft.Maps.Unity.IPinnable above a reference datum in meters. |
AltitudeReference |
AltitudeReference | The reference datum that the Microsoft.Maps.Unity.IPinnable.Altitude is relative to. |
Boolean |
HasBeenFullyPositioned | True once the Microsoft.Maps.Unity.IPinnable has been positioned relative to a given map and sampled elevation. |
MercatorCoordinate |
MercatorCoordinate | The position of the Microsoft.Maps.Unity.IPinnable in Mercator coordinates. |
Vector3 |
PositionInMapLocalSpace | The position of this Microsoft.Maps.Unity.IPinnable in the local space of the associated map. |
This event is raised when a UnityEngine.SystemLanguage
value changes.
public class Microsoft.Maps.Unity.LanguageChangedEvent
: UnityEvent<SystemLanguage>, ISerializationCallbackReceiver
An event that provides a Microsoft.Geospatial.LatLonAlt
.
public class Microsoft.Maps.Unity.LatLonAltUnityEvent
: UnityEvent<LatLonAlt>, ISerializationCallbackReceiver
An event that provides a Microsoft.Geospatial.LatLon
.
public class Microsoft.Maps.Unity.LatLonUnityEvent
: UnityEvent<LatLon>, ISerializationCallbackReceiver
Serializable wrapper class for a Microsoft.Geospatial.LatLon
.
public struct Microsoft.Maps.Unity.LatLonWrapper
: IEquatable<LatLonWrapper>
Properties
Type | Name | Summary |
---|---|---|
Double |
Latitude | The latitude in degrees. |
Double |
Longitude | The longitude in degrees. |
Methods
Type | Name | Summary |
---|---|---|
Boolean |
Equals(Object obj) |
|
Boolean |
Equals(LatLonWrapper other) |
|
Int32 |
GetHashCode() | |
LatLon |
ToLatLon() | Converts to a LatLon. Wraps longitude so that values always are between -180 and +180. |
String |
ToString() |
The type of collider that the map is using.
public enum Microsoft.Maps.Unity.MapColliderType
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
None | No collider. |
1 |
BaseOnly | Collider covering the base of the map. |
2 |
FullExtents | Collider covering the full extents of the map. |
Map constant values.
public static class Microsoft.Maps.Unity.MapConstants
Static Fields
Type | Name | Summary |
---|---|---|
Int32 |
MaximumZoomLevel | Highest zoom level for the map. |
Int32 |
MinimumZoomLevel | Lowest zoom level for the map. |
Enables contour rendering on the map to show lines of constant elevation relative to the WGS84 ellipsoid. The interval, line width, and line color of the contour is configurable.
public class Microsoft.Maps.Unity.MapContourLineLayer
: MapLayer
Properties
Type | Name | Summary |
---|---|---|
Color |
MajorColor | The color used for the major contour lines. |
Single |
MajorIntervalAltitudeInMeters | The altitude interval between major contour lines. This will automatically adjust to the current zoom level of the MapRenderer. This value specifies the interval used at zoom level 20. |
Single |
MajorLinePixelSize | The pixel size of the major contour lines. |
Color |
MinorColor | The color used for the minor contour lines. |
Single |
MinorLinePixelSize | The pixel size of the minor contour lines. |
Int32 |
NumMinorIntervalSections | The number of minor sections between major contour lines. |
Alignment options for Microsoft.Maps.Unity.MapCopyrightLayer
.
public enum Microsoft.Maps.Unity.MapCopyrightAlignment
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Bottom | Default alignment. Copyright text is rendered at the bottom of the map. |
1 |
Top | Copyright text is rendered at the top of the map. |
Handles rendering and positioning of copyright text associated with the Microsoft.Maps.Unity.MapRendererBase
. This layer is automatically added when the Microsoft.Maps.Unity.MapRendererBase
component is added to a UnityEngine.GameObject
.
public class Microsoft.Maps.Unity.MapCopyrightLayer
: MapLayer
This component provides an interface to configure the cache size that is used to store Microsoft.Maps.Unity.MapRenderer
data. Because the cache is global, multiple instances of this component are not needed.
public class Microsoft.Maps.Unity.MapDataCache
: MapDataCacheBase
Properties
Type | Name | Summary |
---|---|---|
Int64 |
MaxCacheSizeInBytes | The maximum possible cache size. Even if the device could support a larger cache, the cache size will not exceed this value. |
Single |
PercentUtilization | Determines how large the cache is relative to the estimated application memory limit, e.g. if the maximum app memory for the application is determined to be 1GB, then a utilization value of 0.5 (50%), will result in a cache size of 512MB. |
This component provides an interface to configure the cache size that is used to store data of Microsoft.Maps.Unity.MapRendererBase
s. Because the cache is global, multiple instances of this component are not needed.
public abstract class Microsoft.Maps.Unity.MapDataCacheBase
: MonoBehaviour
Describes where the Microsoft.Maps.Unity.MapSession
retrieves the developer key.
public enum Microsoft.Maps.Unity.MapDeveloperKeySource
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
None | The developer key can only be set programmatically via Microsoft.Maps.Unity.MapSession.DeveloperKey . While using this option, the Microsoft.Maps.Unity.MapSession will not read the key from the config resource file, and it will not read or store the key using the Scene asset. |
1 |
ResourceConfigFile | The developer key is read from a UnityEngine.TextAsset resource file named "MapSessionConfig.txt". This text file is loaded by the Microsoft.Maps.Unity.MapSession by using UnityEngine.Resources.Load(System.String) . Note, the key is not saved to the Scene when using this option. To create the resource file: In the "Assets" directory, create a directory named "Resources". In the "Resources" directory, create a file named "MapSessionConfig.txt". Copy the developer key into this file. Ignore this file from source control e.g., add to gitignore. |
2 |
Scene | Serializes and reads the developer key from the Scene asset. This option is deprecated. |
The style to apply to the imagery. This does not apply to Microsoft.Maps.Unity.MapImageryType.Aerial
.
public enum Microsoft.Maps.Unity.MapImageryStyle
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Light | The default symbolic imagery style. |
1 |
Dark | A dark version of the default Microsoft.Maps.Unity.MapImageryStyle.Light style. |
2 |
CanvasLight | A simplified version of the map which also has some of the details such as hill shading disabled. |
3 |
CanvasDark | A dark version of the Microsoft.Maps.Unity.MapImageryStyle.CanvasLight style. |
4 |
CanvasGray | A grayscale version of the Microsoft.Maps.Unity.MapImageryStyle.CanvasLight style. |
5 |
HighContrastLight | A high contrast style. |
6 |
HighContrastDark | A dark version of the Microsoft.Maps.Unity.MapImageryStyle.HighContrastLight style. |
7 |
Vibrant | The vibrant style. |
The type of imagery to use for the Microsoft.Maps.Unity.DefaultTextureTileLayer
.
public enum Microsoft.Maps.Unity.MapImageryType
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Symbolic | Symbolic imagery. |
1 |
Aerial | Aerial imagery. |
This component provides a wrapper on top of a Microsoft.Maps.Unity.MapRenderer
to help with interactions like pan, zoom, and rotate. Provides callbacks for events to track when interactions have began and ended or when specific events occur, like double tap, tap, or tap and hold. A Microsoft.Maps.Unity.MapInteractionHandler
implementation can invoke these events.
public class Microsoft.Maps.Unity.MapInteractionController
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
LatLonAltUnityEvent |
OnDoubleTap | An event fired when a double tap occurs. Provides the location where the interaction takes place. |
UnityEvent |
OnInteractionEnded | An event fired when an interaction ends that manipulated the map, e.g. panning the map. |
UnityEvent |
OnInteractionStarted | An event fired when an interaction begins that manipulates the map, e.g. panning the map. |
LatLonAltUnityEvent |
OnTapAndHold | An event fired when a tap and hold occurs. Provides the location where the interaction takes place. |
Methods
Type | Name | Summary |
---|---|---|
void |
DoubleTapZoom(LatLonAlt targetLatLonAlt, Single zoomLevelOffset) |
Performs a double tap zoom and invokes the Microsoft.Maps.Unity.MapInteractionController.OnDoubleTap event. |
void |
Pan(Vector2 direction, Boolean orientWithMap) |
Pans the map in the specified direction. |
void |
Pan(Ray ray, MercatorCoordinate& targetMercatorCoordinate, Double targetAltitudeInMeters, Boolean requireRayHitForZoom = False) |
Pans the map in the specified direction. |
void |
PanAndZoom(Ray ray, MercatorCoordinate& targetMercatorCoordinate, Double targetAltitudeInMeters, Single zoomLevelSpeed, Boolean requireRayHitForZoom = False) |
Given a ray, target coordinate, and zoom level delta, adjust the map's center and zoom level so that at the new zoom level, the target coordinate aligns with the ray. |
void |
PanEast() | Pans the map east. |
void |
PanNorth() | Pans the map north. |
void |
PanSouth() | Pans the map south. |
void |
PanWest() | Pans the map west. |
void |
RotateMap(Boolean isClockwise) |
Begins a rotation that animates the map by 45 degrees. |
void |
Zoom(Single zoomLevelSpeed) |
Adjusts the map's zoom level by the specified magnitude per second. |
void |
Zoom(Single zoomLevelSpeed, Ray ray, Boolean requireRayHitForZoom = False) |
Adjusts the map's zoom level by the specified magnitude per second. |
The base class used for managing interactions with the Microsoft.Maps.Unity.MapInteractionHandler.MapRenderer
. Implementions can handle a specific type of input, e.g. mouse-based input or touch-based input.
public abstract class Microsoft.Maps.Unity.MapInteractionHandler
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
Camera |
Camera | The Microsoft.Maps.Unity.MapInteractionHandler.Camera associated with the interactions. Defaults to UnityEngine.Camera.main . |
Single |
DpiScale | The DPI scale used to normalize interaction magnitudes. |
MapInteractionController |
MapInteractionController | The Microsoft.Maps.Unity.MapInteractionHandler.MapInteractionController used to perform the operations for translating and zooming the map. |
MapRenderer |
MapRenderer | The associated Microsoft.Maps.Unity.MapInteractionHandler.MapRenderer that interactions are applied to. |
Static Fields
Type | Name | Summary |
---|---|---|
Single |
TapAndHoldThresholdInSeconds | The duration in seconds after which a tap and hold event should be fired. |
This component is used to transfer labeling information to a GameObject.
public class Microsoft.Maps.Unity.MapLabel
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
Boolean |
IsLayerSynchronized | If true, synchronizes this UnityEngine.GameObject 's and it's childrens' layers to the same value as the associated Microsoft.Maps.Unity.MapRendererBase 's layer. |
AnimationCurve |
ScaleCurve | The scale of the Microsoft.Maps.Unity.MapLabel relative to the map's zoom level. |
Style |
Style | The recommended styling information for this label. |
String |
Text | The text of the label. |
This layer can be added to a Microsoft.Maps.Unity.MapRendererBase
to enable labeling. In order for this layer to function properly, a prefab containing a Microsoft.Maps.Unity.MapLabel
component must be set on this layer.
public class Microsoft.Maps.Unity.MapLabelLayer
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
MapLabel |
MapLabelPrefab | The GameObject used to replicate labels into the map. |
Base class for any type of layer associated with a Microsoft.Maps.Unity.MapRenderer
.
public abstract class Microsoft.Maps.Unity.MapLayer
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
String |
LayerName | The name of the Microsoft.Maps.Unity.MapLayer . |
MapRenderer |
MapRenderer | The Microsoft.Maps.Unity.MapLayer.MapRenderer that this layer has been attached to. |
Handles mouse and scroll wheel based interactions for pan, zoom, double tap zoom, and tap-and-hold.
public class Microsoft.Maps.Unity.MapMouseInteractionHandler
: MapInteractionHandler
A MapPin can be used to pin a UnityEngine.GameObject
to a Microsoft.Maps.Unity.MapRendererBase
at a specified Microsoft.Geospatial.LatLon
and altitude in meters.
public class Microsoft.Maps.Unity.MapPin
: MonoBehaviour, IPinnable
Properties
Type | Name | Summary |
---|---|---|
Double |
Altitude | |
AltitudeReference |
AltitudeReference | |
Boolean |
HasBeenFullyPositioned | |
Boolean |
IsLayerSynchronized | If true, synchronizes this UnityEngine.GameObject 's and it's childrens' layers to the same value as the associated Microsoft.Maps.Unity.MapRendererBase 's layer. |
LatLon |
Location | The location of the Microsoft.Maps.Unity.MapPin . |
Action<MapPin, LatLon> |
LocationChanged |
System.Action that is invoked when the Microsoft.Maps.Unity.MapPin.Location value has changed. The Microsoft.Geospatial.LatLon specified in the arguments is the previous location. |
MercatorCoordinate |
MercatorCoordinate | |
Vector3 |
PositionInMapLocalSpace | |
AnimationCurve |
ScaleCurve | The scale of the pin relative to the map's zoom level. |
Boolean |
ShowOutsideMapBounds | If true, when the Microsoft.Maps.Unity.MapPin is outside of the Microsoft.Maps.Unity.MapRenderer 's bounds, it will be shown. Otherwise, it will be hidden. Default is to hide when outside of map's bounds. |
Boolean |
UseRealWorldScale | If true, the Microsoft.Maps.Unity.MapPin.ScaleCurve is relative to the real-world scale at a given zoom level. As the map zooms out, size falls off exponentially. If false, the ScaleCurve represents the direct scale of the MapPin at a given zoom level. |
Static Methods
Type | Name | Summary |
---|---|---|
void |
SynchronizeLayers(IReadOnlyList<MapPin> mapPins, MapRenderer mapRenderer) |
Synchronizes the Microsoft.Maps.Unity.MapPin 's layers (and any of it's children layers) with the Microsoft.Maps.Unity.MapRenderer 's layer. Whether or not a Microsoft.Maps.Unity.MapPin 's layer is synchronized depends on the value of Microsoft.Maps.Unity.MapPin.IsLayerSynchronized . |
void |
UpdateScales(List<T> mapPins, MapRenderer mapRenderer) |
Updates the Microsoft.Maps.Unity.MapPin s' scale based on Microsoft.Maps.Unity.MapPin.ScaleCurve and Microsoft.Maps.Unity.MapPin.UseRealWorldScale . |
Maintains a collection of Microsoft.Maps.Unity.MapPin
s to efficient display large number of objects on the map. Supports clustering.
All instantiated Microsoft.Maps.Unity.MapPin
s associated with this layer will be parented to a child UnityEngine.GameObject
with the same name as this Microsoft.Maps.Unity.MapPinLayer
. Microsoft.Maps.Unity.MapPin.ShowOutsideMapBounds
is not used by the layer. Any out of view pin will be hidden.
public class Microsoft.Maps.Unity.MapPinLayer
: MapLayer
Properties
Type | Name | Summary |
---|---|---|
IReadOnlyCollection<ClusterMapPin> |
ActiveClusterMapPins | The ClusterMapPins which are active. |
IReadOnlyCollection<MapPin> |
ActiveMapPins | The MapPins which are active. |
ClusterMapPin |
ClusterMapPinPrefab | The prefab to use for clusters. |
Int32 |
ClusterThreshold | If the number of pins in a spatial region exceed the ClusterThreshold, a single Microsoft.Maps.Unity.ClusterMapPin will be rendered instead. |
Boolean |
IsClusteringEnabled | True if the MapPins in this data source should be clustered. Note, if this is set to true, it is expected that a prefab has been provided to ClusterMapPinPrefab. |
ObservableList<MapPin> |
MapPins | All MapPins associated with this MapPinLayer. |
Manages streaming and rendering of map data.
public class Microsoft.Maps.Unity.MapRenderer
: MapRendererBase, IDisposable
Properties
Type | Name | Summary |
---|---|---|
Collider |
MapCollider | The UnityEngine.Collider used for the map. The dimensions are synchronized to match the map's layout. Null value if no UnityEngine.Collider is active. |
MapColliderType |
MapColliderType | The type of collider that the map is using. |
Events
Type | Name | Summary |
---|---|---|
EventHandler |
AfterUpdate | Called after the Microsoft.Maps.Unity.MapRenderer has executed Update(). |
Methods
Type | Name | Summary |
---|---|---|
WaitForMapSceneAnimation |
SetMapScene(MapScene mapScene, MapSceneAnimationKind mapSceneAnimationKind = Bow, Single animationTimeScale = 1) |
Sets the Microsoft.Maps.Unity.MapRenderer 's view to reflect the new Microsoft.Maps.Unity.MapScene . |
WaitForMapSceneAnimation |
SetMapScene(MapScene mapScene, IMapSceneAnimationController mapSceneAnimationController, MapSceneAnimationKind mapSceneAnimationKind = Bow, Single animationTimeScale = 1) |
Sets the Microsoft.Maps.Unity.MapRenderer 's view to reflect the new Microsoft.Maps.Unity.MapScene . |
WaitForMapLoaded |
WaitForLoad(Single maxWaitDurationInSeconds = 30) |
Returns a yieldable object that can be used to wait until the map has completed loading. |
Base class to manage streaming and rendering of map data.
public abstract class Microsoft.Maps.Unity.MapRendererBase
: MonoBehaviour, IDisposable
Properties
Type | Name | Summary |
---|---|---|
GeoBoundingBox |
Bounds | The bounds of the current map view in Microsoft.Geospatial.LatLon coordinates. |
Boolean |
CastShadows | True if the map should cast shadows. |
LatLon |
Center | Center of the map. |
Int32 |
ClippingDistanceLayer | The layer dedicated to rendering the clipping volume wall. Should be set to a layer which is not used by other GameObjects. |
Material |
ClippingVolumeMaterial | This is the base UnityEngine.Material used to render the side walls of the mao. Variants of this UnityEngine.Material are generated with different sets of keywords to properly handle rendering different terrain types. External modifications made to the specified UnityEngine.Material 's properties, e.g. changing a color value, will be copied each frame to these variants. If null is set, the default terrain UnityEngine.Material will be used. |
String |
Copyright | The copyrights and attribution text, which may change based on the current map view. This string must be displayed near the associated Microsoft.Maps.Unity.MapRendererBase . |
Single |
DetailOffset | Increases or decreases the detail of the map. Lower values are less detailed. Higher values are more detailed. Default is 0. |
Double |
ElevationBaseline | The altitude in WGS84 meters in which the map's terrain surface has been negatively offset. If Microsoft.Maps.Unity.MapRendererBase.ElevationBaselineOverride is active, returns the Microsoft.Maps.Unity.MapRendererBase.ElevationBaselineOverride . |
Nullable<Double> |
ElevationBaselineOverride | When the value is set, it overrides the Microsoft.Maps.Unity.MapRendererBase.ElevationBaseline . |
Single |
ElevationScale | The scale to apply to the vertical dimension of the map. This can be used to exaggerate the terrain's elevation. Pinned object positions and other primitives that depend on true elevation values should take this scale into account. |
ElevationTileLayerList |
ElevationTileLayers | The collection of active Microsoft.Maps.Unity.ElevationTileLayer s. |
Boolean |
EnableMrtkMaterialIntegration | True if the terrain material should enable MRTK-related features like hover light. |
Boolean |
IsClippingVolumeWallEnabled | True if the clipping volume wall should be rendered. |
Boolean |
IsLoaded | True if the Microsoft.Maps.Unity.MapRendererBase has loaded all data for the current view. |
Single |
LocalMapBaseHeight | The height of the map object in its local coordinate system before any transforms are applied. |
Vector2 |
LocalMapDimension | The width and length of the map object in its local coordinate system before any transforms are applied. |
Single |
LocalMapHeight | The height of the map's bounds. Changes based on map content. |
Single |
LocalMapRadius | The radius of the map object in its local coordinate system before any transforms are applied. |
Single |
MapBaseHeight | The height of the map with global scale applied, i.e. Microsoft.Maps.Unity.MapRendererBase.LocalMapBaseHeight * transform.lossyScale.y. |
Vector2 |
MapDimension | The width and length of the map object with global scale applied. |
Color |
MapEdgeColor | The color of the map edge. |
Single |
MapEdgeColorFadeDistance | Starting at the map edge, this value is the distance normalized from the map dimension over which the edge color is faded. |
MapSession |
MapSession | The Microsoft.Maps.Unity.MapSession used for managing credentials with Bing Maps services. A Microsoft.Maps.Unity.MapSession with a valid key must be present to use Bing Maps data. |
MapShape |
MapShape | The shape of the map we are rendering on. |
MapTerrainType |
MapTerrainType | The type of terrain used for rendering the map. |
Single |
MaximumZoomLevel | The maximum zoom level to enforce on the map. 1.0 is the smallest possible zoom level value, and 20.0 is the largest. |
MercatorBoundingBox |
MercatorBoundingBox | The bounding box of the map in Mercator space. |
MercatorBoundingCircle |
MercatorBoundingCircle | The bounding circle of the map in Mercator space. Only applicable when Microsoft.Maps.Unity.MapRendererBase.MapShape is Microsoft.Maps.Unity.MapShape.Cylinder . |
Single |
MinimumZoomLevel | The minimum zoom level to enforce on the map. 1.0 is the smallest possible zoom level value, and 20.0 is the largest. |
Int16 |
NumElevationTileFallbackLods | Tiles from an Microsoft.Maps.Unity.ElevationTileLayer can be requested at a lower level of detail. Using lower levels of detail decrease the number of network requests, processing overhead, and memory usage. |
Boolean |
ReceiveShadows | True if the map should receive shadows. |
Boolean |
RequestTilesAroundView | Speculatively request tiles around the current view so that when the map view changes via animation or interaction, popping is reduced. Default value is true. If the map view is static and will not change, set this to false to improve performance. |
Material |
TerrainMaterial | This is the base UnityEngine.Material used to render the terrain. Variants of this UnityEngine.Material are generated with different sets of keywords to properly handle rendering different terrain types. External modifications made to the specified UnityEngine.Material 's properties, e.g. changing a color value, will be copied each frame to these variants. If null is set, the default terrain UnityEngine.Material will be used. |
TextureTileLayerList |
TextureTileLayers | The collection of active Microsoft.Maps.Unity.TextureTileLayer s. Only the first Microsoft.Maps.Unity.MapRendererBase.MaxTextureTileLayerCount entries will be used. |
Single |
ZoomLevel | Zoom level. Lower values are more zoomed out. Higher values are more zoomed in. |
Events
Type | Name | Summary |
---|---|---|
EventHandler |
AfterOnDisable | Called after Microsoft.Maps.Unity.MapRendererBase has executed OnDisable(). |
EventHandler<MapSession> |
MapSessionChanged | Called when the Microsoft.Maps.Unity.MapRendererBase.MapSession associated with this instance has changed. This may happen if the existing Microsoft.Maps.Unity.MapSession was destroyed or a new Microsoft.Maps.Unity.MapRendererBase.MapSession was assigned. |
Methods
Type | Name | Summary |
---|---|---|
void |
ApplyClippingVolumePropertiesToMaterial(Material material) |
For external objects that want to match the clipping bounds of the map, this method will apply all necessary values and keywords to a specified material so that it would be able to mimic the clipping behavior. |
void |
DisableMaterialKeyword(String keyword) |
Disables the specified keyword on the active terrain and clipping volume materials. |
void |
Dispose() | |
void |
EnableMaterialKeyword(String keyword) |
Enables the specified keyword on the active terrain and clipping volume materials. |
Boolean |
Raycast(Ray ray, MapRendererRaycastHit& hitInfo) |
Casts a ray against the map and returns detailed information about the hitpoint. |
Boolean |
Raycast(Ray ray, MapRendererRaycastHit& hitInfo, Single maxDistance) |
Casts a ray against the map and returns detailed information about the hitpoint. |
Boolean |
Raycast(Vector3 origin, Vector3 rayDirection, MapRendererRaycastHit& hitInfo) |
Casts a ray against the map and returns detailed information about the hitpoint. |
Boolean |
Raycast(Vector3 origin, Vector3 rayDirection, MapRendererRaycastHit& hitInfo, Single maxDistance) |
Casts a ray against the map and returns detailed information about the hitpoint. |
void |
TrackAndPositionPinnables(IReadOnlyList<IPinnable> pinnables) |
Updates the positions of the specified Microsoft.Maps.Unity.IPinnable s. This can potentially begin an asynchronous operation for a given Microsoft.Maps.Unity.IPinnable to determine the elevation offset due to the map's current terrain surface. Whether or not this is required depends on the Microsoft.Maps.Unity.IPinnable.AltitudeReference value. An asynchronous operation only take place when the Microsoft.Maps.Unity.IPinnable uses Microsoft.Geospatial.AltitudeReference.Surface or Microsoft.Geospatial.AltitudeReference.Terrain . Otherwise, no asynchronous computations are required. When a Microsoft.Maps.Unity.IPinnable is no longer in view or has been removed, call Microsoft.Maps.Unity.MapRendererBase.UntrackPinnable(Microsoft.Maps.Unity.IPinnable) to cancel any potential outstanding asynchronous operations. This is not required but is recommended. |
void |
UntrackPinnable(IPinnable pinnable) |
Cancels the positioning and asynchronous elevation sampling for the Microsoft.Maps.Unity.IPinnable . |
Static Fields
Type | Name | Summary |
---|---|---|
Int32 |
CurrentVersion | Versions: 1 - Added support for Microsoft.Maps.Unity.TextureTileLayer .2 - Added support for Microsoft.Maps.Unity.ElevationTileLayer .3 - Added option to control type of UnityEngine.Collider associated with the map. |
Int32 |
MaxTextureTileLayerCount | Gets the maximum number of Microsoft.Maps.Unity.TextureTileLayer instances that can be put into Microsoft.Maps.Unity.MapRendererBase.TextureTileLayers . This is dictated by the slots set up in the shader. |
Structure used to get information back form a raycast of a MapRenderer.
public struct Microsoft.Maps.Unity.MapRendererRaycastHit
: IEquatable<MapRendererRaycastHit>
Properties
Type | Name | Summary |
---|---|---|
Single |
Distance | Distance to the hit point from the origin of the raycast. |
LatLonAlt |
Location | The geographic location where the ray hit the MapRenderer. |
Vector3 |
Normal | The normal vector of the triangle that was hit. |
Vector3 |
Point | The impact point in world space where the ray hit the MapRenderer. |
Methods
Type | Name | Summary |
---|---|---|
Boolean |
Equals(Object obj) |
|
Boolean |
Equals(MapRendererRaycastHit other) |
|
Int32 |
GetHashCode() |
Helpers to transform between Unity's world and local spaces to the geographic coordinate system of the Microsoft.Maps.Unity.MapRenderer
.
public static class Microsoft.Maps.Unity.MapRendererTransformExtensions
Static Fields
Type | Name | Summary |
---|---|---|
Double |
EquatorialCircumferenceInWgs84Meters | The WGS84 ellipsoid circumference measured in meters. |
Static Methods
Type | Name | Summary |
---|---|---|
Vector3 |
TransformLatLonAltToLocalPoint(this MapRenderer mapRenderer, LatLonAlt location) |
Transforms a Microsoft.Geospatial.LatLonAlt to an XYZ point in local space. |
Vector3 |
TransformLatLonAltToWorldPoint(this MapRenderer mapRenderer, LatLonAlt location) |
Transforms a Microsoft.Geospatial.LatLonAlt to an XYZ point in world space. |
MercatorCoordinate |
TransformLocalDirectionToMercator(this MapRenderer mapRenderer, Vector3 directionInLocalSpace) |
Transforms an XYZ direction in the Microsoft.Maps.Unity.MapRenderer 's local space to a direction in Mercator space. |
MercatorCoordinate |
TransformLocalDirectionToMercator(Vector3 directionInLocalSpace, Double zoomLevel) |
Transforms an XYZ direction in the Microsoft.Maps.Unity.MapRenderer 's local space to a direction in Mercator space. |
MercatorCoordinate |
TransformLocalPointToMercator(this MapRenderer mapRenderer, Vector3 pointInLocalSpace) |
Transforms an XYZ point in the Microsoft.Maps.Unity.MapRenderer 's local space to a Microsoft.Geospatial.MercatorCoordinate . |
MercatorCoordinate |
TransformLocalPointToMercatorWithAltitude(this MapRenderer mapRenderer, Vector3 pointInLocalSpace, Double& altitudeInMeters, Double& mercatorScale) |
Transforms an XYZ point in the Microsoft.Maps.Unity.MapRenderer 's local space to a Microsoft.Geospatial.MercatorCoordinate . Includes the altitude measured as meters from the WGS84 ellipsoid. |
Vector3 |
TransformMercatorWithAltitudeToLocalPoint(this MapRenderer mapRenderer, MercatorCoordinate& mercatorCoordinate, Double altitudeInMeters) |
Transforms a Microsoft.Geospatial.MercatorCoordinate to an XYZ point in local space. |
Vector3 |
TransformMercatorWithAltitudeToWorldPoint(this MapRenderer mapRenderer, MercatorCoordinate& mercatorCoordinate, Double altitudeInMeters) |
Transforms a Microsoft.Geospatial.MercatorCoordinate to an XYZ point in world space. |
MercatorCoordinate |
TransformWorldDirectionToMercator(this MapRenderer mapRenderer, Vector3 directionInWorldSpace) |
Transforms an XYZ direction in the Microsoft.Maps.Unity.MapRendererBase 's local space to a direction in Mercator space. |
MercatorCoordinate |
TransformWorldDirectionToMercator(this MapRenderer mapRenderer, Vector3 directionInWorldSpace, Double zoomLevel) |
Transforms an XYZ direction in the Microsoft.Maps.Unity.MapRendererBase 's local space to a direction in Mercator space. |
LatLon |
TransformWorldPointToLatLon(this MapRenderer mapRenderer, Vector3 pointInWorldSpace) |
Transforms an XYZ point in world space to a Microsoft.Geospatial.LatLon . |
LatLonAlt |
TransformWorldPointToLatLonAlt(this MapRenderer mapRenderer, Vector3 pointInWorldSpace) |
Transforms an XYZ point in world space to a Microsoft.Geospatial.LatLonAlt . |
MercatorCoordinate |
TransformWorldPointToMercator(this MapRenderer mapRenderer, Vector3 pointInWorldSpace) |
Transforms an XYZ point in world space to a Microsoft.Geospatial.MercatorCoordinate . |
MercatorCoordinate |
TransformWorldPointToMercatorWithAltitude(this MapRenderer mapRenderer, Vector3 pointInWorldSpace, Double& altitudeInMeters, Double& mercatorScale) |
Transforms an XYZ point in world space to a Microsoft.Geospatial.MercatorCoordinate . |
Helpers to provide a map scale relative to Unity's world space.
public static class Microsoft.Maps.Unity.MapScaleRatioExtensions
Static Methods
Type | Name | Summary |
---|---|---|
Double |
ComputeUnityToMapScaleRatio(this MapRenderer mapRenderer) |
Computes approximate scale of the map relative to Unity's world space, i.e. the number of real-world meters in the map per a single unit in Unity's world space. Uses the Microsoft.Maps.Unity.MapRenderer 's center as the reference location. |
Double |
ComputeUnityToMapScaleRatio(this MapRenderer mapRenderer, LatLon referenceLocation) |
Computes approximate scale of the map relative to Unity's world space, i.e. the number of real-world meters in the map per a single unit in Unity's world space. Uses the Microsoft.Maps.Unity.MapRenderer 's center as the reference location. |
MapScene is used for changing and animating the map view.
public abstract class Microsoft.Maps.Unity.MapScene
Methods
Type | Name | Summary |
---|---|---|
void |
GetLocationAndZoomLevel(MapRendererBase mapRenderer, LatLon& location, Double& zoomLevel) |
Returns the location and zoom level for the Microsoft.Maps.Unity.MapScene . |
Animates a Microsoft.Maps.Unity.MapRenderer
to the specified Microsoft.Maps.Unity.MapScene
. Derives the animation duration and preforms a preceptually smooth animation, based on the work of van Wijk and Nuij, "Smooth and Efficient Zooming and Panning". https://www.win.tue.nl/~vanwijk/zoompan.pdf
public class Microsoft.Maps.Unity.MapSceneAnimationController
: IMapSceneAnimationController
Properties
Type | Name | Summary |
---|---|---|
WaitForMapSceneAnimation |
YieldInstruction |
Methods
Type | Name | Summary |
---|---|---|
void |
Initialize(MapRendererBase mapRenderer, MapScene mapScene, Single animationTimeScale, MapSceneAnimationKind mapSceneAnimationKind) |
|
Boolean |
UpdateAnimation(Single currentZoomLevel, LatLon currentLocation, Single& zoomLevel, LatLon& location) |
Specifies the animation to use when setting a MapScene.
public enum Microsoft.Maps.Unity.MapSceneAnimationKind
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
None | No animation. |
1 |
Linear | A linear animation. |
2 |
SmoothLinear | A linear animation with smoothing applied to the beginning and end of the animation. |
3 |
Bow | A parabolic animation. |
A Microsoft.Maps.Unity.MapScene
described by a Microsoft.Geospatial.GeoBoundingBox
or Microsoft.Geospatial.MercatorBoundingBox
.
public class Microsoft.Maps.Unity.MapSceneOfBoundingBox
: MapScene
Properties
Type | Name | Summary |
---|---|---|
GeoBoundingBox |
BoundingBox | The bounds of the MapScene. |
Methods
Type | Name | Summary |
---|---|---|
void |
GetLocationAndZoomLevel(MapRendererBase mapRenderer, LatLon& location, Double& zoomLevel) |
A Microsoft.Maps.Unity.MapScene
that can be used to animate to a specified Microsoft.Maps.Unity.MapSceneOfLabelAndZoomLevel.MapLabel
and zoom level.
public class Microsoft.Maps.Unity.MapSceneOfLabelAndZoomLevel
: MapScene
Properties
Type | Name | Summary |
---|---|---|
MapLabel |
MapLabel | The Microsoft.Maps.Unity.MapLabel that is animated to. |
Single |
ZoomLevel | The zoom level that is animated to. |
Methods
Type | Name | Summary |
---|---|---|
void |
GetLocationAndZoomLevel(MapRendererBase mapRenderer, LatLon& location, Double& zoomLevel) |
A basic Microsoft.Maps.Unity.MapScene
that can be used to change the map's location and zoom level.
public class Microsoft.Maps.Unity.MapSceneOfLocationAndZoomLevel
: MapScene
Properties
Type | Name | Summary |
---|---|---|
LatLon |
Location | The final location. |
Single |
ZoomLevel | The final zoom level. |
Methods
Type | Name | Summary |
---|---|---|
void |
GetLocationAndZoomLevel(MapRendererBase mapRenderer, LatLon& location, Double& zoomLevel) |
Provides credentials for components like Microsoft.Maps.Unity.MapRendererBase
and services like MapLocationFinder, etc. Typically only one session needs to be created for a given scene.
public class Microsoft.Maps.Unity.MapSession
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
String |
DeveloperKey | The key used for Bing Maps services. Sign up for a key at the Bing Maps Portal |
MapDeveloperKeySource |
DeveloperKeySource | Describes where the Microsoft.Maps.Unity.MapSession retrieves the Microsoft.Maps.Unity.MapSession.DeveloperKey . See Microsoft.Maps.Unity.MapSession.DeveloperKeySource for different options. |
SystemLanguage |
Language | The language determines the text used to display names of map content like city names, country/region names, etc. Unless this property has been set, the language is auto detected from the UnityEngine.Application.systemLanguage . |
LanguageChangedEvent |
LanguageChanged | This event is invoked when the Microsoft.Maps.Unity.MapSession.Language has changed. |
String |
RegionOverride | Overrides the automatically detected region with an ISO 3166-1 alpha-2 country region code, e.g. "US". The region value is used to ensure that disputed borders and location names align with the views of the specified user region. Due to the sensitivity of this feature, it is recommended to only use the override when testing and to let the map automatically detect the value in your production application. |
Boolean |
ShowMapDataInEditor | If true, during edit mode shows map data. Data usage in the editor will apply to the session's developer key. |
Methods
Type | Name | Summary |
---|---|---|
Task<String> |
GetRegion() | Retrieves a string that contains an ISO 3166-1 alpha-2 country region code. The region value is used to ensure that disputed borders and location names align with the views of the specified user region. By default, this value is automatically detected but can be overriden via Microsoft.Maps.Unity.MapSession.RegionOverride . |
Static Fields
Type | Name | Summary |
---|---|---|
String |
ConfigFileName | When the Microsoft.Maps.Unity.MapSession.DeveloperKeySource is set to Microsoft.Maps.Unity.MapDeveloperKeySource.ResourceConfigFile , this is the expected file name of the resource that provides the the developer key. |
Static Properties
Type | Name | Summary |
---|---|---|
MapSession |
Current | The current Microsoft.Maps.Unity.MapSession that is active. Null if no session is active. |
The shape of the Microsoft.Maps.Unity.MapRendererBase
.
public enum Microsoft.Maps.Unity.MapShape
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Block | Default shape. The map is rendered on a rectangular block. |
1 |
Cylinder | Map is rendered on a cylinder. |
The type of terrain used for rendering the map.
public enum Microsoft.Maps.Unity.MapTerrainType
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Default | The map terrain consists of either elevation data or high resolution 3D models. |
1 |
Elevated | The map terrain consists only of elevation data. No high resolution 3D models are used. |
2 |
Flat | Both elevation and high resolution 3D models are disabled. The map will be flat. |
Handles touch-screen based interactions like pan, pinch to zoom, double tap zoom, and tap-and-hold.
public class Microsoft.Maps.Unity.MapTouchInteractionHandler
: MapInteractionHandler
A list implementation with notifications for add and remove.
public class Microsoft.Maps.Unity.ObservableList<T>
: IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Properties
Type | Name | Summary |
---|---|---|
Int32 |
Count | Gets the number of elements in the list. |
Boolean |
IsReadOnly | Gets a value indicating whether the ObservableList is readonly. |
T |
Item | Gets or sets the element at the specified index. |
Events
Type | Name | Summary |
---|---|---|
ItemChangedEventHandler<T> |
ItemAdded | Event that is raised when an item is added or inserted into this list. |
ItemChangedEventHandler<T> |
ItemRemoved | Event that is raised when an item is removed from this list. |
RangeChangedEventHandler<T> |
RangeAdded | Event that is raised when a range of items is added or inserted into this list. |
RangeChangedEventHandler<T> |
RangeRemoved | Event that is raised when a range of items is removed from this list. |
Methods
Type | Name | Summary |
---|---|---|
void |
Add(T item) |
Adds an item to this list. |
void |
AddRange(IEnumerable<T> items) |
Adds a range of items to this list. |
void |
Clear() | Removes all items from this list. |
Boolean |
Contains(T item) |
Determines whether this list contains a specific value. |
void |
CopyTo(T[] array, Int32 arrayIndex) |
Copies the elements of this list to an Array, starting at a particular Array index. |
IEnumerator<T> |
GetEnumerator() | Returns an enumerator that iterates through a collection. |
Int32 |
IndexOf(T item) |
Determines the index of a specific item in this list. |
void |
Insert(Int32 index, T item) |
Inserts an item to this list at the specified index. |
Boolean |
Remove(T item) |
Removes the first occurrence of a specific object from this list. |
void |
RemoveAt(Int32 index) |
Removes the item at the specified index. |
List of MapPins with callbacks for item addition and removal. Also, this list can be serialized.
public class Microsoft.Maps.Unity.ObservableMapPinList
: ObservableList<MapPin>, IList<MapPin>, ICollection<MapPin>, IEnumerable<MapPin>, IEnumerable
Options common to all REST-based Bing Maps services.
public class Microsoft.Maps.Unity.ServiceOptions
Properties
Type | Name | Summary |
---|---|---|
String |
CultureOverride | Use this property to specify a culture for the request. This value takes overrides the the language and region that would otherwise be automatically used from Microsoft.Maps.Unity.MapSession.Current . The culture value provides the strings in the language of the culture for geographic entities and place names returned by MapLocationFinder. For a list of supported culture codes, see https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes. |
MapSession |
MapSession | The Microsoft.Maps.Unity.MapSession to associate with this request. By default, uses Microsoft.Maps.Unity.MapSession.Current . The Microsoft.Maps.Unity.ServiceOptions.MapSession provides credentials for requests as well as localization values for language and region. |
String |
RegionOverride | Use this property to specify a specific region for the request. This value takes precedent over teh region taht would otherwise be automatically used from Microsoft.Maps.Unity.MapSession.Current . A region value is an ISO 3166-1 Alpha-2 country/region code. This will alter geopolitically disputed results to align with the specified region. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 |
Methods
Type | Name | Summary |
---|---|---|
Task<String> |
GetCulture() | A string representing the language and region, e.g. "en-US". The culture value provides the strings in the language of the culture for geographic entities and place names returned by MapLocationFinder. For a list of supported culture codes, see https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes. |
Task<String> |
GetRegion() | A string representing the region, e.g. "en-US". A region value is an ISO 3166-1 Alpha-2 country/region code. This will alter geopolitically disputed results to align with the specified region. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 |
Encapsulate recommended styling information about a label.
public class Microsoft.Maps.Unity.Style
Properties
Type | Name | Summary |
---|---|---|
Color |
Color | Gets the recommended color of the label. |
FontStyle |
FontStyle | Gets the recommended style of the the label. |
FontWeight |
FontWeight | Gets the recommended weight of the label. |
Int32 |
Rank | Gets the recommended ranking of the label which can be used to determine label size. |
Handles conversion of UnityEngine.SystemLanguage
values to LCIDs and culture codes.
public static class Microsoft.Maps.Unity.SystemLangaugeConverter
Static Methods
Type | Name | Summary |
---|---|---|
String |
ToCultureCode(SystemLanguage systemLanguage, String region = ) |
Returns the best match of a Bing Maps language code for the specified UnityEngine.SystemLanguage . Then if specified, appends the region string to the language code to create a culture code. |
Int32 |
ToLcid(SystemLanguage systemLanguage) |
Converts the language to best matching LCID. |
A Microsoft.Maps.Unity.TextureTile
contains the data used to render a given tile in a Microsoft.Maps.Unity.TextureTileLayer
.
public struct Microsoft.Maps.Unity.TextureTile
: IEquatable<TextureTile>
Methods
Type | Name | Summary |
---|---|---|
Boolean |
Equals(TextureTile other) |
Check if 2 TextureTiles contains the same underlying data. |
Boolean |
Equals(Object obj) |
Check if 2 TextureTiles contains the same underlying data. |
Int32 |
GetHashCode() | Returns the hash code the this TextureTile. |
String |
ToString() | Returns the default ToString() method of this TextureTile |
Static Methods
Type | Name | Summary |
---|---|---|
TextureTile |
FromImageData(Byte[] data) |
Creates a Microsoft.Maps.Unity.TextureTile from PNG or JPEG byte data, or any other data type consumable by UnityEngine.ImageConversion.LoadImage(UnityEngine.Texture2D,System.Byte[]) . |
Task<Nullable<TextureTile>> |
FromNull() | Used for a Microsoft.Maps.Unity.TextureTile that is not present. This is equivalent to returning a nullable type with no value. It is more efficient to use this however as the return value is cached in order to reduce GC allocation. |
TextureTile |
FromRawData(TextureFormat textureFormat, Int32 width, Int32 height, Byte[] data, Boolean mipChain) |
Creates a Microsoft.Maps.Unity.TextureTile from raw texture data directly consumable by the GPU. |
TextureTile |
FromTexture2D(Texture2D texture) |
Creates a Microsoft.Maps.Unity.TextureTile from a UnityEngine.Texture2D . No conversion is needed here, and the Microsoft.Maps.Unity.TextureTile will use the specified UnityEngine.Texture2D directly. |
TextureTile |
FromUrl(Uri uri) |
Creates a Microsoft.Maps.Unity.TextureTile from a System.Uri referencing a PNG or JPEG image. |
The TextureTileLayer provides texture data spatially organized in Mercator tiles (EPSG:3857). The textures are used by the Microsoft.Maps.Unity.MapRendererBase
for display and can be composited with other Microsoft.Maps.Unity.TextureTileLayer
s.
public abstract class Microsoft.Maps.Unity.TextureTileLayer
: TileLayer
Properties
Type | Name | Summary |
---|---|---|
Single |
Opacity | A multiplicative factor for controlling overall layer opacity. 0.0 is completely transparent. 1.0 is opaque (default). |
Methods
Type | Name | Summary |
---|---|---|
Task<Nullable<TextureTile>> |
GetTexture(TileId tileId, CancellationToken cancellationToken = null) |
Retrieves the texture data that will be rendered for the specified Microsoft.Geospatial.TileId . |
A serializable list of Microsoft.Maps.Unity.TextureTileLayer
s.
public class Microsoft.Maps.Unity.TextureTileLayerList
: TileLayerList<TextureTileLayer>, IReadOnlyList<TextureTileLayer>, IReadOnlyCollection<TextureTileLayer>, IEnumerable<TextureTileLayer>, IEnumerable
Common base class for Microsoft.Maps.Unity.TileLayer
s. These are specially handled components that must be associated with a Microsoft.Maps.Unity.MapRendererBase
.
public abstract class Microsoft.Maps.Unity.TileLayer
: MonoBehaviour
Methods
Type | Name | Summary |
---|---|---|
void |
SetDirty() | Marks the Microsoft.Maps.Unity.TileLayer as dirty to trigger a refresh of the Microsoft.Maps.Unity.TileLayer 's data. |
A read-only list of Microsoft.Maps.Unity.TileLayer
s associated with the Microsoft.Maps.Unity.MapRendererBase
. This list maintains a specific ordering of Microsoft.Maps.Unity.TileLayer
s which reflects their priority. Because Microsoft.Maps.Unity.TileLayer
s are UnityEngine.MonoBehaviour
s, their lifetime is managed through Unity (not this list).
public class Microsoft.Maps.Unity.TileLayerList<T>
: IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Properties
Type | Name | Summary |
---|---|---|
Int32 |
Count | Gets the number of items in the list. |
T |
Item | Gets or sets the item at the specified index. |
Methods
Type | Name | Summary |
---|---|---|
Boolean |
Contains(T item) |
Determines whether this list contains a specific value. |
IEnumerator<T> |
GetEnumerator() | Returns an enumerator that iterates through a collection. |
Int32 |
IndexOf(T item) |
Determines the index of a specific item in this list. |
Helpers to run a System.Threading.Tasks.Task
on Unity's main thread.
public static class Microsoft.Maps.Unity.UnityTaskFactory
Static Properties
Type | Name | Summary |
---|---|---|
Int32 |
UnityMainThreadId | The Unity main thread ID. |
Static Methods
Type | Name | Summary |
---|---|---|
void |
AssertNotOnMainThread() | Asserts that the current thread is not the Unity main thread. |
void |
AssertOnMainThread() | Asserts that the current thread is the Unity main thread. |
Boolean |
IsOnMainThread() | Returns true if the current thread is the Unity main thread. |
Task |
StartNew(Action action, CancellationToken cancellationToken = null) |
Starts a new task. The task will be executed on Unity's main thread. |
Task |
StartNew(Func<Task> func, CancellationToken cancellationToken = null) |
Starts a new task. The task will be executed on Unity's main thread. |
Task<T> |
StartNew(Func<Task<T>> func, CancellationToken cancellationToken = null) |
Starts a new task. The task will be executed on Unity's main thread. |
void |
ThrowIfNotOnMainThread() | Throw an exception if the current thread is not the Unity main thread. |
Enables UnityWebRequest operations to be awaited from within an async method.
public class Microsoft.Maps.Unity.UnityWebRequestAwaiter
: INotifyCompletion
Properties
Type | Name | Summary |
---|---|---|
Boolean |
IsCompleted | True if the underlying async operation is completed. |
Methods
Type | Name | Summary |
---|---|---|
void |
GetResult() | Returns the result. Void in this case. |
void |
OnCompleted(Action continuation) |
Schedules the continuation action that's invoked when the instance completes. |
Provides the ability to use await keyword with UnityEngine.Networking.UnityWebRequestAsyncOperation
.
public static class Microsoft.Maps.Unity.UnityWebRequestAwaiterExtensionMethods
Static Methods
Type | Name | Summary |
---|---|---|
UnityWebRequestAwaiter |
GetAwaiter(this UnityWebRequestAsyncOperation webRequestAsyncOperation) |
Provides the ability to use await keyword with UnityEngine.Networking.UnityWebRequestAsyncOperation . |
Yields until Microsoft.Maps.Unity.MapRendererBase.IsLoaded
returns true.
public class Microsoft.Maps.Unity.WaitForMapLoaded
: CustomYieldInstruction, IEnumerator
Properties
Type | Name | Summary |
---|---|---|
Boolean |
keepWaiting |
Used to suspend coroutine execution once the associated MapScene animation has been completed or cancelled.
public class Microsoft.Maps.Unity.WaitForMapSceneAnimation
: CustomYieldInstruction, IEnumerator
Properties
Type | Name | Summary |
---|---|---|
Boolean |
keepWaiting | Returns false once the animation has been completed or cancelled. |
Methods
Type | Name | Summary |
---|---|---|
void |
SetComplete() | Completes the yield instruction. |
- 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