diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
commit | ea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch) | |
tree | af67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/examples/web-mercator.js | |
parent | 59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff) | |
download | postrunner-ea346a785dc1b3f7c156f6fc33da634e1f1a627b.zip |
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/examples/web-mercator.js')
-rw-r--r-- | misc/openlayers/examples/web-mercator.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/misc/openlayers/examples/web-mercator.js b/misc/openlayers/examples/web-mercator.js new file mode 100644 index 0000000..7a25d37 --- /dev/null +++ b/misc/openlayers/examples/web-mercator.js @@ -0,0 +1,37 @@ +// make map available for easy debugging +var map; + +function init() { + + var options = { + projection: new OpenLayers.Projection("EPSG:102113"), + units: "m", + numZoomLevels: 18, + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds(-20037508, -20037508, + 20037508, 20037508.34) + }; + map = new OpenLayers.Map('map', options); + + // create Google layer with EPSG:102113 code + var gsat = new OpenLayers.Layer.Google("Google Imagery", { + type: G_SATELLITE_MAP, + sphericalMercator: true, + projection: "EPSG:102113" + }); + + // create WMS layer + var wms = new OpenLayers.Layer.WMS( + "Highways", + "http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer", + {layers: "2", format: "image/gif", transparent: "true"}, + { + isBaseLayer: false, + wrapDateLine: true + } + ); + + map.addLayers([gsat, wms]); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(-10723197, 4500612), 3); +} |