Permalink
Browse files

remove unworking example in wmts-capabilities

  • Loading branch information...
1 parent 8d1d08b commit 81dffce4f45e54683c3d34e3d14990ab884fb600 @sbrunner sbrunner committed Jun 25, 2012
Showing with 0 additions and 43 deletions.
  1. +0 −6 examples/wmts-capabilities.html
  2. +0 −37 examples/wmts-capabilities.js
@@ -27,14 +27,8 @@ <h1 id="title">Web Map Tile Service (WMTS) Capabilities Parsing</h1>
implementations.
</p>
- <p>KVP version.</p>
-
<div id="map" class="smallmap"></div>
- <p>REST version.</p>
-
- <div id="map2" class="smallmap" style="height: 440px; "></div>
-
<div id="docs">
<p>
This example creates an OpenLayers.Layer.WMTS layer to based
@@ -1,14 +1,9 @@
OpenLayers.ProxyHost = "/proxy/?url=";
var map, format;
-var map2, format2;
function init() {
- /*
- * KVP version
- */
-
format = new OpenLayers.Format.WMTSCapabilities({
/**
* This particular service is not in compliance with the WMTS spec and
@@ -60,36 +55,4 @@ function init() {
map.addLayer(osm);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(-13677832, 5213272), 13);
-
-
- /*
- * REST version
- */
- format2 = new OpenLayers.Format.WMTSCapabilities();
-
- OpenLayers.Request.GET({
- url: "http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml",
- success: function(request) {
- var doc = request.responseXML;
- if (!doc || !doc.documentElement) {
- doc = request.responseText;
- }
- var capabilities = format2.read(doc);
- var layer = format2.createLayer(capabilities, {
- layer: "ch.are.gemeindetyp-1990-9klassen",
- // not avalable in the WMTS Capabilities in native projection
- maxExtent: [485869.5728, 76443.1884, 837076.5648, 299941.7864]
- });
- map2.addLayer(layer);
- map2.setCenter(new OpenLayers.LonLat(540000, 160000), 17);
- },
- failure: function() {
- alert("Trouble getting capabilities doc");
- OpenLayers.Console.error.apply(OpenLayers.Console, arguments);
- }
- });
-
- map2 = new OpenLayers.Map({
- div: "map2"
- });
}

0 comments on commit 81dffce

Please sign in to comment.