I built capacitor-plugin-apple-maps, a Capacitor 8 plugin that renders a native Apple Maps (MapKit) view on iOS with an API intentionally mirroring @capacitor/google-maps, so both can sit behind one abstraction in an app.
const map = Capacitor.getPlatform() === 'ios'
? await AppleMap.create({ id, element, config })
: await GoogleMap.create({ id, element, apiKey, config });
Why: I wanted real native Apple Maps on iOS (no API key, no Google dependency) without rewriting my map layer - so the surface matches Google’s create / setCamera / fitBounds / addMarker(s) / events as closely as possible.
Highlights
- Google-maps-compatible surface:
create,setCamera,getMapBounds,fitBounds, marker add/update/remove,
onMarkerClick/onCameraIdle/onCameraMoveStarted(withisGesture), etc. - Marker clustering, polylines/polygons/circles (incl. dashed & geodesic lines), info-window bubbles
- Native place search / autocomplete and forward + reverse geocoding via MapKit - no API key
Links
