flutter_mapkit_js library

Classes

MapDisplayEvent
Class representing a map display event, including its type and timing.
MapKitMap
A Flutter widget that embeds a MapKit JS map.
MapKitMapController
Concrete implementation of a MapKit map controller.
MapKitMapControllerBase
Abstract base class for MapKit map controllers.

Enums

MapDisplayEventType
Enum representing different types of map display events.
MapEventTiming
Enum representing the timing of a map event.

Extension Types

AddressFilter
An object that filters which address options to include or exclude in search results.
Annotation
The base annotation object for creating custom annotations.
AnnotationCalloutDelegate
Methods for customizing the behavior and appearance of an annotation callout.
AnnotationConstructorOptions
An object that contains options for creating annotation features.
BoundingRegion
A rectangular area on a map, which coordinates of the rectangle’s northeast and southwest corners define.
CameraBoundaryDescription
An object literal containing at least one property defining an area on the map.
CameraZoomRange
A minimum and maximum camera distance, in meters, from the center of the map.
CameraZoomRangeConstructorOptions
Initialization options for the camera zoom range.
CameraZoomRangeLiteral
An object literal containing minimum and maximum camera distance in meters.
CircleOverlay
A circular overlay with a configurable radius that centers on a specific geographic coordinate.
Coordinate
An object representing the latitude and longitude for a point on the Earth’s surface.
CoordinateRegion
A rectangular area on a map that a center coordinate and a span define, in degrees of latitude and longitude.
CoordinateSpan
The width and height of a map region.
Directions
An object that provides directions and estimated travel time based on the options you provide.
DirectionsConstructorOptions
Options that you may provide when creating a directions object.
DirectionsRequest
The requested start and end points for a route, as well as the planned mode of transportation.
DirectionsResponse
The directions and estimated travel time that return for a route.
EtaRequestOptions
The options you may provide for requesting estimated arrival times.
EtaResponse
The estimated arrival times for a set of destinations.
EtaResult
The mode of transportation, distance, and travel time estimates for a single destination.
FetchDelegate
An object to pass to a map feature annotation to fetch place objects instead of a callback function.
FetchResponse
An object that contains data MapKit JS returns from a place search request.
Geocoder
A geocoder that converts human-readable addresses to geographic coordinates, and vice versa.
GeocoderConstructorOptions
Initialization options for geocoder objects.
GeocoderLookupOptions
Options that constrain geocoder lookup results to a specific area or a specific language.
GeocoderResponse
The response from a geocoder lookup or reverse lookup.
GeocoderReverseLookupOptions
An option that constrains reverse lookup results to a specific language.
GeoJSONDelegate
A delegate object that controls a GeoJSON import to override default behavior and provide custom style.
ImageAnnotation
A customized annotation with image resources that you provide.
ImageAnnotationConstructorOptions
An object containing options for creating an image annotation.
ImageDelegate
An object you use to specify image URLs.
InitializationEvent
Respond to events that trigger when MapKit JS initializes.
ItemCollection
A tree structure containing annotations, overlays, and nested item collection objects.
LineGradient
A line that displays with a gradient along the length of the line.
Map
An embeddable interactive map that you add to a webpage.
MapConstructorOptions
An object that contains options for creating a map’s features.
MapFeatureAnnotation
An object that represents a map feature that the user selects.
MapFeatureAnnotationGlyphImage
An object that describes map feature annotation images.
MapKitInitOptions
Initialization options for MapKit JS.
MapPoint
A location, in map units, of a point on the Earth’s surface projected onto a 2D map.
MapRect
A rectangular region, in map units, of a two-dimensional map projection.
MapShowItemsOptions
Options that determine the map parameters to use when showing items.
MapSize
A pair of values, in map units, that define the width and height of a rectangular area of a map projection.
MarkerAnnotation
An annotation that displays a balloon-shaped marker at the designated location.
MarkerAnnotationConstructorOptions
An object containing the options that create a marker annotation.
Overlay
An abstract base object that defines the methods and attributes for map overlays.
OverlayOptions
A dictionary of options that determines an overlay’s data, and indicates whether it’s visible, in an enabled state, and in a selected state.
Padding
The values that define content padding within the map view frame.
PaddingConstructorOptions
Initial values of the edge insets for padding.
Place
A place object that returns from a geocoder lookup, a reverse lookup, or a fetch request for points of interest.
PlaceAnnotation
An annotation for a place.
PlaceDetail
An interactive view that displays information about a place.
PlaceLookup
An object that provides the ability to look up place information for a specified Place ID.
PlaceLookupOptions
The options for creating a place lookup.
PlaceSelectionAccessory
The accessory that conveys information about a place associated with an annotation.
PlaceSelectionAccessoryOptions
The options for selection accessories.
PointOfInterestFilter
A filter for determining the points of interest to include or exclude on a map or in a local search.
PointsOfInterestSearch
An object that fetches points of interest within a specified region.
PointsOfInterestSearchDelegate
An object or callback function that MapKit JS calls when fetching points of interest.
PointsOfInterestSearchOptions
Options that you may provide when you create a points of interest search.
PointsOfInterestSearchResponse
The result of a request used to fetch points of interest.
PolygonOverlay
An overlay consisting of one or more points that forms a closed shape.
PolylineOverlay
An overlay of connected line segments that don’t form a closed shape.
Route
Information about a route, including step-by-step instructions, distance, and estimated travel time.
RouteStep
A single step of the route between the requested start and end points.
An object that retrieves map-based search results for a user-entered query.
SearchAutoCompleteOptions
Options you provide to constrain an autocomplete request.
SearchAutocompleteResponse
An object containing the response from an autocomplete request.
SearchAutocompleteResult
The result of an autocomplete query, including display lines and a coordinate.
SearchConstructorOptions
Options you provide when you create a search object.
SearchDelegate
An object or callback function the framework calls when performing a search or an autocomplete request.
SearchOptions
An object that contains options to adjust a search.
SearchResponse
The result of a search, including the original search query, the bounding region, and a list of places that match the query.
Style
A set of observable attributes for overlays, including the color and opacity of strokes and fills, and line styles.
StyleConstructorOptions
Initial values of options for applying style to overlays.
StylesOverlayOptions
An observable set of style attributes for an overlay.
TileOverlay
An overlay that covers an area of the map with bitmapped tiles.
TileOverlayConstructorOptions
Attributes for initializing a tile overlay, including minimum and maximum zoom, opacity, and custom data.

