WISroGIS Tutorials
How to set up Google maps with WISroGIS How to set up Google maps with WISroGIS |
|
|
|
Powered by WISroGIS 1.11 Zeus
Below is the code used to create a map with exchangeable Google layers: streets, satellite, hybrid and terrain. Before using the example, please make sure you have set the following in the plugin's configuration interface
After these steps, copy/paste the below code to a plain text editor (to remove additional HTML formatting and any new lines), then paste the code to the article's content from your site. {WISroGIS center_lon='22.0'| center_lat='38.3'| width='500px'| height='400px'| layerswitcher=1| panzoom_style=1| zoom_level=7| baseLayer='Google("Google Streets")'| baseLayer='Google("Google Satellite",{type: G_SATELLITE_MAP})'| baseLayer='Google("Google Hybrid",{type: G_HYBRID_MAP})'| baseLayer='Google("Google Terrain",{type: G_PHYSICAL_MAP})' ~} To get the measurements extension working, one need to reproject the Google maps by setting the spherical Mercator option to true and specifying the map coordinates and display coordinates systems. The complete code for the Google maps above example - with the functional Measurement extension is listed below: {WISroGIS center_lon='22.0'| center_lat='38.3'| width='500px'| height='400px'| layerswitcher=1| panzoom_style=1| zoom_level=7| measure='1'| reprojectCenter='true'| mapoptions='maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508), maxResolution: 156543, units: "m", projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326")'| baseLayer='Google("Google Streets",{"sphericalMercator": true})'| baseLayer='Google("Google Satellite",{type: G_SATELLITE_MAP, "sphericalMercator": true})'| baseLayer='Google("Google Hybrid",{type: G_HYBRID_MAP, "sphericalMercator": true})'| baseLayer='Google("Google Terrain",{type: G_PHYSICAL_MAP, "sphericalMercator": true})' ~} |
||||
| < Prev | Next > |
|---|