<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/mapkit",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "cl/mapkit"
  },
  "title" : "mapkit"
}
-->

# mapkit

The JavaScript API for embedding Apple Maps on your website.

```
class MapKit extends EventTarget
```

## Overview

The [`mapkit`](/documentation/MapKitJS/mapkit) object is the main namespace for the MapKit JS framework. Similar to <doc://com.apple.documentation/documentation/MapKit> for apps, you can use MapKit JS to display interactive maps with customized annotations and overlays, and provide directions and search services. Your app can supply step-by-step navigation, and help a user find a location by autocompleting a search query.

MapKit JS lets you customize the look of your map. You can choose style details for overlays and annotations, display a standard street map or one that uses satellite imagery, and adjust the visibility of map controls. Additionally, you can customize a map’s behavior by providing event handlers that cause the map to scroll or respond when users select items. You can also enable or disable panning, zooming, and rotation.

## Topics

### Initialization

[Handling initialization events](/documentation/MapKitJS/handling-initialization-events)

Respond to events that trigger when MapKit JS initializes.

[`init()`](/documentation/MapKitJS/mapkit/init)

Initializes MapKit JS by providing an authorization callback function and optional language.

[`MapKitInitializationOptions`](/documentation/MapKitJS/MapKitInitializationOptions)

Initialization options for MapKit JS.

[`Libraries`](/documentation/MapKitJS/mapkit/Libraries)

The list of available libraries.

[`loadedLibraries`](/documentation/MapKitJS/mapkit/loadedLibraries)

A string that describes the list of loaded libraries.

[`load()`](/documentation/MapKitJS/mapkit/load)

Tells MapKit JS which libraries to load.

### Maps

[`Map`](/documentation/MapKitJS/Map)

An embeddable interactive map that you add to a webpage.

[`maps`](/documentation/MapKitJS/mapkit/maps)

An array that automatically adds and removes maps as the framework creates and destroys them.

### Annotations and overlays

[Annotations](/documentation/MapKitJS/annotations)

Create annotations to add indicators and additional details for specific locations on a map.

[Overlays](/documentation/MapKitJS/overlays)

Create overlays to highlight geographic regions or paths.

### Geocoder

[`Geocoder`](/documentation/MapKitJS/Geocoder)

A geocoder that converts human-readable addresses to geographic coordinates, and vice versa.

### Search

[`AddressFilter`](/documentation/MapKitJS/AddressFilter)

An object that filters which address options to include or exclude in search results.

[`Search`](/documentation/MapKitJS/Search)

An object that retrieves map-based search results for a user-entered query.

### Points of interest

[`filterExcludingAllCategories`](/documentation/MapKitJS/mapkit/filterExcludingAllCategories)

A value that excludes all point-of-interest categories.

[`filterIncludingAllCategories`](/documentation/MapKitJS/mapkit/filterIncludingAllCategories)

A value that includes all point-of-interest categories.

[`PointOfInterestFilter`](/documentation/MapKitJS/PointOfInterestFilter)

A filter for determining the points of interest to include or exclude on a map or in a local search.

[`PointsOfInterestSearch`](/documentation/MapKitJS/PointsOfInterestSearch)

An object that fetches points of interest within a specified region.

[`MapFeatureAnnotation`](/documentation/MapKitJS/MapFeatureAnnotation)

An object that represents a map feature that the user selects.

[`MapFeatureAnnotationGlyphImage`](/documentation/MapKitJS/MapFeatureAnnotationGlyphImage)

An object that describes map feature annotation images.

### Directions

[`Directions`](/documentation/MapKitJS/Directions)

An object that provides directions and estimated travel time based on the options you provide.

### Enumerations

[`AddressCategory`](/documentation/MapKitJS/AddressCategory)

The categories of address components that users can search for with an address filter.

[`AnnotationCollisionMode`](/documentation/MapKitJS/AnnotationCollisionMode)

Constants that indicate the collision mode for an annotation.

[`AnnotationDisplayPriority`](/documentation/MapKitJS/AnnotationDisplayPriority)

Constants that indicate the priority for displaying annotations on the map.

[`ColorScheme`](/documentation/MapKitJS/ColorScheme)

Constants that indicate the color scheme of the map or a place detail.

[`DistanceUnitSystem`](/documentation/MapKitJS/DistanceUnitSystem)

Constants that indicate the system of measurement that displays on the map.

[`FeatureVisibility`](/documentation/MapKitJS/FeatureVisibility)

Constants indicating the visibility of different adaptive map features.

