Tidy up new box code.
This commit is contained in:
parent
fdd5d2d779
commit
7daa4f5d2b
1 changed files with 8 additions and 8 deletions
|
@ -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: 3,
|
||||
strokeColor: '#0000ff',
|
||||
fillOpacity: 0,
|
||||
});
|
||||
|
||||
box.style = {
|
||||
'strokeWidth': 3,
|
||||
'strokeColor': '#0000ff',
|
||||
'fillOpacity': 0,
|
||||
};
|
||||
vectors.addFeatures(box);
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue