Removing/altering ol.source.MapQuest
ThomasG77 opened this issue ยท 26 comments
According to https://lists.openstreetmap.org/pipermail/talk/2016-June/076106.html, it's will be end of life for MapQuest Open tiles.
I have no idea what would be the best solution to manage this policy change but ol.source.MapQuest
will have to be removed or changed.
It looks like it'll have to follow other sources like ol.source.BingMaps
which requires a key.
No need for a PSC decision here. We're accepting pull requests to add a configuration option so users can provide the required API key, like @jonataswalker suggested above.
@ThomasG77 would you like to handle this PR?
@ahocevar May you create a key to MapQuest examples?
Keys will expire with 15000 transactions? Will we be changing keys often?
free:
15,000
transactions per month
I can't really find what will happen if we exceed 15,000.
Also relevant: https://developer.mapquest.com/legal
I'll send an inquiry to MapQuest to see if we can get a higher quota for use in our examples.
Sent. We'll see what happens.
Got a response from MapQuest: "Unfortunately, we can not offer a key without a transaction limit. If you're interested in more than 15000 transaction per moth, you must sign up for a plan here: https://developer.mapquest.com/plans"
So here's the plan: we'll switch to a different base map for all examples that currently use ol.source.MapQuest
, except for the one example that shows the use of ol.source.MapQuest
. @ThomasG77, when you create the pull request, please send me a PM to get the key from me.
ok I'm working now on a PR for this, so it's in before 3.17 release
Be cautious, it's a bit annoying to get an access_token e.g https://twitter.com/ThomasG77/status/748737237588647937
Early attempt so do not wait for me
After doing some research, I think the cleanest way to resolve this issue is to remove the MapQuest source. No response from MapQuest management about the API key, and no documentation for a map tiles API. Looks like they only provide map tiles access through their Leaflet and Android SDK APIs. To avoid the same problems we've had with Google Maps in the past, removal of the MapQuest source appears to be the only viable solution for now.
As a replacement, we can maybe provide a Here source. But I haven't checked their API yet. Just an idea at this point.
As a replacement, we can maybe provide a Here source. But I haven't checked their API yet. Just an idea at this point.
Their API looks sane:
https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html
Looks sane indeed. I'll contact Here to see if they are able and willing to provide an API key for official hosted examples for free.
Just FYI, MapQuest is not going to come back. Reply from MapQuest: "Yes, going forward we recommend users switch to leaflet. We are moving to a cloud based system and all transactions will require a key after 11 July. Leaflet is now our standard (in addition to Mapbox tiles and our new Android and iOS SDKs."
As we make progress on styling vector layers, the Mapbox tiles provided by MapQuest may become an interesting option.
Just some information I've found out:
- They are using simple Mapbox tiles, with a shared key between their users. The example on the homepage generates the exact same network request as if I substitute in my own app key.
- They have to be counting the JS file loading count from their JS file as a map load transaction. This means exactly one transaction per map load, no matter where the user pans & zooms and switches basemap.
- Getting the tile parameters from the served JS file would be a trivial task. As long as you are loading the JS from the website you should be good I believe, as it would be the same transaction count as the Leaflet plugin.
MQKEY=Key='Kmjtd|luua2qu7n9,7a=o5-lzbgq';
MQCONFIGNUMBER=1;
if(window.MQPROTOCOL===undefined){ MQPROTOCOL=window.location.protocol==='https:'?'https://':'http://'; }
MQPLATFORMSERVER=MQPROTOCOL+"www.mapquestapi.com";
MQSTATICSERVER="https://www.mapquestapi.com/staticmap/";
MQTRAFFSERVER=TRAFFSERVER="https://www.mapquestapi.com/traffic/";
MQROUTEURL="https://www.mapquestapi.com/directions/";
MQGEOCODEURL="https://www.mapquestapi.com/geocoding/";
MQNOMINATIMURL=MQPROTOCOL+"open.mapquestapi.com/";
MQSEARCHURL="https://www.mapquestapi.com/search/";
MQLONGURL=MQPLATFORMSERVER;
MQSMSURL=MQPLATFORMSERVER;
MQTOOLKIT_VERSION="v2.2".replace(/^v/, '');
MQCDN=MQIMAGEPATH="https://api-s.mqcdn.com/"+"sdk/leaflet/v2.2/";
MQCDNCOMMON="https://api-s.mqcdn.com/";
MQICONSERVER=ICONSERVER=MQPROTOCOL+'icons.mqcdn.com';
MQICONCDN=MQPROTOCOL+'api.mqcdn.com';
LOGSERVER=MQTILELOGGER="https://www.mapquestapi.com";
MQLOGURL="https://www.mapquestapi.com/logger/v1";
COVSERVER=MQCOPYRIGHT="https://tileproxy.cloud.mapquest.com";
MQCOPYRIGHT_PATH="/attribution";
MBMAP="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.streets/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBHYB="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.satellite/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBSAT="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.satellitenolabels/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBLIGHT="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.light/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBDARK="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.dark/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBMAP_OPEN="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.streets-mb/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBHYB_OPEN="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.satellite-mb/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBLIGHT_OPEN="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.light-mb/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBDARK_OPEN="https://{$hostrange}.tiles.mapbox.com/v4/mapquest.dark-mb/{$z}/{$x}/{$y}.{$ext}?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg";
MBEXT="png";
MBTILEHI="4";
MBTILELO="1";
MBCOPYRIGHT="https://tileproxy.cloud.mapquest.com";
MBCOPYRIGHT_PATH="/attribution";
Being technically able to do this is one thing. Doing it in a legal way is another, and it looks like it is currently not possible to do this in a legal way.
I'm not understanding how you came to the conclusion that it would not be legal to implement this in OL3. "Recommend" and "Standard" do not exclude ol3 as a consumer. Maybe provide an input area for users to paste in there API key before the sample will actually load tiles?
@ca0v This is not about the API key, it is about the API. If you can point me to an API documentation that shows how to access tiles directly and does not have a deprecation warning, we'll gladly accept a pull request to bring back MapQuest.
I've had an involved conversation with representatives from MapQuest, clearly indicating that the only APIs remaining to access MapQuest tiles are Leaflet plugins, Android SDK and iOS SDK.
A clarification to the above: The problem is getting the access_token
for accessing the Mapbox tiles. If there is a documented way to get the access_token
from the MapQuest Consumer Key and Consumer Secret (without going through requesting the Leaflet plugin JavaScript), we have a legal way to use MapQuest tiles. Otherwise we don't.
This is different than Consumer Key and Consumer Secret? I have keys (public/private) for both an "application" and a "map". But I'd need something else as well?
UPDATE: I signed into developer.here.com using my esri credentials to get an APP ID and APP CODE. What is that all about? Has MapQuest been acquired by ESRI?
@ca0v Those are indeed different. The access_token
is a Mapbox thing, and as far as I can tell, by providing your MapQuest Consumer Key to the Leaflet plugin JS url, the JS will contain a Mapbox access_token
.
Regarding your update, I don't think that MapQuest, Here and ESRI are all related.
So I know you closed this, but it now looks like they are providing a static Map API that I would imagine is similar to how Bing works, http://www.mapquestapi.com/staticmap/ . I'm guessing this is probably new information from what I read in this thread.
... they are providing a static Map API that I would imagine is similar to how Bing works ...
Bing allows direct access to their tiles.
I meant more along the lines of you would just need to provide OL3 layer a key in your source code like you do with Bing. Sorry I don't quite understand what the big difference is between requesting a tile through their API and "direct access".
MapQuest does not have a HTTP API (like Bing or Here) to access their tiles any more. If you rely on MapQuest, you have to use one of their APIs (Leaflet Plugin, Android SDK or iOS SDK).
I see, I mistook their static map API for a way to request tiles. Not much else to say then but,
Well that's stupid