[`MapFeatureType`](/documentation/MapKitJS/MapFeatureType)

Values that describe the feature type of a point of interest.

[`MapLoadPriority`](/documentation/MapKitJS/MapLoadPriority)

Constants that prioritize the visibility of specific map features during map loading.

[`MapType`](/documentation/MapKitJS/MapType)

Constants representing the type of map to display.

[`PointOfInterestCategory`](/documentation/MapKitJS/PointOfInterestCategory)

Point-of-interest categories.

[`RegionPriority`](/documentation/MapKitJS/RegionPriority)

A value that indicates the importance of the configured region.

[`TransportType`](/documentation/MapKitJS/TransportType)

The modes of transportation.

### Map view customization

[`Padding`](/documentation/MapKitJS/Padding)

The values that define content padding within the map view frame.

[`PaddingData`](/documentation/MapKitJS/PaddingData)

A plain object representation of edge inset values.

### Geographical features

[`importGeoJSON()`](/documentation/MapKitJS/mapkit/importGeoJSON)

Converts imported GeoJSON data to MapKit JS compatible items.

[`GeoJSONDelegate`](/documentation/MapKitJS/GeoJSONDelegate)

A delegate object that controls a GeoJSON import to override default behavior and provide custom style.

[`Item`](/documentation/MapKitJS/Item)

A type alias that represents all objects that the framework sets in an item collection.

[`ItemCollection`](/documentation/MapKitJS/ItemCollection)

A tree structure containing annotations, overlays, and nested item collection objects.

[`GeoJSONImporterCallback`](/documentation/MapKitJS/GeoJSONImporterCallback)

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

[`GeoJSONImportError`](/documentation/MapKitJS/GeoJSONImportError)

An error object that indicates an error occurred while importing a GeoJSON object.

[Displaying Indoor Maps with MapKit JS](/documentation/MapKitJS/displaying-indoor-maps-with-mapkit-js)

Use the Indoor Mapping Data Format (IMDF) to show an indoor map with custom overlays and points of interest in your browser.

### Exploring at street level

[`LookAround`](/documentation/MapKitJS/LookAround)

A view that allows someone to see a street level view of a place.

[`LookAroundOptions`](/documentation/MapKitJS/LookAroundOptions)

Options for initializing a LookAround view.

[`LookAroundPreview`](/documentation/MapKitJS/LookAroundPreview)

A class that renders a preview of a Look Around view.

[`LookAroundPreviewOptions`](/documentation/MapKitJS/LookAroundPreviewOptions)

Options for initializing a LookAroundPreview object.

[`LookAroundScene`](/documentation/MapKitJS/LookAroundScene)

Object that represents the current location of the view.

[`CommonLookAroundOptions`](/documentation/MapKitJS/CommonLookAroundOptions)

Options that control the behavior of Look Around views.

[`AbstractLookAround`](/documentation/MapKitJS/AbstractLookAround)

An abstract class that provides a common interface for Look Around views.

[`lookAroundViews`](/documentation/MapKitJS/mapkit/lookAroundViews)

A list of all the Look Around objects that are currently active on a page.

### Places

[`Place`](/documentation/MapKitJS/Place)

A place object that returns from a geocoder lookup, a reverse lookup, or a fetch request for points of interest.

[`PlaceLookup`](/documentation/MapKitJS/PlaceLookup)

An object that provides the ability to look up place information for a specified Place ID.

[`placeDetails`](/documentation/MapKitJS/mapkit/placeDetails)

A list of all place detail objects that are currently active on a page.

[`PlaceSelectionAccessoryOptions`](/documentation/MapKitJS/PlaceSelectionAccessoryOptions)

The options for selection accessories.

[`PlaceAnnotation`](/documentation/MapKitJS/PlaceAnnotation)

An annotation for a place.

[`PlaceDetail`](/documentation/MapKitJS/PlaceDetail)

An interactive view that displays information about a place.

[`PlaceSelectionAccessory`](/documentation/MapKitJS/PlaceSelectionAccessory)

The accessory that conveys information about a place associated with an annotation.

### Map coordinates

[`Coordinate`](/documentation/MapKitJS/Coordinate)

An object representing the latitude and longitude for a point on the Earth’s surface.

[`CoordinateData`](/documentation/MapKitJS/CoordinateData)

A plain object representation of a coordinate.

[`CoordinateRegion`](/documentation/MapKitJS/CoordinateRegion)

A rectangular area on a map that a center coordinate and a span define, in degrees of latitude and longitude.

[`CoordinateRegionData`](/documentation/MapKitJS/CoordinateRegionData)