Properties

build String
The build string.
getter/setter pair
language String
A language ID indicating the selected language.
getter/setter pair
Libraries JSArray<JSString>
The list of available libraries.
getter/setter pair
loadedLibraries JSArray<JSString>
A string that describes the list of loaded libraries.
getter/setter pair
maps JSArray<Map>
An array that automatically adds and removes maps as the framework creates and destroys them.
getter/setter pair
placeDetails JSArray<PlaceDetail>
A list of all user-created place detail objects that are currently active on a page.
getter/setter pair
version String
The version of MapKit JS.
getter/setter pair

Functions

addEventListener(String type, JSFunction listener, JSObject? thisObject) → void
Subscribes a listener function to an event type.
importGeoJSON(JSAny data, JSAny callback) JSAny
Converts imported GeoJSON data to MapKit JS items.
init(MapKitInitOptions options) → void
Initializes MapKit JS by providing an authorization callback function and optional language.
load(JSAny libraries) → void
Tells MapKit JS which libraries to load.
loadMapKitJS(String tokenID, {String version = '5.x.x', String libraries = 'map'}) Future<Event>
Load MapKitJS Script
removeEventListener(String type, JSFunction listener, JSObject? thisObject) → void
Unsubscribes a listener function from an event type.
setupMapKitJS(GetTokenCallback getToken, {MapInitializationCallback? initializationCallback, List<String>? libraries}) Future<void>
Sets up MapKit JS with the provided token callback and optional initialization callback and libraries.

Typedefs

AddressCategory = JSString
CollisionMode = JSString
ColorSchemes = JSString
DisplayPriority = JSString
Distances = JSString
FeatureVisibility = JSString
GetTokenCallback = Future<String> Function()
Callback signature for obtaining a MapKit token.
LoadPriorities = JSString
MapCreatedCallback = void Function(MapKitMapController controller)
Callback type for when the MapKit map is created.
MapFeatureType = JSString
MapInitializationCallback = void Function(String type, String status)
Callback signature for handling map initialization events.
MapTypes = JSString
PlaceDatailOptions = JSAny
PointOfInterestCategory = JSString
RegionPriority = JSString
Styles = JSString
Transport = JSString