
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
react-apple-mapkit
Advanced tools
A lightweight React wrapper for Apple MapKit JS with an easy-to-use API.
A comprehensive library to seamlessly integrate Apple MapKit JS with React. This library provides TypeScript support and rich configuration options for maps, markers, and annotations.
Install the package using npm or yarn:
npm install react-apple-mapkit
or
yarn add react-apple-mapkit
Before using the map, you need to initialize MapKit with an authentication token.
import React from 'react';
import Map from 'react-apple-mapkit';
const App = () => {
return (
<Map token="YOUR_MAPKIT_JS_TOKEN">
<h1>Apple MapKit Integration</h1>
</Map>
);
};
export default App;
| Prop | Type | Default | Description |
|---|---|---|---|
token | string | Required | MapKit JS API token. |
mapType | standard, mutedStandard, hybrid, satellite | standard | Map type. |
distances | adaptive, metric, imperial | adaptive | Distance measurement system. |
showsCompass | FeatureVisibility | adaptive | Compass visibility. |
showsScale | FeatureVisibility | hidden | Scale visibility. |
cameraBoundary | CoordinateRegion | null | Restrict map camera boundary. |
cameraZoomRange | { min: number, max: number } | { min: 0, max: Infinity } | Define zoom limits for the camera. |
paddingTop, paddingRight, paddingBottom, paddingLeft | number | 0 | Map padding. |
onRegionChangeStart | (region: CoordinateRegion) => void | undefined | Event triggered at region change start. |
onRegionChangeEnd | (region: CoordinateRegion) => void | undefined | Event triggered at region change end. |
| Prop | Type | Default | Description |
|---|---|---|---|
latitude | number | Required | Marker latitude. |
longitude | number | Required | Marker longitude. |
title | string | "" | Marker title. |
subtitle | string | "" | Marker subtitle. |
color | string | #fb0000 | Marker color. |
glyphColor | string | #ffffff | Glyph text color. |
collisionMode | 'Rectangle' or 'Circle' or null | null | Collision detection mode. |
subtitleVisibility | FeatureVisibility | adaptive | Subtitle visibility. |
titleVisibility | FeatureVisibility | adaptive | Title visibility. |
| Prop | Type | Default | Description |
|---|---|---|---|
latitude | number | Required | Annotation latitude. |
longitude | number | Required | Annotation longitude. |
title | string | "" | Annotation title. |
subtitle | string | "" | Annotation subtitle. |
collisionMode | 'Rectangle' or 'Circle' or null | null | Collision detection mode. |
calloutElement | ReactNode | undefined | Custom callout content. |
calloutOffsetX, calloutOffsetY | number | 0 | Callout offset adjustments. |
Events can be easily attached to map and markers.
| Event | Description |
|---|---|
onLoad | Triggered when the map is loaded. |
onRegionChangeStart | Triggered at the start of region change. |
onRegionChangeEnd | Triggered at the end of region change. |
onSingleTap | Triggered on single tap. |
| Event | Description |
|---|---|
onSelect | Triggered when a marker is selected. |
onDeselect | Triggered when a marker is deselected. |
onDragStart | Triggered when dragging starts. |
onDragEnd | Triggered when dragging ends. |
import React from 'react';
import Map from 'react-apple-mapkit';
const App = () => (
<Map token="YOUR_MAPKIT_JS_TOKEN">
<h2>My Map</h2>
</Map>
);
export default App;
import React from 'react';
import Map from 'react-apple-mapkit';
import Marker from 'react-apple-mapkit/Marker';
const App = () => (
<Map token="YOUR_MAPKIT_JS_TOKEN">
<Marker latitude={37.7749} longitude={-122.4194} title="San Francisco" />
</Map>
);
export default App;
Represents a point on the Earth’s surface.
interface Coordinate {
latitude: number;
longitude: number;
}
Represents a geographic region.
interface CoordinateRegion {
centerLatitude: number;
centerLongitude: number;
latitudeDelta: number;
longitudeDelta: number;
}
This project is licensed under the MIT License. See the LICENSE file for details.
For more detailed information, visit the official documentation. 🎉
FAQs
A lightweight React wrapper for Apple MapKit JS with an easy-to-use API.
The npm package react-apple-mapkit receives a total of 0 weekly downloads. As such, react-apple-mapkit popularity was classified as not popular.
We found that react-apple-mapkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.