-
Notifications
You must be signed in to change notification settings - Fork 129
Microsoft.Maps.Unity
Cache class for dynamic types.
public class Microsoft.Maps.Unity.Cache<TKey, TValue>
Properties
Type | Name | Summary |
---|---|---|
Int32 |
Generation | The generation is incremented each time there is a change to the cache, i.e. an item is added or removed. |
Boolean |
IsWeakCacheEnabled | Gets a value indicating whether this cache supports weak reference cache. |
Events
Type | Name | Summary |
---|---|---|
EventHandler<TKey> |
ItemEvicted |
Methods
Type | Name | Summary |
---|---|---|
void |
Add(TKey key, TValue value, Boolean isPinned = False) |
Adds the specified key and value to the cache. |
void |
Clear() | Removes all entries from the cache. |
void |
Clear(List 1&` values) |
Removes all entries from the cache. |
Boolean |
ContainsKey(TKey key) |
Returns true if the key is contained in the Cache. If IsWeakCacheEnabled = true, this checks weak reference cache and promote to _cache if alive. |
TValue |
Get(TKey key) |
Gets the value for the associated key. Returns null if the value does not exist in the cache. |
TValue[] |
GetAll() | Returns all values in the cache. |
Boolean |
TryGet(TKey key, TValue& value) |
Gets the value for the associated key. |
Represents a cluster of MapPins at the specified level of detail.
public class Microsoft.Maps.Unity.ClusterMapPin
: Pinnable
Properties
Type | Name | Summary |
---|---|---|
Int16 |
LevelOfDetail | The level of detail represented by this cluster. |
LatLon |
Location | The location of the MapPin. |
Int32 |
Size | The number of pins in this cluster. |
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. |
Helpers to do intersection tests.
public static class Microsoft.Maps.Unity.Intersection
Static Methods
Type | Name | Summary |
---|---|---|
Boolean |
Intersect(Ray& ray, Vector3& v0, Vector3& v1, Vector3& v2, Single& distanceAlongRayToIntersection) |
Intersects a ray and triangle. |
Boolean |
Intersect(Vector3& linePoint, Vector3& lineDirection, Vector3& planeNormal, Vector3& planePoint, Vector3& intersection, Single& length) |
Intersects a ray and triangle. |
Serializable wrapper class for a LatLon.
public struct Microsoft.Maps.Unity.LatLonWrapper
Fields
Type | Name | Summary |
---|---|---|
Double |
Latitude | Gets the latitude in degrees. |
Double |
Longitude | Gets the longitude in degrees. |
Methods
Type | Name | Summary |
---|---|---|
LatLon |
ToLatLon() | Converts to a LatLon. Wraps longitude so that values always are between -180 and +180. |
String |
ToString() | String representation of the LatLonWrapper. |
Utility map constant values.
public 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. |
This component is used to transfer labeling information to a GameObject.
public class Microsoft.Maps.Unity.MapLabel
: Pinnable
Fields
Type | Name | Summary |
---|---|---|
Style |
Style | Gets or sets the recommended styling information for this label. |
String |
Text | Gets or sets the test of the label. |
This MapLayer can be added to a MapRenderer GameObject to enable labeling of the map. Only one MapLabelLayer is allowed on a given GameObject. Also, in order for the MapLabelLayer to function properly, a LabelPrefab must be set before the first Update().
public class Microsoft.Maps.Unity.MapLabelLayer
: MapLayer
Properties
Type | Name | Summary |
---|---|---|
MapLabel |
MapLabelPrefab | The GameObject used to replicate labels into the map. |
Base class for any type of MapLayer. A MapLayer instance can only be associated with a single MapRenderer.
public abstract class Microsoft.Maps.Unity.MapLayer
: MonoBehaviour
Properties
Type | Name | Summary |
---|---|---|
String |
LayerName | The name of the MapLayer. This may be useful for disambiguating multiple layers on the same GameObject. |
A MapPin can be used to pin a GameObject to the map at a specified coordinate.
public class Microsoft.Maps.Unity.MapPin
: Pinnable
Fields
Type | Name | Summary |
---|---|---|
Double |
Altitude | The altitude above the specified Microsoft.Maps.Unity.MapPin.AltitudeReference . |
AltitudeReference |
AltitudeReference | The altitude reference to use for the location. By default, uses a Surface altitude reference. If unsure what altitude reference to use, stick with the default. If data is known to be in a specific reference system, e.g. Ellipsoid, then this value must be updated accordingly. |
Action<MapPin, LatLon> |
LocationChanged | Action that is invoked when the Location of the MapPin is changed. |
Properties
Type | Name | Summary |
---|---|---|
LatLon |
Location | The location of the MapPin. |
Maintains a collection of MapPins. Supports clustering. This layer is queried by the associated MapRenderer to get the MapPins or clusters in the map's current view.
public class Microsoft.Maps.Unity.MapPinLayer
: MapLayer
Properties
Type | Name | Summary |
---|---|---|
ClusterMapPin |
ClusterMapPinPrefab | The prefab to use for clusters. |
Int32 |
ClusterThreshold | If the number of pins in a spatial region exceed the ClusterThreshold, a single cluster MapPin 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. |
The MapRenderer component can be applied to a GameObject to manage streaming and rendering of map data.
public class Microsoft.Maps.Unity.MapRenderer
: MonoBehaviour
Fields
Type | Name | Summary |
---|---|---|
Vector2 |
LocalMapDimension | The width and length of the map object in its local coordinate system before any transforms are applied. |
Properties
Type | Name | Summary |
---|---|---|
IReadOnlyList<MapPin> |
ActiveMapPins | Array of MapPins currently visible within the Bounds of the map. |
String |
BingMapsKey | The key used to enable Bing maps services. Must be set to a valid key before the MapRenderer is usable. |
GeoBoundingBox |
Bounds | The LatLon bounds of the current map view. |
LatLon |
Center | Center of the map. |
String |
Copyright | The copyrights and attribution text, which may change based on the current view of the MapRenderer. This string must be displayed near the associated MapRenderer. |
Double |
ElevationBaseline | The altitude in WGS84 meters in which the map's terrain surface has been negatively offset. |
Single |
LocalMapHeight | The height of the map object in its local coordinate system before any transforms are applied. |
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. |
Single |
MapHeight | The height of the map with global scale applied, i.e. LocalMapHeight * transform.lossyScale.y. |
IReadOnlyList<MapLayer> |
MapLayers | The MapLayers associated with this MapRenderer. |
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. |
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. |
Boolean |
ShowMapDataInEditor | If true, during edit mode shows map data. Data usage in the editor will apply to the specified Bing maps key. |
Single |
ZoomLevel | Zoom level. Lower values are more zoomed out. Higher values are more zoomed in. |
Methods
Type | Name | Summary |
---|---|---|
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. |
WaitForMapSceneAnimation |
SetMapScene(MapScene mapScene, MapSceneAnimationKind mapSceneAnimationKind = Bow) |
Sets the MapRenderer's view to reflect the new MapScene. A MapSceneAnimationKind may also be specified. |
Structure used to get information back form a raycast of a MapRenderer.
public struct Microsoft.Maps.Unity.MapRendererRaycastHit
Fields
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. |
MapScene is used for changing and animating the map view.
public abstract class Microsoft.Maps.Unity.MapScene
Methods
Type | Name | Summary |
---|---|---|
void |
GetLocationAndZoomLevel(LatLon& location, Double& zoomLevel) |
Returns the location and zoom level for the MapScene. |
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 |
Bow | A parabolic animation. |
MapScene positioned on a MapLabel and a zoom level.
public class Microsoft.Maps.Unity.MapSceneOfLabelAndZoomLevel
: MapScene
Properties
Type | Name | Summary |
---|---|---|
MapLabel |
MapLabel | The MapLabel. |
Single |
ZoomLevel | The final zoom level. |
Methods
Type | Name | Summary |
---|---|---|
void |
GetLocationAndZoomLevel(LatLon& location, Double& zoomLevel) |
A list with notifications for add and remove.
public class Microsoft.Maps.Unity.ObservableList<T>
: IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Fields
Type | Name | Summary |
---|---|---|
Action<T> |
OnItemAdded | Action that handles a single item being added to the last. |
Action<T> |
OnItemRemoved | Action that handles a single item being removed from the list. |
Action<IEnumerable<T>> |
OnRangeAdded | Action that handles a range of items being added to the list. |
Action<IEnumerable<T>> |
OnRangeRemoved | Action that handles a range of items being removed from the list. |
Properties
Type | Name | Summary |
---|---|---|
Int32 |
Count | |
Boolean |
IsReadOnly | |
T |
Item |
Methods
Type | Name | Summary |
---|---|---|
void |
Add(T item) |
|
void |
AddRange(IEnumerable<T> items) |
|
void |
Clear() | |
Boolean |
Contains(T item) |
|
void |
CopyTo(T[] array, Int32 arrayIndex) |
|
IEnumerator<T> |
GetEnumerator() | |
Int32 |
IndexOf(T item) |
|
void |
Insert(Int32 index, T item) |
|
Boolean |
Remove(T item) |
|
void |
RemoveAt(Int32 index) |
Encapsulates a Unity component that can be positioned on a map. This should not be derived from directly. Use MapPin instead.
public abstract class Microsoft.Maps.Unity.Pinnable
: MonoBehaviour
Fields
Type | Name | Summary |
---|---|---|
AnimationCurve |
ScaleCurve | The scale of the Pinnable relative to ZoomLevel. |
Boolean |
UseRealWorldScale | If true, the 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. |
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. |
Suspends 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. |
- 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