Contents

GeoJSONImporterCallback

A callback function that MapKit JS invokes when importing a GeoJSON object.

Declaration

type GeoJSONImporterCallback = (
    ...args:
        | [GeoJSONImportError, GeoJSONTypes.GeoJSON | undefined]
        | [null, ItemCollection]
) => void;

Discussion

MapKit JS invokes this callback with two arguments, error on failure and result on success, as follows:

error

A GeoJSONImportError that contains an error code and a descriptive message.

result

An ItemCollection in which MapKit JS stores the raw GeoJSON to use for generating the object in the object’s data property.

See Also

Geographical features