Show / Hide Table of Contents

Class VectorLayer

Inheritance
System.Object
AbstractLayer
VectorLayer
Inherited Members
AbstractLayer.UpdateLayer
AbstractLayer.NotifyUpdateLayer(LayerUpdateArgs)
AbstractLayer.NotifyUpdateLayer(AbstractTileFactory, MapboxDataProperty, Boolean)
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
ILayer.IsLayerActive

LayerProperty

Declaration
public VectorLayerProperties LayerProperty { get; }
Property Value
Type Description
VectorLayerProperties

LayerSourceId

Declaration
public string LayerSourceId { get; }
Property Value
Type Description
System.String
Implements
ILayer.LayerSourceId

LayerType

Declaration
public MapLayerType LayerType { get; }
Property Value
Type Description
MapLayerType
Implements
ILayer.LayerType

Methods

AddCustomFeatureSubLayer(String, String)

Declaration
public virtual void AddCustomFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService)
Parameters
Type Name Description
System.String assignedSubLayerName
System.String dataLayerNameInService
Implements
IVectorDataLayer.AddCustomFeatureSubLayer(String, String)

AddFeatureSubLayer(VectorSubLayerProperties)

Declaration
public virtual void AddFeatureSubLayer(VectorSubLayerProperties subLayerProperties)
Parameters
Type Name Description
VectorSubLayerProperties subLayerProperties
Implements
IVectorDataLayer.AddFeatureSubLayer(VectorSubLayerProperties)

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
IVectorDataLayer.AddLayerSource(String)

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
IVectorDataLayer.AddLineFeatureSubLayer(String, String, Single)

AddPointFeatureSubLayer(String, String)

Declaration
public virtual void AddPointFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService)
Parameters
Type Name Description
System.String assignedSubLayerName
System.String dataLayerNameInService
Implements
IVectorDataLayer.AddPointFeatureSubLayer(String, String)

AddPointsOfInterestSubLayer(PrefabItemOptions)

Declaration
public virtual void AddPointsOfInterestSubLayer(PrefabItemOptions poiLayerProperties)
Parameters
Type Name Description
PrefabItemOptions poiLayerProperties
Implements
IVectorDataLayer.AddPointsOfInterestSubLayer(PrefabItemOptions)

AddPolygonFeatureSubLayer(String, String)

Declaration
public virtual void AddPolygonFeatureSubLayer(string assignedSubLayerName, string dataLayerNameInService)
Parameters
Type Name Description
System.String assignedSubLayerName
System.String dataLayerNameInService
Implements
IVectorDataLayer.AddPolygonFeatureSubLayer(String, String)

DisableVectorFeatureProcessingWithCoroutines()

Declaration
public void DisableVectorFeatureProcessingWithCoroutines()
Implements
IVectorDataLayer.DisableVectorFeatureProcessingWithCoroutines()

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
IVectorDataLayer.EnableVectorFeatureProcessingWithCoroutines(Int32)

FindFeatureSubLayerWithName(String)

Declaration
public virtual VectorSubLayerProperties FindFeatureSubLayerWithName(string featureLayerName)
Parameters
Type Name Description
System.String featureLayerName
Returns
Type Description
VectorSubLayerProperties
Implements
IVectorDataLayer.FindFeatureSubLayerWithName(String)

FindPointsofInterestSubLayerWithName(String)

Declaration
public virtual PrefabItemOptions FindPointsofInterestSubLayerWithName(string poiLayerName)
Parameters
Type Name Description
System.String poiLayerName
Returns
Type Description
PrefabItemOptions
Implements
IVectorDataLayer.FindPointsofInterestSubLayerWithName(String)

GetAllFeatureSubLayers()

Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllFeatureSubLayers()
Returns
Type Description
IEnumerable<VectorSubLayerProperties>

GetAllLineFeatureSubLayers()

Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllLineFeatureSubLayers()
Returns
Type Description
IEnumerable<VectorSubLayerProperties>

GetAllPointFeatureSubLayers()

Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllPointFeatureSubLayers()
Returns
Type Description
IEnumerable<VectorSubLayerProperties>

GetAllPointsOfInterestSubLayers()

