comparison app/view/panel/Map.js @ 879:729bfea7e8b1

Re-Styled the markers in the map: Increased icon-size of selected-marker to 15px, added colored labels to the markers showing the bezeichnung of the location
author Dustin Demuth <dustin@intevation.de>
date Tue, 21 Jul 2015 12:05:19 +0200
parents 1e7095533038
children 07dfcdf5b41f
comparison
equal deleted inserted replaced
878:545b8913601d 879:729bfea7e8b1
73 new OpenLayers.Geometry.Point( 73 new OpenLayers.Geometry.Point(
74 this.locationStore.getAt(i).get('longitude'), 74 this.locationStore.getAt(i).get('longitude'),
75 this.locationStore.getAt(i).get('latitude') 75 this.locationStore.getAt(i).get('latitude')
76 ), 76 ),
77 { 77 {
78 id: this.locationStore.getAt(i).get('id') 78 id: this.locationStore.getAt(i).get('id'),
79 bez: this.locationStore.getAt(i).get('bezeichnung')
79 } 80 }
80 )); 81 ));
81 } 82 }
82 this.featureLayer = new OpenLayers.Layer.Vector('vector_' + this.map.name, { 83 this.featureLayer = new OpenLayers.Layer.Vector('vector_' + this.map.name, {
83 styleMap: new OpenLayers.StyleMap({ 84 styleMap: new OpenLayers.StyleMap({
84 'default': new OpenLayers.Style(OpenLayers.Util.applyDefaults({ 85 'default': new OpenLayers.Style(OpenLayers.Util.applyDefaults({
85 externalGraphic: 'resources/lib/OpenLayers/img/marker-green.png', 86 externalGraphic: 'resources/lib/OpenLayers/img/marker-green.png',
86 graphicOpacity: 1, 87 graphicOpacity: 1,
87 pointRadius: 10 88 pointRadius: 10,
89 label: '${bez}',
90 labelAlign: 'rt',
91 fontColor: 'green',
92 fontWeight: 'bold'
88 }, OpenLayers.Feature.Vector.style['default'])), 93 }, OpenLayers.Feature.Vector.style['default'])),
89 'select': new OpenLayers.Style({ 94 'select': new OpenLayers.Style({
90 externalGraphic: 'resources/lib/OpenLayers/img/marker-blue.png' 95 externalGraphic: 'resources/lib/OpenLayers/img/marker-blue.png',
96 pointRadius: 15,
97 label: '${bez}',
98 labelAlign: 'rt',
99 fontColor: 'blue',
100 fontWeight: 'bold'
91 }) 101 })
92 }) 102 })
93 }); 103 });
94 this.featureLayer.addFeatures(this.locationFeatures); 104 this.featureLayer.addFeatures(this.locationFeatures);
95 this.map.addLayer(this.featureLayer); 105 this.map.addLayer(this.featureLayer);

http://lada.wald.intevation.org