A plain object representation of a coordinate region.

[`CoordinateSpan`](/documentation/MapKitJS/CoordinateSpan)

The width and height of a map region.

[`CoordinateSpanData`](/documentation/MapKitJS/CoordinateSpanData)

A plain object representation of a coordinate span.

[`BoundingRegion`](/documentation/MapKitJS/BoundingRegion)

A rectangular area on a map, which coordinates of the rectangle’s northeast and southwest corners define.

### Map units

[`MapPoint`](/documentation/MapKitJS/MapPoint)

A location, in map units, of a point on the Earth’s surface projected onto a 2D map.

[`MapPointData`](/documentation/MapKitJS/MapPointData)

A plain object representation of a map point in map units.

[`MapRect`](/documentation/MapKitJS/MapRect)

A rectangular region, in map units, of a two-dimensional map projection.

[`MapRectData`](/documentation/MapKitJS/MapRectData)

A plain object representation of a rectangular region, in map units, of a two-dimensional map projection.

[`MapSize`](/documentation/MapKitJS/MapSize)

A pair of values, in map units, that define the width and height of a rectangular area of a map projection.

[`MapSizeData`](/documentation/MapKitJS/MapSizeData)

A plain object representation of dimensions in map units.

[`CameraZoomRange`](/documentation/MapKitJS/CameraZoomRange)

A minimum and maximum camera distance, in meters, from the center of the map.

[`CameraZoomRangeData`](/documentation/MapKitJS/CameraZoomRangeData)

A plain object representation of a camera zoom range.

### Version and language

[`language`](/documentation/MapKitJS/mapkit/language)

A language ID indicating the selected language.

[`build`](/documentation/MapKitJS/mapkit/build)

The build string.

[`version`](/documentation/MapKitJS/mapkit/version)

The version of MapKit JS.

### Response objects

### Setting images

[`ImageHashObject`](/documentation/MapKitJS/ImageHashObject)

An object that defines a set of images URLs for different scales.

[`ImageDelegate`](/documentation/MapKitJS/ImageDelegate)

An object you use to provide images for annotations.

[`ImageSource`](/documentation/MapKitJS/ImageSource)

A union type that represents image sources that the framework can use for annotations and tile overlays.

### Service

[`Service`](/documentation/MapKitJS/Service)

An abstract class that provides common interfaces for service objects.

[`RequestError`](/documentation/MapKitJS/RequestError)

The error that a service method’s returned promise rejects with when a request fails.

### Deprecated

[`MapKitEvent`](/documentation/MapKitJS/MapKitEvent)

A generic MapKit JS event object.

[`MapKitEventListener`](/documentation/MapKitJS/MapKitEventListener)

A type alias that represents a function or an object that receives a MapKit event.

[`MapKitEventTarget`](/documentation/MapKitJS/MapKitEventTarget)

An abstract class that defines the interface for objects that can dispatch events.

### Namespace properties

[`AddressCategory`](/documentation/MapKitJS/mapkit/AddressCategory)

An accessor for the address category enumeration.

[`AddressFilter`](/documentation/MapKitJS/mapkit/AddressFilter)

The getter to use to access the address filter class.

[`Annotation`](/documentation/MapKitJS/mapkit/Annotation)

The getter to use to for access the annotation class.

[`AnnotationCollisionMode`](/documentation/MapKitJS/mapkit/AnnotationCollisionMode)

An accessor for the annotation collision mode enumeration.

[`AnnotationDisplayPriority`](/documentation/MapKitJS/mapkit/AnnotationDisplayPriority)

An accessor for the annotation display priority enumeration.

[`BoundingRegion`](/documentation/MapKitJS/mapkit/BoundingRegion)

The getter to use to access the the bounding region class.

[`CameraZoomRange`](/documentation/MapKitJS/mapkit/CameraZoomRange)

The getter to use to access the camera zoom range class.

[`CircleOverlay`](/documentation/MapKitJS/mapkit/CircleOverlay)

The getter to use to access the circle overlay class.

[`ColorScheme`](/documentation/MapKitJS/mapkit/ColorScheme)

An accessor for the color scheme enumeration.

[`Coordinate`](/documentation/MapKitJS/mapkit/Coordinate)

The getter to use to access the coordinate class.

[`CoordinateRegion`](/documentation/MapKitJS/mapkit/CoordinateRegion)

The getter to use to access the coordinate region class.

[`CoordinateSpan`](/documentation/MapKitJS/mapkit/CoordinateSpan)

The getter to use to access the coordinate span class.

