Documentation for MapLib/Layer.swift

class Layer

Map layer class

var name : String

Layer name read/write property

var visible : Bool

Layer visible read/write property

var dataSource : Object

Layer data source readonly propertry

var style : JsonObject

Layer style in Json format read/write property

var styleName : String

Layer style name (type) read/write property. The supported styles are: - simplePoint - primitivePoint - simpleLine - simpleFill - simpleFillBordered - marker The style connected with geometry type of vector layer. If you set style of incompatible type the layer will not see on map.

func identify(envelope: Envelope, limit: Int = 0) [Feature]

Find features in vector layer that intersect envelope

Parameters
  • envelope – Envelope to test on intersection

  • limit – The return feature limit

Returns

The array of features from datasource in layer

func select(features: [Feature] = [])

Hightlight feature in layer. Change the feature style to selection style. The selection style mast be set in map.

Parameters
  • features – Features array. If array is empty the current hightlighted features will get layer style and drawn not hightlited.