Reputation: 329
I try to understand what is what but I am a bit confused :
OpenStreetMap is free to use map . Possible APIs for this map are :
-OpenLayer
-MapQuest
Why OpenLayer use MapQuest code in OpenLayer example : http://openlayers.org/en/v3.1.1/doc/quickstart.html
<script type="text/javascript">
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.MapQuest({layer: 'sat'})
})
],
view: new ol.View({
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
zoom: 4
})
});
</script>
Maybe this question is strange but I'd like to know why one API use expresion from others?
Upvotes: 2
Views: 2198
Reputation: 21469
You are mixing up APIs with frameworks, services and companies.
MapQuest is a company. MapQuest Open provides various services based on OSM data, for example routing, geocoding and tiles. Consequently MapQuest Open offers various APIs for these services, too, but these APIs are not for interacting with raw OSM data directly.
OpenLayers is a javascript library for displaying maps in web browsers, similar to Leaflet. OpenLayers and Leaflet don't belong to OSM in any way, they just support displaying OSM among other maps. Both have their own API for constructing and displaying interactive maps but mostly these APIs are neither for interacting with raw OSM data directly. OpenLayers and Leaflet can be used to embed all kind of map tiles, for example the one provided by MapQuest Open or even Google Maps.
OSM, in contrast, offers APIs for editing and retrieving raw map data. There is the regular editing API which is mainly for editing raw map data, but not for retrieving it. If you want to retrieve specific features then take a look at the Overpass API instead and the nice interactive frontend overpass turbo.
Also take a look at the list of OSM-based services in the OSM wiki as well as OSM software.
Upvotes: 6