[`Directions`](/documentation/MapKitJS/mapkit/Directions)

The getter to use to access the directions class.

[`DistanceUnitSystem`](/documentation/MapKitJS/mapkit/DistanceUnitSystem)

An accessor for the distance unit system enumeration.

[`FeatureVisibility`](/documentation/MapKitJS/mapkit/FeatureVisibility)

An accessor for the feature visibility enumeration.

[`Geocoder`](/documentation/MapKitJS/mapkit/Geocoder)

The getter to use to access the geocoder class.

[`ImageAnnotation`](/documentation/MapKitJS/mapkit/ImageAnnotation)

The getter to use to access the image annotation class.

[`LineGradient`](/documentation/MapKitJS/mapkit/LineGradient)

The getter to use to access the line gradient class.

[`LookAround`](/documentation/MapKitJS/mapkit/LookAround)

The getter to use to access the look around class.

[`LookAroundPreview`](/documentation/MapKitJS/mapkit/LookAroundPreview)

The getter to use to access the look around preview class.

[`LookAroundScene`](/documentation/MapKitJS/mapkit/LookAroundScene)

The getter to use to access the look around scene class.

[`Map`](/documentation/MapKitJS/mapkit/Map)

The getter to use to access the map view class.

[`MapFeatureAnnotation`](/documentation/MapKitJS/mapkit/MapFeatureAnnotation)

The getter to use to access the map feature annotation class.

[`MapFeatureType`](/documentation/MapKitJS/mapkit/MapFeatureType)

An accessor for the map feature type enumeration.

[`MapLoadPriority`](/documentation/MapKitJS/mapkit/MapLoadPriority)

An accessor for the map load priority enumeration.

[`MapPoint`](/documentation/MapKitJS/mapkit/MapPoint)

The getter to use to access the map point class.

[`MapRect`](/documentation/MapKitJS/mapkit/MapRect)

The getter to use to access the map rect class.

[`MapSize`](/documentation/MapKitJS/mapkit/MapSize)

The getter to use to access the map size class.

[`MapType`](/documentation/MapKitJS/mapkit/MapType)

An accessor for the map type enumeration.

[`MarkerAnnotation`](/documentation/MapKitJS/mapkit/MarkerAnnotation)

The getter to use to access the marker annotation class.

[`Padding`](/documentation/MapKitJS/mapkit/Padding)

The getter to use to access the padding class.

[`Place`](/documentation/MapKitJS/mapkit/Place)

The getter to use to access the place class.

[`PlaceAnnotation`](/documentation/MapKitJS/mapkit/PlaceAnnotation)

The getter to use to access the place annotation class.

[`PlaceDetail`](/documentation/MapKitJS/mapkit/PlaceDetail)

The getter to use to access the place detail class.

[`PlaceLookup`](/documentation/MapKitJS/mapkit/PlaceLookup)

The getter to use to access the place lookup class.

[`PlaceSelectionAccessory`](/documentation/MapKitJS/mapkit/PlaceSelectionAccessory)

The getter to use to access the place selection accessory class.

[`PointOfInterestCategory`](/documentation/MapKitJS/mapkit/PointOfInterestCategory)

An accessor for the point-of-interest category enumeration.

[`PointOfInterestFilter`](/documentation/MapKitJS/mapkit/PointOfInterestFilter)

The getter to use to access the point-of-interest filter class.

[`PointsOfInterestSearch`](/documentation/MapKitJS/mapkit/PointsOfInterestSearch)

The getter to use to access the points of interest search class.

[`PolygonOverlay`](/documentation/MapKitJS/mapkit/PolygonOverlay)

The getter to use to access the polygon overlay class.

[`PolylineOverlay`](/documentation/MapKitJS/mapkit/PolylineOverlay)

The getter to use to access the polyline overlay class.

[`RegionPriority`](/documentation/MapKitJS/mapkit/RegionPriority)

An accessor for the region priority enumeration.

[`Search`](/documentation/MapKitJS/mapkit/Search)

The getter to use to access the search class.

[`SearchAutocompleteResult`](/documentation/MapKitJS/mapkit/SearchAutocompleteResult)

The getter to use to access the search autocomplete result class.

[`Style`](/documentation/MapKitJS/mapkit/Style)

The getter to use to access the style class.

[`TileOverlay`](/documentation/MapKitJS/mapkit/TileOverlay)

The getter to use to access the tile overlay class.

[`TransportType`](/documentation/MapKitJS/mapkit/TransportType)

An accessor for the transport type enumeration.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)