Class VectorLayer
Inheritance
System.Object
VectorLayer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:Mapbox.Unity.Map
Assembly:cs.temp.dll.dll
Syntax
public class VectorLayer : AbstractLayer, IVectorDataLayer, ILayer
Fields
SubLayerAdded
Declaration
public EventHandler SubLayerAdded
Field Value
Type |
Description |
EventHandler |
|
SubLayerRemoved
Declaration
public EventHandler SubLayerRemoved
Field Value
Type |
Description |
EventHandler |
|
Properties
Factory
Declaration
public VectorTileFactory Factory { get; }
Property Value
Type |
Description |
VectorTileFactory |
|
IsLayerActive
Declaration
public bool IsLayerActive { get; }
Property Value
Type |
Description |
System.Boolean |
|
Implements
LayerProperty
Declaration
public VectorLayerProperties LayerProperty { get; }
Property Value
LayerSourceId
Declaration
public string LayerSourceId { get; }
Property Value
Type |
Description |
System.String |
|
Implements
LayerType
Declaration
public MapLayerType LayerType { get; }
Property Value
Implements
Methods
AddCustomFeatureSubLayer(String, String)
Declaration
public virtual void AddCustomFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService)
Parameters
Type |
Name |
Description |
System.String |
assignedSubLayerName |
|
System.String |
dataLayerNameInService |
|
Implements
AddFeatureSubLayer(VectorSubLayerProperties)
Declaration
public virtual void AddFeatureSubLayer(VectorSubLayerProperties subLayerProperties)
Parameters
Implements
AddLayerSource(String)
Add provided data source (TilesetId) to existing ones.
Mapbox vector api supports comma separated TilesetIds and this method
adds the provided TilesetId at the end of the existing source.
Declaration
public virtual void AddLayerSource(string vectorSource)
Parameters
Type |
Name |
Description |
System.String |
vectorSource |
Data source (TilesetId) to add to existing sources.
|
Implements
AddLineFeatureSubLayer(String, String, Single)
Declaration
public virtual void AddLineFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService, float lineWidth = 1F)
Parameters
Type |
Name |
Description |
System.String |
assignedSubLayerName |
|
System.String |
dataLayerNameInService |
|
System.Single |
lineWidth |
|
Implements
AddPointFeatureSubLayer(String, String)
Declaration
public virtual void AddPointFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService)
Parameters
Type |
Name |
Description |
System.String |
assignedSubLayerName |
|
System.String |
dataLayerNameInService |
|
Implements
AddPointsOfInterestSubLayer(PrefabItemOptions)
Declaration
public virtual void AddPointsOfInterestSubLayer(PrefabItemOptions poiLayerProperties)
Parameters
Implements
AddPolygonFeatureSubLayer(String, String)
Declaration
public virtual void AddPolygonFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService)
Parameters
Type |
Name |
Description |
System.String |
assignedSubLayerName |
|
System.String |
dataLayerNameInService |
|
Implements
DisableVectorFeatureProcessingWithCoroutines()
Declaration
public void DisableVectorFeatureProcessingWithCoroutines()
Implements
EnableVectorFeatureProcessingWithCoroutines(Int32)
Enable coroutines for vector features, processing choosen amount
of them each frame.
Declaration
public virtual void EnableVectorFeatureProcessingWithCoroutines(int entityPerCoroutine = 20)
Parameters
Type |
Name |
Description |
System.Int32 |
entityPerCoroutine |
Numbers of features to process each frame.
|
Implements
FindFeatureSubLayerWithName(String)
Declaration
public virtual VectorSubLayerProperties FindFeatureSubLayerWithName(string featureLayerName)
Parameters
Type |
Name |
Description |
System.String |
featureLayerName |
|
Returns
Implements
FindPointsofInterestSubLayerWithName(String)
Declaration
public virtual PrefabItemOptions FindPointsofInterestSubLayerWithName(string poiLayerName)
Parameters
Type |
Name |
Description |
System.String |
poiLayerName |
|
Returns
Implements
GetAllFeatureSubLayers()
Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllFeatureSubLayers()
Returns
GetAllLineFeatureSubLayers()
Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllLineFeatureSubLayers()
Returns
GetAllPointFeatureSubLayers()
Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllPointFeatureSubLayers()
Returns
GetAllPointsOfInterestSubLayers()
Declaration
public virtual IEnumerable<PrefabItemOptions> GetAllPointsOfInterestSubLayers()
Returns
GetAllPolygonFeatureSubLayers()
Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllPolygonFeatureSubLayers()
Returns
GetFeatureSubLayerAtIndex(Int32)
Declaration
public virtual VectorSubLayerProperties GetFeatureSubLayerAtIndex(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Implements
GetFeatureSubLayerByQuery(Func<VectorSubLayerProperties, Boolean>)
Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetFeatureSubLayerByQuery(Func<VectorSubLayerProperties, bool> query)
Parameters
Returns
GetPointsOfInterestSubLayerAtIndex(Int32)
Declaration
public virtual PrefabItemOptions GetPointsOfInterestSubLayerAtIndex(int i)
Parameters
Type |
Name |
Description |
System.Int32 |
i |
|
Returns
Implements
GetPointsOfInterestSubLayerByQuery(Func<PrefabItemOptions, Boolean>)
Declaration
public virtual IEnumerable<PrefabItemOptions> GetPointsOfInterestSubLayerByQuery(Func<PrefabItemOptions, bool> query)
Parameters
Returns
GetTileJsonData()
Declaration
public virtual TileJsonData GetTileJsonData()
Returns
Implements
Initialize()
Declaration
Implements
Initialize(LayerProperties)
Declaration
public void Initialize(LayerProperties properties)
Parameters
Implements
Remove()
Declaration
Implements
RemoveFeatureSubLayer(VectorSubLayerProperties)
Declaration
public virtual void RemoveFeatureSubLayer(VectorSubLayerProperties layer)
Parameters
Implements
RemoveFeatureSubLayerWithName(String)
Declaration
public virtual void RemoveFeatureSubLayerWithName(string featureLayerName)
Parameters
Type |
Name |
Description |
System.String |
featureLayerName |
|
Implements
RemovePointsOfInterestSubLayer(PrefabItemOptions)
Declaration
public virtual void RemovePointsOfInterestSubLayer(PrefabItemOptions layer)
Parameters
Implements
RemovePointsOfInterestSubLayerWithName(String)
Declaration
public virtual void RemovePointsOfInterestSubLayerWithName(string poiLayerName)
Parameters
Type |
Name |
Description |
System.String |
poiLayerName |
|
Implements
SetLayerSource(VectorSourceType)
Change existing data source (TilesetId) with provided source.
Declaration
public virtual void SetLayerSource(VectorSourceType vectorSource)
Parameters
Type |
Name |
Description |
VectorSourceType |
vectorSource |
Data source (TilesetId) to use.
|
Implements
SetLayerSource(String)
Change existing data source (TilesetId) with provided source.
Declaration
public virtual void SetLayerSource(string vectorSource)
Parameters
Type |
Name |
Description |
System.String |
vectorSource |
Data source (TilesetId) to use.
|
Implements
SetLayerSourceWithOptimizedStyle(VectorSourceType, String, String, String)
Sets the layer source as Style-optimized vector tiles
Declaration
public virtual void SetLayerSourceWithOptimizedStyle(VectorSourceType vectorSource, string styleId, string modifiedDate, string styleName = null)
Parameters
Type |
Name |
Description |
VectorSourceType |
vectorSource |
Vector source.
|
System.String |
styleId |
Style-Optimized style id.
|
System.String |
modifiedDate |
Modified date.
|
System.String |
styleName |
Style name.
|
Implements
SetLayerSourceWithOptimizedStyle(String, String, String, String)
Sets the layer source as Style-optimized vector tiles
Declaration
public virtual void SetLayerSourceWithOptimizedStyle(string vectorSource, string styleId, string modifiedDate, string styleName = null)
Parameters
Type |
Name |
Description |
System.String |
vectorSource |
Vector source.
|
System.String |
styleId |
Style-Optimized style id.
|
System.String |
modifiedDate |
Modified date.
|
System.String |
styleName |
Style name.
|
Implements
SpawnPrefabAtGeoLocation(GameObject, Vector2d, Action<List<GameObject>>, Boolean, String)
Places a prefab at the specified LatLon on the Map.
Declaration
public virtual void SpawnPrefabAtGeoLocation(GameObject prefab, Vector2d LatLon, Action<List<GameObject>> callback = null, bool scaleDownWithWorld = true, string locationItemName = "New Location")
Parameters
Type |
Name |
Description |
GameObject |
prefab |
A Game Object Prefab.
|
Vector2d |
LatLon |
A Vector2d(Latitude Longitude) object
|
Action<List<GameObject>> |
callback |
|
System.Boolean |
scaleDownWithWorld |
|
System.String |
locationItemName |
|
SpawnPrefabAtGeoLocation(GameObject, Vector2d[], Action<List<GameObject>>, Boolean, String)
Places a prefab at all locations specified by the LatLon array.
Declaration
public virtual void SpawnPrefabAtGeoLocation(GameObject prefab, Vector2d[] LatLon, Action<List<GameObject>> callback = null, bool scaleDownWithWorld = true, string locationItemName = "New Location")
Parameters
Type |
Name |
Description |
GameObject |
prefab |
A Game Object Prefab.
|
Vector2d[] |
LatLon |
A Vector2d(Latitude Longitude) object
|
Action<List<GameObject>> |
callback |
|
System.Boolean |
scaleDownWithWorld |
|
System.String |
locationItemName |
|
SpawnPrefabByCategory(GameObject, LocationPrefabCategories, Int32, Action<List<GameObject>>, Boolean, String)
Places the prefab for supplied categories.
Declaration
public virtual void SpawnPrefabByCategory(GameObject prefab, LocationPrefabCategories categories = LocationPrefabCategories.AnyCategory, int density = 30, Action<List<GameObject>> callback = null, bool scaleDownWithWorld = true, string locationItemName = "New Location")
Parameters
Type |
Name |
Description |
GameObject |
prefab |
GameObject Prefab
|
LocationPrefabCategories |
categories |
LocationPrefabCategories For more than one category separate them by pipe
(eg: LocationPrefabCategories.Food | LocationPrefabCategories.Nightlife)
|
System.Int32 |
density |
Density controls the number of POIs on the map.(Integer value between 1 and 30)
|
Action<List<GameObject>> |
callback |
|
System.Boolean |
scaleDownWithWorld |
Should the prefab scale up/down along with the map game object?
|
System.String |
locationItemName |
Name of this location prefab item for future reference
|
SpawnPrefabByName(GameObject, String, Int32, Action<List<GameObject>>, Boolean, String)
Places the prefab at POI locations if its name contains the supplied string
GameObject Prefab
This is the string that will be checked against the POI name to see if is contained in it, and ony those POIs will be spawned
Density (Integer value between 1 and 30)
Name of this location prefab item for future reference
Should the prefab scale up/down along with the map game object?
Declaration
public virtual void SpawnPrefabByName(GameObject prefab, string nameString, int density = 30, Action<List<GameObject>> callback = null, bool scaleDownWithWorld = true, string locationItemName = "New Location")
Parameters
Type |
Name |
Description |
GameObject |
prefab |
|
System.String |
nameString |
|
System.Int32 |
density |
|
Action<List<GameObject>> |
callback |
|
System.Boolean |
scaleDownWithWorld |
|
System.String |
locationItemName |
|
UnbindAllEvents()
Declaration
public void UnbindAllEvents()
Update(LayerProperties)
Declaration
public void Update(LayerProperties properties)
Parameters
Implements
UpdateFactorySettings()
Declaration
public void UpdateFactorySettings()