A new map in town: MapKit JS by Apple

Back in 2011, #TeamEBP has written about the usage of geo.admin.ch and compared it to other map services like Google. A year later, Apple joined the party of map providers and introduced Apple Maps to the world, with one caveat: It was only available on Apple devices. With Apple’s developer conference last week, this has changed: Apple introduced a new Javascript library called MapKit JS from Apple – this means that you can now embed a webmap by Apple on any of your websites. Currently the API is in beta, but the documentation is already available, including sample code. If you need even more information: check the WWDC session video, the demos begin at 26:00, 43:45, the slides are at available as PDF.

Unfortunately the basemap quality is not that good for Switzerland (compared to California, at least), so this blog post is not suggesting you to migrate and use it in production. However, you can get inspired, the codebase is a sum of rich and beautiful APIs with many concepts borrowed from the MapKit native which exists in iOS since its first release, more than 10 years ago.

One important thing to note is pricing: As we’ve written in 2011, no webmap comes for free, if used heavily. Apple’s expected pricing strategy according to the presentation is interesting: you can use 250’000 map initializations and up to 25’000 service requests (geocoding, search with autocomplete, directions) for free, per day (sic!). This is about 10 times more than what Google charges you with their recent price change (One caveat: it’s hard to compare pricing for mapping APIs directly, so take this number with a grain of salt). Note however, that you need an API key in order to use MapKit JS, for which an Apple Developer account is necessary (which again costs you CHF 109 per year).

I’ve also made a simple CodePen Demo with a WMTS layer from ArcGIS Online and walking directions from Apple’s routing service. The WMTS layer shows a quality of service map for public transportation stops, computed with Walkalytics.

See the Pen EBP MapKitJS Demo by Stephan Heuel (@ping13) on CodePen.

Here is a direct link to the JS code of the demo.

Are you interested in using MapKit JS standalone or in combination with other mapping services? Get in touch with Stephan Heuel or myself, we would love to talk with you.