[OpenLayers-Users] struggling to draw a simple rectange
Mr. Puneet Kishor
punk.kish at gmail.com
Thu Jan 19 08:58:55 EST 2012
This is just not obvious to me, apologies for that. I am trying to draw a rectangle on a Google Maps base layer.
var vectorLayer = new OpenLayers.Layer.Vector("layer");
var p = new OpenLayers.Bounds(0,0,10,10).transform(
new OpenLayers.Projection("EPSG:4326"),
new OpenLayers.Projection("EPSG:900913")
).toGeometry();
map.addLayer(vectorLayer);
vectorLayer.addFeatures([p]);
The above does nothing for me. Please set me right.
--
Puneet Kishor
More information about the Users
mailing list