Merge pull request #4 from fredj/proj-defaults

Proj defaults: update examples
This commit is contained in:
ahocevar
2012-02-16 00:53:19 -08:00
13 changed files with 8 additions and 65 deletions
+1 -6
View File
@@ -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", {
-4
View File
@@ -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
}); });
-5
View File
@@ -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({
-5
View File
@@ -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
View File
@@ -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: {
+1 -6
View File
@@ -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();
+1 -2
View File
@@ -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);
+1 -5
View File
@@ -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)");
-3
View File
@@ -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(),
+1 -6
View File
@@ -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", {
+1 -6
View File
@@ -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();
+1 -6
View File
@@ -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();
+1 -6
View File
@@ -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();