Contents

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 feature or geometry object.

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