Declaration
public virtual IEnumerable<PrefabItemOptions> GetAllPointsOfInterestSubLayers()
Returns
Type Description
IEnumerable<PrefabItemOptions>

GetAllPolygonFeatureSubLayers()

Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetAllPolygonFeatureSubLayers()
Returns
Type Description
IEnumerable<VectorSubLayerProperties>

GetFeatureSubLayerAtIndex(Int32)

Declaration
public virtual VectorSubLayerProperties GetFeatureSubLayerAtIndex(int i)
Parameters
Type Name Description
System.Int32 i
Returns
Type Description
VectorSubLayerProperties
Implements
IVectorDataLayer.GetFeatureSubLayerAtIndex(Int32)

GetFeatureSubLayerByQuery(Func<VectorSubLayerProperties, Boolean>)

Declaration
public virtual IEnumerable<VectorSubLayerProperties> GetFeatureSubLayerByQuery(Func<VectorSubLayerProperties, bool> query)
Parameters
Type Name Description
Func<VectorSubLayerProperties, System.Boolean> query
Returns
Type Description
IEnumerable<VectorSubLayerProperties>

GetPointsOfInterestSubLayerAtIndex(Int32)

Declaration
public virtual PrefabItemOptions GetPointsOfInterestSubLayerAtIndex(int i)
Parameters
Type Name Description
System.Int32 i
Returns
Type Description
PrefabItemOptions
Implements
IVectorDataLayer.GetPointsOfInterestSubLayerAtIndex(Int32)

GetPointsOfInterestSubLayerByQuery(Func<PrefabItemOptions, Boolean>)

Declaration
public virtual IEnumerable<PrefabItemOptions> GetPointsOfInterestSubLayerByQuery(Func<PrefabItemOptions, bool> query)
Parameters
Type Name Description
Func<PrefabItemOptions, System.Boolean> query
Returns
Type Description
IEnumerable<PrefabItemOptions>

GetTileJsonData()

Declaration
public virtual TileJsonData GetTileJsonData()
Returns
Type Description
TileJsonData
Implements
IVectorDataLayer.GetTileJsonData()

Initialize()

Declaration
public void Initialize()
Implements
ILayer.Initialize()

Initialize(LayerProperties)

Declaration
public void Initialize(LayerProperties properties)
Parameters
Type Name Description
LayerProperties properties
Implements
ILayer.Initialize(LayerProperties)

Remove()

Declaration
public void Remove()
Implements
ILayer.Remove()

RemoveFeatureSubLayer(VectorSubLayerProperties)

Declaration
public virtual void RemoveFeatureSubLayer(VectorSubLayerProperties layer)
Parameters
Type Name Description
VectorSubLayerProperties layer
Implements
IVectorDataLayer.RemoveFeatureSubLayer(VectorSubLayerProperties)

RemoveFeatureSubLayerWithName(String)

Declaration
public virtual void RemoveFeatureSubLayerWithName(string featureLayerName)
Parameters
Type Name Description
System.String featureLayerName
Implements
IVectorDataLayer.RemoveFeatureSubLayerWithName(String)

RemovePointsOfInterestSubLayer(PrefabItemOptions)

Declaration
public virtual void RemovePointsOfInterestSubLayer(PrefabItemOptions layer)
Parameters
Type Name Description
PrefabItemOptions layer
Implements
IVectorDataLayer.RemovePointsOfInterestSubLayer(PrefabItemOptions)

RemovePointsOfInterestSubLayerWithName(String)

Declaration
public virtual void RemovePointsOfInterestSubLayerWithName(string poiLayerName)
Parameters
Type Name Description
System.String poiLayerName
Implements
IVectorDataLayer.RemovePointsOfInterestSubLayerWithName(String)

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
IVectorDataLayer.SetLayerSource(VectorSourceType)

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
ILayer.SetLayerSource(String)

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
IVectorDataLayer.SetLayerSourceWithOptimizedStyle(VectorSourceType, String, String, String)

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
IVectorDataLayer.SetLayerSourceWithOptimizedStyle(String, String, String, String)

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
Type Name Description
LayerProperties properties
Implements
ILayer.Update(LayerProperties)

UpdateFactorySettings()

Declaration
public void UpdateFactorySettings()
Back to top © 2017 Mapbox