Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

openrailwaymap in qlikview

I have to implement this openrailwaymap in qlikview, in particulary in the attached code (Script.js or OpenLayers.js)

i've found that to implement openrailwaymap it's necessary to do like this:

Usage in OpenLayers

var openrailwaymap = new OpenLayers.Layer.XYZ("OpenRailwayMap", ["http://a.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png","http://b.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png","http://c.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png"], {

sphericalMercator: true,

opacity: 1,

visibility: false,

transparent: true,

noOpaq: true,

isBaseLayer: false,

attribution: "<a href="http://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>, Style: <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA 2.0</a> <a href="http://www.openrailwaymap.org/">OpenRailwayMap</a> and OpenStreetMap" });

map.addLayer(openrailwaymap);

Now, I have this two javascript code, script.js and openlayers.js, how and mostly, WHERE i must modify the two javascript codes, inserting the overlay code ?

THANK YOU VERY MUCH

3 Replies
jonasheisterkam
Partner - Creator III
Partner - Creator III

Hi,

you must change the Script.js. I have only written an extension with OpenLayers3 but i hope it is not that different.

Check if there is a logic that use the CustomServer if filled, then you dont have to overide the default.

You must Change the props after line 23. The BaseLayer "setBaseLayer: function()" in line 141 looks like a switch between default and custom server.

Not applicable
Author

i've setted customServer line 34 with http://tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png

but anything change!!!

i think i must also add this:

"http://b.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png","http://c.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png"], {

sphericalMercator: true,

opacity: 1,

visibility: false,

transparent: true,

noOpaq: true,

isBaseLayer: false,

attribution: "<a href="http://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>, Style: <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA 2.0</a> <a href="http://www.openrailwaymap.org/">OpenRailwayMap</a> and OpenStreetMap" });

map.addLayer(openrailwaymap);

BUT WHERE??

Not applicable
Author

i've setted customServer line 34 with http://tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png

but anything change!!!

i think i must also add this:

"http://b.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png","http://c.tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png"], {

sphericalMercator: true,

opacity: 1,

visibility: false,

transparent: true,

noOpaq: true,

isBaseLayer: false,

attribution: "<a href="http://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>, Style: <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA 2.0</a> <a href="http://www.openrailwaymap.org/">OpenRailwayMap</a> and OpenStreetMap" });

map.addLayer(openrailwaymap);

BUT WHERE??