styleForOverlay(overlay, geoJSON)
Overrides the style of overlays.
Declaration
styleForOverlay?(
overlay: PolylineOverlay | PolygonOverlay,
geoJSON: GeoJSONTypes.LineString | GeoJSONTypes.Polygon,
): Style;Parameters
- overlay:
The overlay to style.
- geoJSON:
The original GeoJSON for the
featureorgeometryobject.
Return Value
This method returns a Style object for the provided overlay.
Discussion
MapKit JS calls this method for each overlay, and after each call to itemForPoint(coordinate, geoJSON) and itemForPolygon(overlay, geoJSON).
See Also
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)