Mercurial > lada > lada-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
1265:a4c1a9862a88 | 1274:a792eecf1614 |
---|---|
27 /** | 27 /** |
28 * @cfg | 28 * @cfg |
29 * OpenLayers map options. | 29 * OpenLayers map options. |
30 */ | 30 */ |
31 mapOptions: { | 31 mapOptions: { |
32 maxExtent: new OpenLayers.Bounds(2.9, 42.95, 18.1, 60.6), | 32 maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), |
33 scales: [5000000, 3000000, 2000000, 1000000, 500000, 250000, 100000, 25000], | 33 //scales: [5000000, 3000000, 2000000, 1000000, 500000, 250000, 100000, 25000], |
34 units: 'dd', | 34 //numZoomLevels: 7, |
35 projection: new OpenLayers.Projection('EPSG:4326') | 35 projection: 'EPSG:3857', |
36 displayProjection: new OpenLayers.Projection('EPSG:4326') | |
36 }, | 37 }, |
37 | 38 |
38 | 39 |
39 /** | 40 /** |
40 * @private | 41 * @private |
41 * Initialize the map panel. | 42 * Initialize the map panel. |
42 */ | 43 */ |
43 initComponent: function() { | 44 initComponent: function() { |
44 var id = Ext.id(); | 45 var id = Ext.id(); |
45 this.layers = [ | 46 this.layers = [ |
46 new OpenLayers.Layer.WMS( | 47 new OpenLayers.Layer.TMS( |
47 'Standard' + id, | 48 'Standard' + id, |
48 'http://osm.intevation.de/cgi-bin/standard.fcgi?', | 49 'http://www.imis.bfs.de/mapcache/tms/', |
49 { | 50 { |
50 layers: 'OSM-WMS-Dienst', | 51 layername: 'osm_bfs_google@GoogleMapsCompatible', |
51 format: 'image/png', | |
52 BGCOLOR: '0xFFFFFF' | |
53 }, { | |
54 isBaseLayer: true, | 52 isBaseLayer: true, |
55 buffer: 0, | 53 displayInLayerSwitcher: false, |
56 visibility: true | 54 type: 'png', |
55 visibility: true, | |
56 projection: 'EPSG:3857', | |
57 }) | 57 }) |
58 ]; | 58 ]; |
59 this.map = new OpenLayers.Map('map_' + id, { | 59 this.map = new OpenLayers.Map('map_' + id, { |
60 controls: [], | 60 controls: [], |
61 tileManager: null, | 61 tileManager: null, |
136 )); | 136 )); |
137 } | 137 } |
138 | 138 |
139 // Create a new Feature Layer and add it to the map | 139 // Create a new Feature Layer and add it to the map |
140 if (!this.featureLayer) { | 140 if (!this.featureLayer) { |
141 this.featureLayer = new OpenLayers.Layer.Vector('vector_' + this.map.name, { | 141 this.featureLayer = new OpenLayers.Layer.Vector('alle Messpunkte', { |
142 styleMap: new OpenLayers.StyleMap({ | 142 styleMap: new OpenLayers.StyleMap({ |
143 'default': new OpenLayers.Style(OpenLayers.Util.applyDefaults({ | 143 'default': new OpenLayers.Style(OpenLayers.Util.applyDefaults({ |
144 externalGraphic: 'resources/lib/OpenLayers/img/marker-green.png', | 144 externalGraphic: 'resources/lib/OpenLayers/img/marker-green.png', |
145 graphicOpacity: 1, | 145 graphicOpacity: 1, |
146 pointRadius: 10, | 146 pointRadius: 10, |
155 label: '${bez}', | 155 label: '${bez}', |
156 labelAlign: 'rt', | 156 labelAlign: 'rt', |
157 fontColor: 'blue', | 157 fontColor: 'blue', |
158 fontWeight: 'bold' | 158 fontWeight: 'bold' |
159 }) | 159 }) |
160 }) | 160 }), |
161 projection: new OpenLayers.Projection('EPSG:4326'), | |
162 preFeatureInsert: function(feature) { | |
163 feature.geometry.transform(new OpenLayers.Projection('EPSG:4326'), new OpenLayers.Projection('EPSG:3857')); | |
164 } | |
161 }); | 165 }); |
162 this.selectControl = new OpenLayers.Control.SelectFeature(this.featureLayer, { | 166 this.selectControl = new OpenLayers.Control.SelectFeature(this.featureLayer, { |
163 clickout: false, | 167 clickout: false, |
164 toggle: false, | 168 toggle: false, |
165 multiple: false, | 169 multiple: false, |