Direct tile access discontinued

12 posts / 0 new
Last post
smartmouse
Direct tile access discontinued

Hello, today i see this on my page:

http://oi64.tinypic.com/w8ugsp.jpg

I'm using Leaflet library and here is my Javascript code:

L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright" title="OpenStreetMap" target="_blank">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" title="MapQuest" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png" width="16" height="16">',
subdomains: ['otile1','otile2','otile3','otile4'],
minZoom: 5
}).addTo(map);

How should i edit it to include my Consumer Key?

How to make my map work again?


MQBrianCoakley
Rather than use the map tile
Rather than use the map tile url directly, use the MapQuest plugin for Leaflet. This and the other mapping methods are described in more detail here.

smartmouse
Can you tell me how to

Can you tell me how to "translate" my code with code that use MapQuest plugin for Leaflet?

I can't see any <code>tileLayer</code> here: https://developer.mapquest.com/documentation/leaflet-plugins/maps


smartmouse
Can you tell me how to

Can you tell me how to "translate" my code with code that use MapQuest plugin for Leaflet?

I can't see any <code>tileLayer</code> here: https://developer.mapquest.com/documentation/leaflet-plugins/maps


MQBrianCoakley
You'll need to replace the
You'll need to replace the tileLayer({options}) with MQ.mapLayer(). The urls and attribution will be set automatically. You can also use the satellite, hybrid, light, and/or dark layers on the map and in a layer control.

smartmouse
I did as you said and here is

I did as you said and here is my code now:

    var map = L.map('map-canvas', {
      zoomControl: false // disable zoomControl when initializing map (which is topleft by default)
    });

    L.MQ.mapLayer().addTo(map);

    map.setView(new L.LatLng(42.70, 12.08), 5);

But it says that L.MQ is not defined...

(I'm using Leaflet 0.7.3)


MQBrianCoakley
Remove the L from in front of
Remove the L from in front of MQ and you should be good to go.

smartmouse
It worked, thank you so much!

It worked, thank you so much!

PS: do you know how to change the language of countries name?


MQBrianCoakley
There is no language control
There is no language control for the map labels. The language of the maneuver narrative in the directions api can be controlled with the locale parameter, but nothing in the maps.

smartmouse
OK, i see. Thank you anyway.

OK, i see. Thank you anyway.


melanie.otto
german map labels

You say there is no language control for the map labels but we need the labels in german again as it was before. What can we do now?

Thanks for your help


MQBrianCoakley
The new map style uses the
The new map style uses the English version of the labels where available. There is not German option. Sorry for the inconvenience.