From 1cc8770476f56ea1012d5afe6cf9aa25319c3dc9 Mon Sep 17 00:00:00 2001 From: fredj Date: Thu, 16 Feb 2012 09:20:41 +0100 Subject: [PATCH] Use OpenLayers.Projection.defaults values. --- examples/canvas.js | 7 +------ examples/clientzoom.js | 4 ---- examples/mobile-base.js | 5 ----- examples/mobile-drawing.js | 5 ----- examples/mobile-navigation.js | 5 ----- examples/osm-google.js | 7 +------ examples/overviewmap.html | 3 +-- examples/sundials-spherical-mercator.html | 6 +----- examples/wfs-protocol-transactions.js | 3 --- examples/wfs-reprojection.js | 7 +------ examples/wmts-capabilities.js | 7 +------ examples/wmts-getfeatureinfo.js | 7 +------ examples/wmts.js | 7 +------ 13 files changed, 8 insertions(+), 65 deletions(-) diff --git a/examples/canvas.js b/examples/canvas.js index 6440c39a11..bb2f224f60 100644 --- a/examples/canvas.js +++ b/examples/canvas.js @@ -5,12 +5,7 @@ function init() { map = new OpenLayers.Map({ div: "map", projection: new OpenLayers.Projection("EPSG:900913"), - displayProjection: new OpenLayers.Projection("EPSG:4326"), - units: "m", - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508, -20037508, 20037508, 20037508 - ) + displayProjection: new OpenLayers.Projection("EPSG:4326") }); var g = new OpenLayers.Layer.Google("Google Layer", { diff --git a/examples/clientzoom.js b/examples/clientzoom.js index 65ae758c3c..30071edfef 100644 --- a/examples/clientzoom.js +++ b/examples/clientzoom.js @@ -5,10 +5,6 @@ function init() { map = new OpenLayers.Map({ div: "map", projection: "EPSG:900913", - units: "m", - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [], fractionalZoom: true }); diff --git a/examples/mobile-base.js b/examples/mobile-base.js index 5e123cc3b9..5440f932e2 100644 --- a/examples/mobile-base.js +++ b/examples/mobile-base.js @@ -41,12 +41,7 @@ var init = function (onSelectFeatureFunction) { div: "map", theme: null, projection: sm, - units: "m", numZoomLevels: 18, - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [ new OpenLayers.Control.Attribution(), new OpenLayers.Control.TouchNavigation({ diff --git a/examples/mobile-drawing.js b/examples/mobile-drawing.js index 34b26ec30f..13494ef321 100644 --- a/examples/mobile-drawing.js +++ b/examples/mobile-drawing.js @@ -41,12 +41,7 @@ function init() { map = new OpenLayers.Map({ div: 'map', projection: 'EPSG:900913', - units: 'm', numZoomLevels: 18, - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [ new OpenLayers.Control.TouchNavigation({ dragPanOptions: { diff --git a/examples/mobile-navigation.js b/examples/mobile-navigation.js index ce08b498e6..57929e9de3 100644 --- a/examples/mobile-navigation.js +++ b/examples/mobile-navigation.js @@ -5,12 +5,7 @@ function init() { div: "map", theme: null, projection: new OpenLayers.Projection("EPSG:900913"), - units: "m", numZoomLevels: 18, - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [ new OpenLayers.Control.TouchNavigation({ dragPanOptions: { diff --git a/examples/osm-google.js b/examples/osm-google.js index 77d96d82f4..aaa823395f 100644 --- a/examples/osm-google.js +++ b/examples/osm-google.js @@ -3,12 +3,7 @@ var map; function init() { map = new OpenLayers.Map({ div: "map", - projection: new OpenLayers.Projection("EPSG:900913"), - units: "m", - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508, -20037508, 20037508, 20037508.34 - ) + projection: new OpenLayers.Projection("EPSG:900913") }); var osm = new OpenLayers.Layer.OSM(); diff --git a/examples/overviewmap.html b/examples/overviewmap.html index 2cb9df9fc9..165c987e8b 100644 --- a/examples/overviewmap.html +++ b/examples/overviewmap.html @@ -91,8 +91,7 @@

Overview Map

maxExtent: new OpenLayers.Bounds(-8242894.927728, 4965204.031195, -8227290.161511, 4994963.723637), maxResolution: 116.24879860156216, - projection: "EPSG:900913", - units: "m" + projection: "EPSG:900913" }; var map2 = new OpenLayers.Map('map2', mapOptions); diff --git a/examples/sundials-spherical-mercator.html b/examples/sundials-spherical-mercator.html index 38f7b9321f..3ee614483f 100644 --- a/examples/sundials-spherical-mercator.html +++ b/examples/sundials-spherical-mercator.html @@ -31,11 +31,7 @@ function init(){ var options = { projection: new OpenLayers.Projection("EPSG:900913"), - displayProjection: new OpenLayers.Projection("EPSG:4326"), - units: "m", - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, - 20037508.34, 20037508.34) + displayProjection: new OpenLayers.Projection("EPSG:4326") }; map = new OpenLayers.Map('map', options); var mapnik = new OpenLayers.Layer.OSM("OpenStreetMap (Mapnik)"); diff --git a/examples/wfs-protocol-transactions.js b/examples/wfs-protocol-transactions.js index 1f61958fe2..6b1044edcf 100644 --- a/examples/wfs-protocol-transactions.js +++ b/examples/wfs-protocol-transactions.js @@ -38,9 +38,6 @@ function init() { map = new OpenLayers.Map('map', { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), - units: "m", - maxResolution: 20037508.34 / 128, - maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508), restrictedExtent: extent, controls: [ new OpenLayers.Control.PanZoom(), diff --git a/examples/wfs-reprojection.js b/examples/wfs-reprojection.js index d789b929b8..64a07367a2 100644 --- a/examples/wfs-reprojection.js +++ b/examples/wfs-reprojection.js @@ -7,12 +7,7 @@ function init() { var mercator = new OpenLayers.Projection("EPSG:900913"); map = new OpenLayers.Map('map', { - projection: mercator, - units: "m", - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508, -20037508, 20037508, 20037508 - ) + projection: mercator }); var g = new OpenLayers.Layer.Google("Google Layer", { diff --git a/examples/wmts-capabilities.js b/examples/wmts-capabilities.js index 27fa54a9c3..dc12941058 100644 --- a/examples/wmts-capabilities.js +++ b/examples/wmts-capabilities.js @@ -47,12 +47,7 @@ function init() { map = new OpenLayers.Map({ div: "map", - projection: "EPSG:900913", - units: "m", - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), - maxResolution: 156543.0339 + projection: "EPSG:900913" }); var osm = new OpenLayers.Layer.OSM(); diff --git a/examples/wmts-getfeatureinfo.js b/examples/wmts-getfeatureinfo.js index b2c949cdea..0b8cd8a627 100644 --- a/examples/wmts-getfeatureinfo.js +++ b/examples/wmts-getfeatureinfo.js @@ -5,12 +5,7 @@ function init() { map = new OpenLayers.Map({ div: "map", - projection: "EPSG:900913", - units: "m", - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), - maxResolution: 156543.0339 + projection: "EPSG:900913" }); var osm = new OpenLayers.Layer.OSM(); diff --git a/examples/wmts.js b/examples/wmts.js index 784e596b53..391a20030e 100644 --- a/examples/wmts.js +++ b/examples/wmts.js @@ -4,12 +4,7 @@ function init() { map = new OpenLayers.Map({ div: "map", - projection: "EPSG:900913", - units: "m", - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), - maxResolution: 156543.0339 + projection: "EPSG:900913" }); var osm = new OpenLayers.Layer.OSM();