Hi,
In Visual WebGUI I was able to add OSM to the GoogleMaps Extension doing the JS code below. This would default to OSM for the map tiles. How would I do this in Wisej?
You can do that in several ways.
1. is to modify the GoogleMaps extension and add the map type to startup.js in the init() function.
2. Without modifying the extension, is to add a JavaScript component to the page (in Wisej 2 you don’t need the JavaScript component and you can use the new ClientEvents property), and add a JavaScriptEvent to the map control for the “initialized” event whit this code:
this.map.mapTypes.set("OSM", new google.maps.ImageMapType({ getTileUrl: function (coord, zoom) { return "http://tile.openstreetmap.org/" + zoom + "/" + coord.x + "/" + coord.y + ".png"; }, tileSize: new google.maps.Size(256, 256), name: "OpenStreetMap", maxZoom: 18 })); this.map.setMapTypeId("OSM")
See screenshot attached.
Please login first to submit.