Tidy up new box code.
This commit is contained in:
parent
fdd5d2d779
commit
7daa4f5d2b
1 changed files with 8 additions and 8 deletions
|
@ -119,15 +119,15 @@ function addMarkerToMap(position, icon, description) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addBoxToMap(boxbounds) {
|
function addBoxToMap(boxbounds) {
|
||||||
box = new OpenLayers.Feature.Vector(
|
var geometry = boxbounds.toGeometry().transform(epsg4326, map.getProjectionObject());
|
||||||
boxbounds.toGeometry().transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()) );
|
var box = new OpenLayers.Feature.Vector(geometry, {}, {
|
||||||
|
strokeWidth: 3,
|
||||||
|
strokeColor: '#0000ff',
|
||||||
|
fillOpacity: 0,
|
||||||
|
});
|
||||||
|
|
||||||
box.style = {
|
|
||||||
'strokeWidth': 3,
|
|
||||||
'strokeColor': '#0000ff',
|
|
||||||
'fillOpacity': 0,
|
|
||||||
};
|
|
||||||
vectors.addFeatures(box);
|
vectors.addFeatures(box);
|
||||||
|
|
||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue