Use OpenLayers.Projection.defaults values.

This commit is contained in:
fredj
2012-02-16 09:20:41 +01:00
parent 262e2d5bc0
commit 1cc8770476
13 changed files with 8 additions and 65 deletions

View File

@@ -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", {

View File

@@ -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
});

View File

@@ -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({

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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();

View File

@@ -91,8 +91,7 @@
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);

View File

@@ -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)");

View File

@@ -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(),

View File

@@ -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", {

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();