From ea346a785dc1b3f7c156f6fc33da634e1f1a627b Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Tue, 12 Aug 2014 21:56:44 +0200 Subject: Adding jquery, flot and openlayers to be included with the GEM. --- misc/openlayers/examples/wmts.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 misc/openlayers/examples/wmts.js (limited to 'misc/openlayers/examples/wmts.js') diff --git a/misc/openlayers/examples/wmts.js b/misc/openlayers/examples/wmts.js new file mode 100644 index 0000000..391a200 --- /dev/null +++ b/misc/openlayers/examples/wmts.js @@ -0,0 +1,35 @@ +var map; + +function init() { + + map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:900913" + }); + + var osm = new OpenLayers.Layer.OSM(); + + // If tile matrix identifiers differ from zoom levels (0, 1, 2, ...) + // then they must be explicitly provided. + var matrixIds = new Array(26); + for (var i=0; i<26; ++i) { + matrixIds[i] = "EPSG:900913:" + i; + } + + var wmts = new OpenLayers.Layer.WMTS({ + name: "Medford Buildings", + url: "http://v2.suite.opengeo.org/geoserver/gwc/service/wmts/", + layer: "medford:buildings", + matrixSet: "EPSG:900913", + matrixIds: matrixIds, + format: "image/png", + style: "_null", + opacity: 0.7, + isBaseLayer: false + }); + + map.addLayers([osm, wmts]); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(-13677832, 5213272), 13); + +} -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0