openlayers / ol2

OpenLayers v2 - deprecated!
Other
1.47k stars 770 forks source link

Support for Mapquest #653

Open dandv opened 12 years ago

dandv commented 12 years ago

Tiles API is at http://developer.mapquest.com/web/products/open/map

Special support would abstract the tile URLs, map types (OSM and aerial), would take care of the proper attribution, set the correct dislayProjection for Control.MousePosition etc.

tschaub commented 12 years ago

See the mapquest.html example. It would be straightforward to create an OpenLayers.Layer.MapQuest that extends XYZ and accepts a type option. The layer doesn't have any knowledge of the MousePosition control or any other - so configuring that is up the application developer.

mpriour commented 12 years ago

The displayProjection is a property of the map, not the layer

dandv commented 12 years ago

@mpriour: I admit I need to read more about displayProjection (I've just discovered OpenLayers yesterday), but it seems that if you add two certain layers onto the same map, they somehow conflict in the displayProjection - the mouse and map position go awry when switching from one to the other.

Here's an example with WMS and OSM/Cloudmade - http://jsfiddle.net/mtRWN/

So from a user perspective, I'd like to set the displayProjection once per layer, and not have to worry about changing it when the user switches the layer.

mpriour commented 12 years ago

Again, you set displayProjection on the map If you do that in the example you link to above, then the display projection stays the same.

add: displayProjection: new OpenLayers.Projection('EPSG:4326') to your map configuration

mprins commented 12 years ago

Extending (or just using) OpenLayers.Layer.OSM is probably even less work.

Note that the useful aerial imagery coverage is limited to the usa.