Import GeoJSON Markers
This example demonstrates how to import markers from a GeoJSON file and display them on the map as a clustered marker collection. A campsites.geojson asset is read at startup and added to the map as a marker collection, using a custom tent icon for each campsite and a red circle with a count for clustered groups. Tapping a cluster opens a panel listing every campsite it contains; tapping a single marker highlights it on the map and centers the camera on it. When a campsite's details are present in the GeoJSON file, the list item exposes an info button that opens a bottom sheet with its photo and description; campsites without these details simply omit the button.
Importing the GeoJSON File
The GeoJSON asset is read off the main thread, then handed to the SDK thread for registration. addGeoJsonAsMarkerCollection parses the data and returns one or more marker collections, which are added to the map's marker preferences together with a MarkerCollectionRenderSettings. Those settings define the per-marker tent icon, its size, and the cluster ("points group") icons and labels used when markers are densely packed.
Reading the Extra Properties
The SDK's Marker object exposes only the marker name and coordinates, not the richer GeoJSON properties. To keep the description and photo available, the file is parsed once into a map keyed by "lat,lon" (rounded to ~1 m precision). When a marker is later selected, its coordinates are used to look up the matching description and image URL.
Handling Marker Selection
A touch on the map sets the cursor position and reads the markers under it. A tapped marker may be a single campsite or a cluster, so the group head and its components are gathered, deduplicated by ID, and turned into display items shown in the marker panel.
Highlighting a Campsite on the Map
Selecting a campsite from the list highlights it with a search-result pin and centers the camera on its coordinates, animating into the free space not covered by the panel.




