Mercurial > lada > lada-client
diff app/view/panel/Map.js @ 1274:a792eecf1614
Updated Layout and Map for 'ortsbezug'-window. WIP!
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 10 Jan 2017 10:03:57 +0100 |
parents | 26197c2d9362 |
children | 291df0037835 |
line wrap: on
line diff
--- a/app/view/panel/Map.js Wed Dec 14 10:21:48 2016 +0100 +++ b/app/view/panel/Map.js Tue Jan 10 10:03:57 2017 +0100 @@ -29,10 +29,11 @@ * OpenLayers map options. */ mapOptions: { - maxExtent: new OpenLayers.Bounds(2.9, 42.95, 18.1, 60.6), - scales: [5000000, 3000000, 2000000, 1000000, 500000, 250000, 100000, 25000], - units: 'dd', - projection: new OpenLayers.Projection('EPSG:4326') + maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), + //scales: [5000000, 3000000, 2000000, 1000000, 500000, 250000, 100000, 25000], + //numZoomLevels: 7, + projection: 'EPSG:3857', + displayProjection: new OpenLayers.Projection('EPSG:4326') }, @@ -43,17 +44,16 @@ initComponent: function() { var id = Ext.id(); this.layers = [ - new OpenLayers.Layer.WMS( + new OpenLayers.Layer.TMS( 'Standard' + id, - 'http://osm.intevation.de/cgi-bin/standard.fcgi?', + 'http://www.imis.bfs.de/mapcache/tms/', { - layers: 'OSM-WMS-Dienst', - format: 'image/png', - BGCOLOR: '0xFFFFFF' - }, { + layername: 'osm_bfs_google@GoogleMapsCompatible', isBaseLayer: true, - buffer: 0, - visibility: true + displayInLayerSwitcher: false, + type: 'png', + visibility: true, + projection: 'EPSG:3857', }) ]; this.map = new OpenLayers.Map('map_' + id, { @@ -138,7 +138,7 @@ // Create a new Feature Layer and add it to the map if (!this.featureLayer) { - this.featureLayer = new OpenLayers.Layer.Vector('vector_' + this.map.name, { + this.featureLayer = new OpenLayers.Layer.Vector('alle Messpunkte', { styleMap: new OpenLayers.StyleMap({ 'default': new OpenLayers.Style(OpenLayers.Util.applyDefaults({ externalGraphic: 'resources/lib/OpenLayers/img/marker-green.png', @@ -157,7 +157,11 @@ fontColor: 'blue', fontWeight: 'bold' }) - }) + }), + projection: new OpenLayers.Projection('EPSG:4326'), + preFeatureInsert: function(feature) { + feature.geometry.transform(new OpenLayers.Projection('EPSG:4326'), new OpenLayers.Projection('EPSG:3857')); + } }); this.selectControl = new OpenLayers.Control.SelectFeature(this.featureLayer, { clickout: false,