When I use the map link within a contact details to get a map view of their address, the mapping starts to load but the map image tiles all display the following message:
"as of July 11 2016, direct tile access has been discontinued. etc. etc.".
So I went to the MapQuest site, created a free account, got an API key but don't seem to be able to insert it anywhere in civicrm?
FYI, I'm using openStreet Maps as the provider and Google for Geocoding, therefore no APIkey required (right?).
Should I be able to enter the API key from MapQuest in somewhere?
-
Update - I switched to Google and grabbed an API and it works fine. Note that there still seems to eb an issue with the MapQuest though.– jkobierAug 17, 2016 at 7:14
2 Answers
CiviCRM OpenStreet Maps function is pointing to map tiles that are no longer available.
See: https://stackoverflow.com/questions/38315300/mapquest-direct-tile-access-discontinued
You can use OpenStreetMap tiles if you replace the tile pointer in this file:
.../templates/CRM/Contact/Form/Task/Map/OpenStreetMaps.tpl
Change this...
map.addLayer(new OpenLayers.Layer.OSM("MapQuest OSM", [
"https://otile1-s.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg",
"https://otile2-s.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg",
"https://otile3-s.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg",
"https://otile4-s.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg",
], {
attribution: "<p>Tiles Courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a>. Data © <a href='http://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a> contributors.</p>"
}));
To this ...
map.addLayer(new OpenLayers.Layer.OSM("openstreetmap", [
"https://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
"https://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
"https://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
], {
attribution: "<p>Map Courtesy of <a href='http://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a></p>"
}));
You do want to use https!