[OpenLayers-Commits] r11963 - sandbox/august/trunk/playground/wmts
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Mon May 9 19:31:33 EDT 2011
Author: augusttown
Date: 2011-05-09 16:31:32 -0700 (Mon, 09 May 2011)
New Revision: 11963
Added:
sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-customized-tilingschema.html
sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-epsg3857.html
sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-wgs84.html
Log:
Add jsapi-wmts-ags-* samples.
Added: sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-customized-tilingschema.html
===================================================================
--- sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-customized-tilingschema.html (rev 0)
+++ sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-customized-tilingschema.html 2011-05-09 23:31:32 UTC (rev 11963)
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=7" />
+ <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices-->
+ <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
+ <title>Portland Tile Server</title>
+ <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">
+ <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
+ <script type="text/javascript">
+
+ dojo.require("esri.map");
+
+ function init() {
+ initLayer();
+ var map = new esri.Map("map");
+ map.addLayer(new ogc.WMTSLayer());
+
+ var lon = 7647130.2520;
+ var lat = 669087.0178;
+ var zoom = 1;
+ var crs = new esri.SpatialReference({wkid:2913});
+ map.centerAndZoom(
+ new esri.geometry.Point(lon, lat, crs),
+ zoom
+ );
+ }
+
+ function initLayer(){
+ dojo.declare("ogc.WMTSLayer", esri.layers.TiledMapServiceLayer, { // create WMTSLayer by extending esri.layers.TiledMapServiceLayer
+ constructor: function() {
+ this.spatialReference = new esri.SpatialReference({wkid:2913});
+ this.initialExtent = new esri.geometry.Extent(7241196.8729, 128656.7859, 9265592.9584, 981999.6828, this.spatialReference);
+ this.fullExtent = new esri.geometry.Extent(7241196.8729, 128656.7859, 9265592.9584, 981999.6828, this.spatialReference);
+ this.tileInfo = new esri.layers.TileInfo({
+ "rows": 256,
+ "cols": 256,
+ "dpi" : 96,
+ "format": "PNG",
+ "compressionQuality": 0,
+ "origin" : {
+ "x" : 7241196.8729,
+ "y" : 981999.6828
+ },
+ "spatialReference": {
+ "wkid" : 2913
+ },
+ "lods" : [
+ {"level" : 0, "resolution" : 2048000/(96*12), "scale" : 2048000.0},
+ {"level" : 1, "resolution" : 1024000/(96*12), "scale" : 1024000.0},
+ {"level" : 2, "resolution" : 512000/(96*12), "scale" : 512000.0},
+ {"level" : 3, "resolution" : 256000/(96*12), "scale" : 256000.0},
+ {"level" : 4, "resolution" : 128000/(96*12), "scale" : 128000.0},
+ {"level" : 5, "resolution" : 64000/(96*12), "scale" : 64000.0},
+ {"level" : 6, "resolution" : 32000/(96*12), "scale" : 32000.0},
+ {"level" : 7, "resolution" : 16000/(96*12), "scale" : 16000.0},
+ {"level" : 8, "resolution" : 8000/(96*12), "scale" : 8000.0},
+ {"level" : 9, "resolution" : 4000/(96*12), "scale" : 4000.0},
+ {"level" : 10,"resolution" : 2000/(96*12), "scale" : 2000.0},
+ /*
+ {"level" : 0, "scale" : 2048000.0},
+ {"level" : 1, "scale" : 1024000.0},
+ {"level" : 2, "scale" : 512000.0},
+ {"level" : 3, "scale" : 256000.0},
+ {"level" : 4, "scale" : 128000.0},
+ {"level" : 5, "scale" : 64000.0},
+ {"level" : 6, "scale" : 32000.0},
+ {"level" : 7, "scale" : 16000.0},
+ {"level" : 8, "scale" : 8000.0},
+ {"level" : 9, "scale" : 4000.0},
+ {"level" : 10,"scale" : 2000.0},
+ */
+ /*
+ {"level" : 0, "resolution" : 2048000/(96*12)},
+ {"level" : 1, "resolution" : 1024000/(96*12)},
+ {"level" : 2, "resolution" : 512000/(96*12)},
+ {"level" : 3, "resolution" : 256000/(96*12)},
+ {"level" : 4, "resolution" : 128000/(96*12)},
+ {"level" : 5, "resolution" : 64000/(96*12)},
+ {"level" : 6, "resolution" : 32000/(96*12)},
+ {"level" : 7, "resolution" : 16000/(96*12)},
+ {"level" : 8, "resolution" : 8000/(96*12)},
+ {"level" : 9, "resolution" : 4000/(96*12)},
+ {"level" : 10,"resolution" : 2000/(96*12)}
+ */
+ ]
+ });
+ this.loaded = true;
+ this.onLoad(this);
+ },
+ getTileUrl: function(level, row, col) {
+ return "http://sazabiii:6080/arcgis/rest/services/portland_wmts/MapServer/WMTS/tile/1.0.0"
+ + "/Layers/EsriStyle/EsriTileMatrix"
+ + "/" + level
+ + "/"+ row
+ + "/"+ col
+ + ".png";
+ }
+ });
+ }
+ dojo.addOnLoad(init);
+ </script>
+ </head>
+ <body>
+ <div id="map" class="claro" style="width:512px;height:512px;border:1px solid #000;"></div>
+ </body>
+</html>
Added: sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-epsg3857.html
===================================================================
--- sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-epsg3857.html (rev 0)
+++ sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-epsg3857.html 2011-05-09 23:31:32 UTC (rev 11963)
@@ -0,0 +1,371 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=7" />
+ <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices-->
+ <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
+ <title>Portland Tile Server</title>
+ <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">
+ <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
+ <script type="text/javascript">
+ dojo.require("esri.map");
+
+ function init() {
+ initLayer();
+ var map = new esri.Map("map");
+ map.addLayer(new ogc.WMTSLayer());
+ }
+
+ function initLayer(){
+ dojo.declare("ogc.WMTSLayer", esri.layers.TiledMapServiceLayer, { // create WMTSLayer by extending esri.layers.TiledMapServiceLayer
+ constructor: function() {
+ this.spatialReference = new esri.SpatialReference({wkid:3857});
+ this.initialExtent = new esri.geometry.Extent(-20037508.342789, -20037508.342789, 20037508.342789, 20037508.342789, this.spatialReference);
+ this.fullExtent = new esri.geometry.Extent(-20037508.342789, -20037508.342789, 20037508.342789, 20037508.342789, this.spatialReference);
+ /*
+ this.tileInfo = new esri.layers.TileInfo({
+ "rows": 256,
+ "cols": 256,
+ "dpi" : 96,
+ "format": "PNG",
+ "compressionQuality": 0,
+ "origin" : {
+ "x" : -20037508.342789,
+ "y" : 20037508.342789
+ },
+ "spatialReference": {
+ "wkid" : 3857
+ },
+ "lods" : [
+ {"level" : 0, "resolution" : 156543.0339, "scale" : 5.590822639508929E8},
+ {"level" : 1, "resolution" : 78271.51695, "scale" : 2.7954113197544646E8},
+ {"level" : 2, "resolution" : 39135.758475, "scale" : 1.3977056598772323E8},
+ {"level" : 3, "resolution" : 19567.8792375, "scale" : 6.988528299386162E7},
+ {"level" : 4, "resolution" : 9783.93961875, "scale" : 3.494264149693081E7},
+ {"level" : 5, "resolution" : 4891.969809375, "scale" : 1.7471320748465404E7},
+ {"level" : 6, "resolution" : 2445.9849046875, "scale" : 8735660.374232702},
+ {"level" : 7, "resolution" : 1222.99245234375, "scale" : 4367830.187116351},
+ {"level" : 8, "resolution" : 611.496226171875, "scale" : 2183915.0935581755},
+ {"level" : 9, "resolution" : 305.7481130859375, "scale" : 1091957.5467790877},
+ {"level" : 10, "resolution" : 152.8740565429688, "scale" : 545978.7733895439},
+ {"level" : 11, "resolution" : 76.43702827148438, "scale" : 272989.38669477194},
+ {"level" : 12, "resolution" : 38.21851413574219, "scale" : 136494.69334738597},
+ {"level" : 13, "resolution" : 19.10925706787109, "scale" : 68247.34667369298},
+ {"level" : 14, "resolution" : 9.554628533935547, "scale" : 34123.67333684649},
+ {"level" : 15, "resolution" : 4.777314266967773, "scale" : 17061.836668423246},
+ {"level" : 16, "resolution" : 2.388657133483887, "scale" : 8530.918334211623}
+ ]
+ });
+ */
+ // use tileinfo object generated by wmts2tileinfo
+ this.tileInfo = new esri.layers.TileInfo({
+ "dpi": "90.71428571427429",
+ "format": "image/png",
+ "compressionQuality": 0,
+ "spatialReference": {
+ "wkid": "3857"
+ },
+ "rows": 256,
+ "cols": 256,
+ "origin": {
+ "x": -20037508.342789,
+ "y": 20037508.342789
+ },
+ // Scales in DPI 96
+ /*
+ "lods": [
+ {
+ "level": 0,
+ "scale": 591657527.591555,
+ "resolution": 156543.033928
+ },
+ {
+ "level": 1,
+ "scale": 295828763.795777,
+ "resolution": 78271.5169639999
+ },
+ {
+ "level": 2,
+ "scale": 147914381.897889,
+ "resolution": 39135.7584820001
+ },
+ {
+ "level": 3,
+ "scale": 73957190.948944,
+ "resolution": 19567.8792409999
+ },
+ {
+ "level": 4,
+ "scale": 36978595.474472,
+ "resolution": 9783.93962049996
+ },
+ {
+ "level": 5,
+ "scale": 18489297.737236,
+ "resolution": 4891.96981024998
+ },
+ {
+ "level": 6,
+ "scale": 9244648.868618,
+ "resolution": 2445.98490512499
+ },
+ {
+ "level": 7,
+ "scale": 4622324.434309,
+ "resolution": 1222.99245256249
+ },
+ {
+ "level": 8,
+ "scale": 2311162.217155,
+ "resolution": 611.49622628138
+ },
+ {
+ "level": 9,
+ "scale": 1155581.108577,
+ "resolution": 305.748113140558
+ },
+ {
+ "level": 10,
+ "scale": 577790.554289,
+ "resolution": 152.874056570411
+ },
+ {
+ "level": 11,
+ "scale": 288895.277144,
+ "resolution": 76.4370282850732
+ },
+ {
+ "level": 12,
+ "scale": 144447.638572,
+ "resolution": 38.2185141425366
+ },
+ {
+ "level": 13,
+ "scale": 72223.819286,
+ "resolution": 19.1092570712683
+ },
+ {
+ "level": 14,
+ "scale": 36111.909643,
+ "resolution": 9.55462853563415
+ },
+ {
+ "level": 15,
+ "scale": 18055.954822,
+ "resolution": 4.77731426794937
+ },
+ {
+ "level": 16,
+ "scale": 9027.977411,
+ "resolution": 2.38865713397468
+ },
+ {
+ "level": 17,
+ "scale": 4513.988705,
+ "resolution": 1.19432856685505
+ },
+ {
+ "level": 18,
+ "scale": 2256.994353,
+ "resolution": 0.597164283559817
+ },
+ {
+ "level": 19,
+ "scale": 1128.497176,
+ "resolution": 0.298582141647617
+ }
+ ]
+ */
+ // Scales in DPI 90.7 (OGC 0.28mm)
+ "lods": [
+ {
+ "level": 0,
+ "scale": 559082263.9508929,
+ "resolution": 156543.0339062697
+ },
+ {
+ "level": 1,
+ "scale": 279541131.97544646,
+ "resolution": 78271.51695313485
+ },
+ {
+ "level": 2,
+ "scale": 139770565.98772323,
+ "resolution": 39135.758476567426
+ },
+ {
+ "level": 3,
+ "scale": 69885282.99386162,
+ "resolution": 19567.879238283713
+ },
+ {
+ "level": 4,
+ "scale": 34942641.49693081,
+ "resolution": 9783.939619141856
+ },
+ {
+ "level": 5,
+ "scale": 17471320.748465404,
+ "resolution": 4891.969809570928
+ },
+ {
+ "level": 6,
+ "scale": 8735660.374232702,
+ "resolution": 2445.984904785464
+ },
+ {
+ "level": 7,
+ "scale": 4367830.187116351,
+ "resolution": 1222.992452392732
+ },
+ {
+ "level": 8,
+ "scale": 2183915.0935581755,
+ "resolution": 611.496226196366
+ },
+ {
+ "level": 9,
+ "scale": 1091957.5467790877,
+ "resolution": 305.748113098183
+ },
+ {
+ "level": 10,
+ "scale": 545978.7733895439,
+ "resolution": 152.8740565490915
+ },
+ {
+ "level": 11,
+ "scale": 272989.38669477194,
+ "resolution": 76.43702827454575
+ },
+ {
+ "level": 12,
+ "scale": 136494.69334738597,
+ "resolution": 38.21851413727288
+ },
+ {
+ "level": 13,
+ "scale": 68247.34667369298,
+ "resolution": 19.10925706863644
+ },
+ {
+ "level": 14,
+ "scale": 34123.67333684649,
+ "resolution": 9.55462853431822
+ },
+ {
+ "level": 15,
+ "scale": 17061.836668423246,
+ "resolution": 4.77731426715911
+ },
+ {
+ "level": 16,
+ "scale": 8530.918334211623,
+ "resolution": 2.388657133579555
+ },
+ {
+ "level": 17,
+ "scale": 4265.4591671058115,
+ "resolution": 1.1943285667897774
+ },
+ {
+ "level": 18,
+ "scale": 2132.7295835529058,
+ "resolution": 0.5971642833948887
+ },
+ {
+ "level": 19,
+ "scale": 1066.3647917764529,
+ "resolution": 0.29858214169744435
+ },
+ {
+ "level": 20,
+ "scale": 533.1823958882264,
+ "resolution": 0.14929107084872217
+ },
+ {
+ "level": 21,
+ "scale": 266.5911979441132,
+ "resolution": 0.07464553542436109
+ },
+ {
+ "level": 22,
+ "scale": 133.2955989720566,
+ "resolution": 0.03732276771218054
+ },
+ {
+ "level": 23,
+ "scale": 66.6477994860283,
+ "resolution": 0.01866138385609027
+ },
+ {
+ "level": 24,
+ "scale": 33.32389974301415,
+ "resolution": 0.009330691928045136
+ },
+ {
+ "level": 25,
+ "scale": 16.661949871507076,
+ "resolution": 0.004665345964022568
+ },
+ {
+ "level": 26,
+ "scale": 8.330974935753538,
+ "resolution": 0.002332672982011284
+ },
+ {
+ "level": 27,
+ "scale": 4.165487467876769,
+ "resolution": 0.001166336491005642
+ },
+ {
+ "level": 28,
+ "scale": 2.0827437339383845,
+ "resolution": 0.000583168245502821
+ },
+ {
+ "level": 29,
+ "scale": 1.0413718669691923,
+ "resolution": 0.0002915841227514105
+ },
+ {
+ "level": 30,
+ "scale": 0.5206859334845961,
+ "resolution": 0.00014579206137570525
+ }
+ ]
+ });
+ this.loaded = true;
+ this.onLoad(this);
+ },
+ /*
+ getTileUrl: function(level, row, col) {
+ return "http://sazabiii:8080/geowebcache.10012010.snapshot/service/wmts"
+ + "?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile"
+ + "&LAYER=sazabiii.bluemarble"
+ + "&STYLE="
+ + "&FORMAT=image/png"
+ + "&TILEMATRIXSET=arcgisonline.epsg3857"
+ + "&TILEMATRIX=arcgisonline.epsg3857." + level
+ + "&TILEROW=" + row
+ + "&TILECOL=" + col;
+ }
+ */
+ getTileUrl: function(level, row, col) {
+ return "http://sazabiii:6080/arcgis/rest/services/world_wmts/MapServer/WMTS/tile/1.0.0"
+ + "/Layers/EsriStyle/EsriTileMatrix"
+ + "/" + level
+ + "/"+ row
+ + "/"+ col
+ + ".png";
+ }
+ });
+ }
+ dojo.addOnLoad(init);
+ </script>
+ </head>
+ <body>
+ <div id="map" class="claro" style="width:1024px;height:512px;border:1px solid #000;"></div>
+ </body>
+</html>
Added: sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-wgs84.html
===================================================================
--- sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-wgs84.html (rev 0)
+++ sandbox/august/trunk/playground/wmts/jsapi-wmts-ags-wgs84.html 2011-05-09 23:31:32 UTC (rev 11963)
@@ -0,0 +1,141 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=7" />
+ <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices-->
+ <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
+ <title>Portland Tile Server</title>
+ <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">
+ <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
+ <script type="text/javascript">
+ dojo.require("esri.map");
+
+ function init() {
+ initLayer();
+ var map = new esri.Map("map");
+ map.addLayer(new ogc.WMTSLayer());
+ }
+
+ function initLayer(){
+ dojo.declare("ogc.WMTSLayer", esri.layers.TiledMapServiceLayer, { // create WMTSLayer by extending esri.layers.TiledMapServiceLayer
+ constructor: function() {
+ this.spatialReference = new esri.SpatialReference({wkid:4326});
+ this.initialExtent = new esri.geometry.Extent(-180.0, -90.0, 180.0, 90.0, this.spatialReference);
+ this.fullExtent = new esri.geometry.Extent(-180.0, -90.0, 180.0, 90.0, this.spatialReference);
+
+ this.tileInfo = new esri.layers.TileInfo({
+ "rows": 256,
+ "cols": 256,
+ "dpi" : 96,
+ "format": "PNG",
+ "compressionQuality": 0,
+ "origin" : {
+ "x" : -180.0,
+ "y" : 90.0
+ },
+ "spatialReference": {
+ "wkid" : 4326
+ },
+ "lods" : [
+ {"level" : 0, "resolution" : 0.703125, "scale" : 295497598.570834},
+ {"level" : 1, "resolution" : 0.351562499999999, "scale" : 147748799.285417},
+ {"level" : 2, "resolution" : 0.17578125, "scale" : 73874399.6427087},
+ {"level" : 3, "resolution" : 0.0878906250000001, "scale" : 36937199.8213544},
+ {"level" : 4, "resolution" : 0.0439453125, "scale" : 18468599.9106772},
+ {"level" : 5, "resolution" : 0.02197265625, "scale" : 9234299.95533859},
+ {"level" : 6, "resolution" : 0.010986328125, "scale" : 4617149.97766929},
+ {"level" : 7, "resolution" : 0.0054931640625, "scale" : 2308574.98883465},
+ {"level" : 8, "resolution" : 0.00274658203124999, "scale" : 1154287.49441732},
+ {"level" : 9, "resolution" : 0.001373291015625, "scale" : 577143.747208662},
+ {"level" : 10, "resolution" : 0.0006866455078125, "scale" : 288571.873604331},
+ {"level" : 11, "resolution" : 0.000343322753906249, "scale" : 144285.936802165},
+ {"level" : 12, "resolution" : 0.000171661376953125, "scale" : 72142.9684010827},
+ {"level" : 13, "resolution" : 8.58306884765626E-05, "scale" : 36071.4842005414},
+ {"level" : 14, "resolution" : 4.29153442382813E-05, "scale" : 18035.7421002707},
+ {"level" : 15, "resolution" : 2.14576721191406E-05, "scale" : 9017.87105013534},
+ {"level" : 16, "resolution" : 1.07288360595703E-05, "scale" : 4508.93552506767}
+ ]
+ });
+
+ // use the tileinfo object generated by wmts2tileinfo
+ /*
+ this.tileInfo = new esri.layers.TileInfo(
+ {
+ "dpi": "90.71428571427429",
+ "format": "PNG",
+ "compressionQuality": 0,
+ "spatialReference": {
+ "wkid": "4326"
+ },
+ "rows": 256,
+ "cols": 256,
+ "origin": {
+ "x": -180,
+ "y": 90
+ },
+ "lods": [
+ {
+ "level": 0,
+ "scale": 279542134.48660713,
+ "resolution": 0.7031250070181514
+ },
+ {
+ "level": 1,
+ "scale": 139771067.24330357,
+ "resolution": 0.3515625035090757
+ },
+ {
+ "level": 2,
+ "scale": 69885533.62165178,
+ "resolution": 0.17578125175453785
+ },
+ {
+ "level": 3,
+ "scale": 34942766.81082589,
+ "resolution": 0.08789062587726892
+ },
+ {
+ "level": 4,
+ "scale": 17471383.405412946,
+ "resolution": 0.04394531293863446
+ },
+ {
+ "level": 5,
+ "scale": 8735691.702706473,
+ "resolution": 0.02197265646931723
+ },
+ {
+ "level": 6,
+ "scale": 4367845.8513532365,
+ "resolution": 0.010986328234658616
+ },
+ {
+ "level": 7,
+ "scale": 2183922.9256766182,
+ "resolution": 0.005493164117329308
+ }
+ ]
+ }
+ );
+ */
+ this.loaded = true;
+ this.onLoad(this);
+ },
+ getTileUrl: function(level, row, col) {
+ return "http://sazabiii:6080/arcgis/rest/services/bluemarble_wmts/MapServer/WMTS/tile/1.0.0"
+ + "/Layers/EsriStyle/EsriTileMatrix"
+ + "/" + level
+ + "/"+ row
+ + "/"+ col
+ + ".png";
+ }
+ });
+ }
+ dojo.addOnLoad(init);
+ </script>
+ </head>
+ <body>
+ <div id="map" class="claro" style="width:1024px;height:512px;border:1px solid #000;"></div>
+ </body>
+</html>
More information about the Commits
mailing list