Use OpenLayers.Projection.defaults values.
This commit is contained in:
@@ -5,12 +5,7 @@ function init() {
|
|||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||||
displayProjection: new OpenLayers.Projection("EPSG:4326"),
|
displayProjection: new OpenLayers.Projection("EPSG:4326")
|
||||||
units: "m",
|
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508, -20037508, 20037508, 20037508
|
|
||||||
)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var g = new OpenLayers.Layer.Google("Google Layer", {
|
var g = new OpenLayers.Layer.Google("Google Layer", {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ function init() {
|
|||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
projection: "EPSG:900913",
|
projection: "EPSG:900913",
|
||||||
units: "m",
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
controls: [],
|
controls: [],
|
||||||
fractionalZoom: true
|
fractionalZoom: true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -41,12 +41,7 @@ var init = function (onSelectFeatureFunction) {
|
|||||||
div: "map",
|
div: "map",
|
||||||
theme: null,
|
theme: null,
|
||||||
projection: sm,
|
projection: sm,
|
||||||
units: "m",
|
|
||||||
numZoomLevels: 18,
|
numZoomLevels: 18,
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
controls: [
|
controls: [
|
||||||
new OpenLayers.Control.Attribution(),
|
new OpenLayers.Control.Attribution(),
|
||||||
new OpenLayers.Control.TouchNavigation({
|
new OpenLayers.Control.TouchNavigation({
|
||||||
|
|||||||
@@ -41,12 +41,7 @@ function init() {
|
|||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: 'map',
|
div: 'map',
|
||||||
projection: 'EPSG:900913',
|
projection: 'EPSG:900913',
|
||||||
units: 'm',
|
|
||||||
numZoomLevels: 18,
|
numZoomLevels: 18,
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
controls: [
|
controls: [
|
||||||
new OpenLayers.Control.TouchNavigation({
|
new OpenLayers.Control.TouchNavigation({
|
||||||
dragPanOptions: {
|
dragPanOptions: {
|
||||||
|
|||||||
@@ -5,12 +5,7 @@ function init() {
|
|||||||
div: "map",
|
div: "map",
|
||||||
theme: null,
|
theme: null,
|
||||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||||
units: "m",
|
|
||||||
numZoomLevels: 18,
|
numZoomLevels: 18,
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
controls: [
|
controls: [
|
||||||
new OpenLayers.Control.TouchNavigation({
|
new OpenLayers.Control.TouchNavigation({
|
||||||
dragPanOptions: {
|
dragPanOptions: {
|
||||||
|
|||||||
@@ -3,12 +3,7 @@ var map;
|
|||||||
function init() {
|
function init() {
|
||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
projection: new OpenLayers.Projection("EPSG:900913")
|
||||||
units: "m",
|
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508, -20037508, 20037508, 20037508.34
|
|
||||||
)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var osm = new OpenLayers.Layer.OSM();
|
var osm = new OpenLayers.Layer.OSM();
|
||||||
|
|||||||
@@ -91,8 +91,7 @@
|
|||||||
maxExtent: new OpenLayers.Bounds(-8242894.927728, 4965204.031195,
|
maxExtent: new OpenLayers.Bounds(-8242894.927728, 4965204.031195,
|
||||||
-8227290.161511, 4994963.723637),
|
-8227290.161511, 4994963.723637),
|
||||||
maxResolution: 116.24879860156216,
|
maxResolution: 116.24879860156216,
|
||||||
projection: "EPSG:900913",
|
projection: "EPSG:900913"
|
||||||
units: "m"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var map2 = new OpenLayers.Map('map2', mapOptions);
|
var map2 = new OpenLayers.Map('map2', mapOptions);
|
||||||
|
|||||||
@@ -31,11 +31,7 @@
|
|||||||
function init(){
|
function init(){
|
||||||
var options = {
|
var options = {
|
||||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||||
displayProjection: new OpenLayers.Projection("EPSG:4326"),
|
displayProjection: new OpenLayers.Projection("EPSG:4326")
|
||||||
units: "m",
|
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
|
|
||||||
20037508.34, 20037508.34)
|
|
||||||
};
|
};
|
||||||
map = new OpenLayers.Map('map', options);
|
map = new OpenLayers.Map('map', options);
|
||||||
var mapnik = new OpenLayers.Layer.OSM("OpenStreetMap (Mapnik)");
|
var mapnik = new OpenLayers.Layer.OSM("OpenStreetMap (Mapnik)");
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ function init() {
|
|||||||
map = new OpenLayers.Map('map', {
|
map = new OpenLayers.Map('map', {
|
||||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||||
displayProjection: new OpenLayers.Projection("EPSG:4326"),
|
displayProjection: new OpenLayers.Projection("EPSG:4326"),
|
||||||
units: "m",
|
|
||||||
maxResolution: 20037508.34 / 128,
|
|
||||||
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),
|
|
||||||
restrictedExtent: extent,
|
restrictedExtent: extent,
|
||||||
controls: [
|
controls: [
|
||||||
new OpenLayers.Control.PanZoom(),
|
new OpenLayers.Control.PanZoom(),
|
||||||
|
|||||||
@@ -7,12 +7,7 @@ function init() {
|
|||||||
var mercator = new OpenLayers.Projection("EPSG:900913");
|
var mercator = new OpenLayers.Projection("EPSG:900913");
|
||||||
|
|
||||||
map = new OpenLayers.Map('map', {
|
map = new OpenLayers.Map('map', {
|
||||||
projection: mercator,
|
projection: mercator
|
||||||
units: "m",
|
|
||||||
maxResolution: 156543.0339,
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508, -20037508, 20037508, 20037508
|
|
||||||
)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var g = new OpenLayers.Layer.Google("Google Layer", {
|
var g = new OpenLayers.Layer.Google("Google Layer", {
|
||||||
|
|||||||
@@ -47,12 +47,7 @@ function init() {
|
|||||||
|
|
||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
projection: "EPSG:900913",
|
projection: "EPSG:900913"
|
||||||
units: "m",
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
maxResolution: 156543.0339
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var osm = new OpenLayers.Layer.OSM();
|
var osm = new OpenLayers.Layer.OSM();
|
||||||
|
|||||||
@@ -5,12 +5,7 @@ function init() {
|
|||||||
|
|
||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
projection: "EPSG:900913",
|
projection: "EPSG:900913"
|
||||||
units: "m",
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
maxResolution: 156543.0339
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var osm = new OpenLayers.Layer.OSM();
|
var osm = new OpenLayers.Layer.OSM();
|
||||||
|
|||||||
@@ -4,12 +4,7 @@ function init() {
|
|||||||
|
|
||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
projection: "EPSG:900913",
|
projection: "EPSG:900913"
|
||||||
units: "m",
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-20037508.34, -20037508.34, 20037508.34, 20037508.34
|
|
||||||
),
|
|
||||||
maxResolution: 156543.0339
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var osm = new OpenLayers.Layer.OSM();
|
var osm = new OpenLayers.Layer.OSM();
|
||||||
|
|||||||
Reference in New Issue
Block a user