GeoJSONDelegate
A delegate object that controls a GeoJSON import to override default behavior and provide custom style.
Declaration
interface GeoJSONDelegateOverview
The delegate object provides hooks into the key moments in the GeoJSON import process. When you pass a delegate object to the importGeoJSON(data, callback) method, you can:
Modify or replace annotations and overlays before MapKit JS adds them to the ItemCollection object.
Override the default GeoJSON mapping behavior.
Provide custom styling by implementing styleForOverlay(overlay, geoJSON).
Receive feedback on the result from importing GeoJSON data.
Topics
Overriding items
itemForFeature(item, geoJSON)itemForFeatureCollection(itemCollection, geoJSON)itemForLineString(overlay, geoJSON)itemForMultiLineString(itemCollection, geoJSON)itemForPoint(coordinate, geoJSON)itemForMultiPoint(itemCollection, geoJSON)itemForPolygon(overlay, geoJSON)itemForMultiPolygon(itemCollection, geoJSON)styleForOverlay(overlay, geoJSON)