
Introducing MapKit JS - kiyanwang
https://developer.apple.com/videos/play/wwdc2018/212/
======
sctb
Previous discussion:
[https://news.ycombinator.com/item?id=17232169](https://news.ycombinator.com/item?id=17232169).

------
101km
This is beta.

250,000 map initializations 25,000 service requests

Per day. Correct me (it is quite late here) if I'm wrong but isn't this x10
the Google maps free tier?

No pricing information beyond this so far, they just suggest you contact them
if you want more. They're probably still deciding.

Edit: I think Apple are specifically releasing it now because this week was
the week the new Google Maps Platform ([https://cloud.google.com/maps-
platform/](https://cloud.google.com/maps-platform/)) pay as you go pricing
kicks in, the deadline has been pushed back by a month.

Under the new pricing you get $200 worth of credits as a monthly free tier
which approximately maps (har har) to what this Apple beta gives you a _day_.

~~~
dmortin
I hope it will affect Google's pricing, so I don't have to rewrite everything.

~~~
vijaybritto
Rewrite these things under an abstraction layer so that you don't have to
worry about third parties anymore

~~~
wpdev_63
Google maps api tos forbids third party abstractions.

~~~
toomuchtodo
Seems like a great reason to not rely on Google Maps (forced lock in).

------
reustle
For anyone looking to start using this, I would highly recommend waiting until
[https://leafletjs.com](https://leafletjs.com) adds support so you aren't
writing MapKit specific code.

~~~
bonyt
I wonder if the official MapKit one uses vector rendering? It looks like all
leaflet can do is display pretendered tiles.

EDIT: Oooh, [https://github.com/mapbox/mapbox-gl-
leaflet](https://github.com/mapbox/mapbox-gl-leaflet)

------
simonw
Anyone know what the licensing terms are for data returned by these Apple
services - in particular, are there any restrictions on what you can do with
latitude/longitude data returned by their geocoding API (or place names and
addresses from their reverse geocoder)?

~~~
GrokFui
Would like to know this as well as possibly map/tile download/caching for
offline

------
joshe
Just saw an Apple Maps camera car in SF a week ago. First one I've seen. So
they are at least doing a tiny bit of their own data gathering.

They also opened a 4,500 job facility in Hyderabad in 2016. [1] Presumably to
do human editing like google maps does [2].

[1] [https://www.zdnet.com/article/apple-to-open-first-
offshore-t...](https://www.zdnet.com/article/apple-to-open-first-offshore-
technology-development-centre-in-india/)

[2]
[https://www.theatlantic.com/technology/archive/2012/09/how-g...](https://www.theatlantic.com/technology/archive/2012/09/how-
google-builds-its-maps-and-what-it-means-for-the-future-of-everything/261913/)

~~~
geerlingguy
And one in St. Louis, first I’ve noticed here. Haven’t seen a Google van in a
couple years.

------
hit8run
Do they have a request limit? Is using it setting some crazy tracking cookies
that make it more difficult to achieve GDPR compliance? I like the support for
pinch to zoom etc. Google Maps on the web not supporting it ruined so many
website visits for me.

~~~
djrogers
250,000 map initializations 25,000 service requests per day.

~~~
dmortin
Per website or per developer account, that is the question, because one
developer can have several sites using maps.

------
joshe
Some answers to questions I had

Uses WebGL with fall back to server side rendering with tiles, they call it
"adaptive rendering modes".

What for? "Unify on a single map provider with familiar, flexible APIs" (from
WWDC slides).

    
    
      Free tiers
      ----------
    
      Mapbox
        web
        50K map views / mo
        50K geocode / mo
        50K directions / mo
        50K matrix / mo
    
        mobile
        50K monthly active users
        same requests
    
    
      Apple
        web and mobile
        250K map views / *day*
        25K service requests / *day*
    
    
      Google (new style $200 credit system)
        (this is too complicated)
    
        web
        $200 free credit buys one of:
        14K map views embed advanced, might be anything with search/directions/routing, including on mobile / month 
        100K map views static on web / month
        28k map views dynamic on web / month (this hurts)    
         
        mobile
        unlimited mobile map views (very simple kind)
        14K map views for anything interesting / month
        40K direction requests / month
        ~10K Places calls / month
    

That's the max for any one service if you only use that service. So you could
use 20K direction requests and 14K dynamic map views for free per month.

Google Maps gets expensive quickly, 71K embedded advanced map views per month
is $1000 per month.

    
    
      roughly
      Google Maps: very expensive 
      Mapbox: moderately priced
      Apple Maps: very cheap
    

Licensing...

Google is restrictive. Can't be behind a login, can't track vehicles/assets,
can't embed in a web view on desktop, in practice can often not embed in an
app on iOS.

Mapbox is famously open, you can do all the above.

Apple seems like they might be more like Mapbox, given their goals, but can't
find any licensing yet.

If the licensing turns out well, this could very nice for cross platform maps.

~~~
bamnet
Last I checked the new Google Maps licensing [1] is a bit more permissive,
placing no restrictions on the behind a login bit.

The Google Maps JavaScript API does support UIWebView [2] so it should work
embedded on iOS. There's a native SDK too.

[1] [https://cloud.google.com/maps-
platform/terms/](https://cloud.google.com/maps-platform/terms/) [2]
[https://developers.google.com/maps/documentation/javascript/...](https://developers.google.com/maps/documentation/javascript/browsersupport)

------
coding123
This is great for a few reasons. There are many annoying user-interface
"issues" in the Google Maps JS, especially on mobile. For example on mobile
devices, my wife goes absolutely insane when she's prompted to use TWO fingers
instead of one to scroll around. I know it's an easy fix for google, but
they're probably trying to adhere to some stupid material design standard.

Second, Google already has too much data on people. I think it's been said
before, but Apple doesn't really track people as invasively as Google.

Third, as stated, there has desperately been a need for competition in this
space. I hope that over time they introduce many of the other features that
Google provides to make sure it's totally competitive.

~~~
11235813213455
Leaflet, esri are pretty great

------
jnmandal
Its annoying to me that they basically are just copying the interface that
google maps SDK has. I would have hoped for something more declarative and
easier to use from a framework like react/vue/elm etc.

~~~
danpalmer
They actually modelled it on the Swift/Objective-C MapKit interface. (They
mentioned this in the WWDC session)

~~~
outside1234
Which doesn’t make any sense - this is for the web - not a native app

~~~
dawnerd
Sure it does. Likely the same developers would be implementing it on the web
so makes sense to keep the api the same.

~~~
bgorman
While it may be easier that way for the developers, it makes sense to make the
API more idiotmatic for the target platform/SDK.

------
bufferoverflow
Don't see any info on the pricing.

~~~
herodotus
You need a developer account - US$99 per annum for an individual.

------
CommanderData
Competition in the maps space is severally needed right now with the closure
of smaller services over the past few years, the amount of data Apple has and
CAN expose will make it a real contender, compared to smaller Map data
services that don't availability of always-on real time data.

Popular times in Google Maps is incredibly useful but request to open this are
ignored. I hope with Apple competing, both make this data available.

I would consider this in my next project, it would be nice to see pricing.

~~~
toomuchtodo
Would it be possible for OSM to provide these services at cost to fund their
operations?

At some point we need to stop reinventing the wheel at each org and work on
contrivuint g collectively for common shared Internet resources (just like
Wikipedia).

~~~
CommanderData
OSM and others have limited availability of real time data, the smaller
services leverage data from prediction models and some even get data upstream
from Google through third parties.

Every Google Android device is by default a real time tracking device. The
usefulness of this data is immensely underrated.

The only way I think real competition can be established here is exactly with
news like this.

------
michelb
Table stakes for a mapping provider. Good to see Apple moving this to the web
as well. Hopefully future updates will provide discerning features.

------
mistrial9
by avoiding Openstreetmap entirely, Apple makes a statement of Ivory Tower. No
idea how map data is ingested internally, but I see no indications of OSM data

~~~
chippy
They do not avoid OpenStreetMap entirely. They use OSM (and about 300 other
sources). On a map, click on the "legal" link, then click through the "more"
link to see the list.

Generally speaking, though, they use TomTom wherever possible.

~~~
rmc
I'm curious how they use OSM. If they mix the OSM data with other data, then
OSM's GPL-like 'share alike' licence clause kicks in....

> _They use OSM (and about 300 other sources). On a map, click on the "legal"
> link, then click through the "more" link to see the list._

If you don't merge OSM data, then you only need to attribute OSM. And I don't
think this is sufficient for the licence, which says: _" You must include a
notice ... reasonably calculated to make any Person that is exposed to the
Work aware that Content was obtained from [OSM]"_. i.e. basically every map
has to say "OSM"

------
chris_wot
Wouldn't you just use something from Google? They have better mapping data, at
least or so I thought...

~~~
vbezhenar
Depends on region. In my city Google maps are terrible. Apple maps are even
worse, though. But I can imagine that they might be better somewhere.

------
EGreg
If you are wondering what can these maps be used for, I thought I would post
this. We want to have ways for people to stay in our app so we can do
geolocation while they are driving. The web doesn’t support background
geolocation callbacks.

Here is a web based demo we have of a person picking up their friends while
driving on the way to an event:

[https://youtu.be/i4nQZ-WN3Uw](https://youtu.be/i4nQZ-WN3Uw)

A lot goes into it including distance and heading calculations, correct 3d
transforms for the map and avatars, as well as the usual realtime/offline
infrastructure of Qbix Platform on the backend.

It is part of our larger Groups app that we are rolling out later this year
that lets users organize group activities and even drive each other to them.

So now this comes at a great time - we are happy to offer a choice of two maps
providers instead of just one, soon.

We release the Platform under AGPL on github.com/Qbix and many reusable
components as MIT license there. You can see more here:

[https://www.youtube.com/watch?v=pZ1O_gmPneI](https://www.youtube.com/watch?v=pZ1O_gmPneI)

Edit: Why so many downvotes? Seems strange.

