1
var proj_current = map.getProjectionObject();
3
// Layer to hold the Features
4
featuresLayer = new OpenLayers.Layer.Vector("Locations", {
5
strategies: [ strategy ],
6
displayInLayerSwitcher: false
8
map.addLayer(featuresLayer);
10
var parser = new OpenLayers.Format.WKT();
11
var geom, popupContentHTML, iconURL;
13
{{for feature in features:}}
15
geom = parser.read('{{=feature.wkt}}').geometry;
17
geom = parser.read('POINT({{=feature.lon}}, {{=feature.lat}})').geometry;
19
geom = geom.transform(proj4326, projection_current);
20
popupContentHTML = "{{include 'gis/ol_features_popup.html'}}";
21
iconURL = '{{=URL(r=request, c='default', f='download', args=[feature.marker])}}';
22
add_Feature_with_popup(featuresLayer, '{{=feature.uuid}}', geom, popupContentHTML, iconURL);
25
// Select Control for Internal FeatureGroup Layers
26
select = new OpenLayers.Control.SelectFeature(featuresLayer, {
30
onSelect: onFeatureControlSelect,
31
onUnselect: onFeatureControlUnselect
34
map.addControl(select);