Openlayers Client - Layer bMa
Coordinate System | Image format |
---|---|
png |
Bounding Box
-180.0, -90.0, 180.0, 90.0
JavaScript code
<script src="static/OpenLayers.js"></script> <script type="text/javascript"> var map; function init(){ var mapOptions = { projection: new OpenLayers.Projection('EPSG:4326'), resolutions: [1.40625, 0.994368911044, 0.703125, 0.497184455522, 0.3515625, 0.248592227761, 0.17578125, 0.12429611388, 0.087890625, 0.0621480569402, 0.0439453125, 0.0310740284701, 0.02197265625, 0.0155370142351, 0.010986328125, 0.00776850711753, 0.0054931640625, 0.00388425355876, 0.00274658203125, 0.00194212677938, 0.00137329101562, 0.000971063389691, 0.000686645507812, 0.000485531694845, 0.000343322753906, 0.000242765847423, 0.000171661376953, 0.000121382923711, 8.58306884766e-05, 6.06914618557e-05, 4.29153442383e-05, 3.03457309278e-05, 2.14576721191e-05, 1.51728654639e-05, 1.07288360596e-05, 7.58643273196e-06, 5.36441802979e-06, 3.79321636598e-06, 2.68220901489e-06, 1.89660818299e-06], units: 'degree', maxExtent: new OpenLayers.Bounds(-180.0, -90.0, 180.0, 90.0) }; map = new OpenLayers.Map('map', mapOptions); var layer = new OpenLayers.Layer.WMTS({ name: "WMTS bMa", url: '../wmts/bMa', getURL: tileUrl, layer: 'bMa', matrixSet: 'global_geodetic_sqrt2', format: 'image/png', isBaseLayer: true, style: 'default', requestEncoding: 'REST' }); map.addLayer(layer) map.zoomToExtent(new OpenLayers.Bounds(-180.00, -90.00, 180.00, 90.00)); } function tileUrl(bounds) { var tileInfo = this.getTileInfo(bounds.getCenterLonLat()); return this.url + '/' + this.matrixSet + '/' + this.matrix.identifier + '/' + tileInfo.col + '/' + tileInfo.row + '.png'; } </script>