Skip to content

Instantly share code, notes, and snippets.

@lagner
Created June 4, 2021 12:37
Show Gist options
  • Save lagner/b71fa08bc2da4c53276998c9dd8811d8 to your computer and use it in GitHub Desktop.
Save lagner/b71fa08bc2da4c53276998c9dd8811d8 to your computer and use it in GitHub Desktop.
let mapObjectSource = GeometryMapObjectSourceBuilder(context: self.sdk.context)
let mapObject = GeometryMapObjectBuilder()
.setGeometry(
geometry: PointGeometry(
point: GeoPoint(latitude: Arcdegree(value: 54), longitude: Arcdegree(value: 37))
)
)
.setObjectAttribute(name: "db_sublayer", value: .string("s_dvg_pin_regular_ini"))
.createObject()
_ = mapObjectSource.addObject(item: mapObject)
_ = mapObjectSource.setSourceAttribute(name: "db_sublayer", value: .string("cluster_with_counter"))
let geoMapObjectSource = mapObjectSource
.createSourceWithClustering(distanceMm: ScreenDistance(value: 5.0), maxZoom: Zoom(18.0))
self.makeMapFactory().map.addSource(source: geoMapObjectSource)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment