]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
Remove trailing comma to make IE happy.
[rails.git] / public / javascripts / map.js
index a52cd0a7047dcd43006ae2bd68466b5d8e64affe..92967adcd9c01fb02143b8b0ac3458548b260c94 100644 (file)
@@ -118,16 +118,16 @@ function addMarkerToMap(position, icon, description) {
    return marker;
 }
 
-function addBoxToMap(boxbounds) {      
-   box = new OpenLayers.Feature.Vector(
-            boxbounds.toGeometry().transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()) );
+function addBoxToMap(boxbounds) {
+   var geometry = boxbounds.toGeometry().transform(epsg4326, map.getProjectionObject());
+   var box = new OpenLayers.Feature.Vector(geometry, {}, {
+      strokeWidth: 2,
+      strokeColor: '#ee9900',
+      fillOpacity: 0
+   });
    
-   box.style = {
-         'strokeWidth': 3,
-         'strokeColor': '#0000ff',
-         'fillOpacity': 0,
-       };
    vectors.addFeatures(box);
+
    return box;
 }