/
Marker metadata

Marker metadata

It’s possible to add arbitrary metadata to a marker using the setMetadata(String key, Object value) method or retrieve previously saved metadata using the getMetadata(String key).

Example:

void handleGeoMarkerClick(GeoMarker geoMarker) { Integer clickCount = (Integer) geoMarker.getMetadata("click_count", 0); ++clickCount; geoMarker.setMetadata("click_count", clickCount); Log.d("GeoMarker", String.format("GeoMarker clicked %d times", clickCount)); }

To delete a value associated with a key use deleteMetadata(String key), and to remove all metadata associated with a marker, use clearMetadata().

Related content

Marker clusters
Marker clusters
More like this
Marker clusters (v2.1.x - iOS)
Marker clusters (v2.1.x - iOS)
More like this
Geo Items (v2.1.x – 2.2.x)
Geo Items (v2.1.x – 2.2.x)
More like this
Geo Items
Geo Items
More like this
Interacting with points of interest
Interacting with points of interest
More like this
Map (v2.1.x - Android)
Map (v2.1.x - Android)
More like this