Contents

itemForPoint(coordinate, geoJSON)

Overrides a point.

Declaration

itemForPoint?(
        coordinate: Coordinate,
        geoJSON: GeoJSONTypes.Point,
    ): Item | null;

Parameters

  • coordinate:

    A GeoJSON Point generates the coordinate. You can use the coordinate to instantiate an item to return.

  • geoJSON:

    The original GeoJSON object for the Point. This object may be a simple Point or a Feature with the Point geometry type.

Return Value

An array of map items.

Discussion

MapKit JS calls this method for every Point object. For a MultiPoint object or for a GeometryCollection of Points and MultiPoints, the framework calls itemForPoint(coordinate, geoJSON) for each individual Point object.

See Also

Overriding items