[mapguide-users] MapGuide/AIMS OSM TransportMap and CycleMap API Key Required
RenoSun
renolionheart at gmail.com
Mon Aug 21 14:33:00 PDT 2017
Hi all,
I just would like to share how I update the FusionSF.js to use OSM tiles
with API KEY.
http://www.thunderforest.com/docs/apikeys/
<http://www.thunderforest.com/docs/apikeys/>
... about code line 113806
if (!this.oLayerOL) {
if (this.layerType == 'OpenStreetMap' || this.layerType ==
'OSM') {
if (this.mapTag.extension.Options[0].type[0] == "Mapnik"){
this.oLayerOL = new
OpenLayers.Layer.OSM[this.mapTag.layerOptions.type](this.getMapName(), null,
this.mapTag.layerOptions);
}
else if (this.mapTag.extension.Options[0].type[0] ==
"CycleMap"){
//this.oLayerOL = new
OpenLayers.Layer.OSM(this.getMapName(), null, this.mapTag.layerOptions);
this.oLayerOL = new OpenLayers.Layer.OSM("t at h",
"https://tile.thunderforest.com/cycle/${z}/${x}/${y}.png?apikey=YOURAPIKEY");
}
else if (this.mapTag.extension.Options[0].type[0] ==
"TransportMap") {
this.oLayerOL = new OpenLayers.Layer.OSM("t at h",
"https://tile.thunderforest.com/transport/${z}/${x}/${y}.png?apikey=YOURAPIKEY");
}
}
else {
this.oLayerOL = new
OpenLayers.Layer[this.layerType](this.getMapName(),
this.mapTag.layerOptions);
}
//fractionalZoom not permitted with tiled base layers regardless
this.mapWidget.fractionalZoom = false;
this.mapWidget.oMapOL.setOptions({ fractionalZoom: false });
}
You may see the result on our public GIS Recreation Map
<http://maps.qualicumbeach.com/QB/Recreation.aspx?m=Recreation> .
Cheers!
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MapGuide-AIMS-OSM-TransportMap-and-CycleMap-API-Key-Required-tp5332053.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list