[OpenLayers-Users] Lines and polygons not showing

erndev erndev at gmail.com
Sat Jul 16 18:40:14 EDT 2011


Hi

I am trying to manually draw points, lines and polygons in a layer.
The problem is i am not sure what i am doing wrong, because only the points
are drawn.
Using linestring or drawing polygons, the vector are not shown.

for instance, i copied this from one of the examples, which draws a line, a
square and a point.
Well, only the point is shown in the map.

vectors = new OpenLayers.Layer.Vector("Vector Layer");
vectors.addFeatures(new
OpenLayers.Format.WKT().read("GEOMETRYCOLLECTION(POLYGON((101.6062003074316
3.0640666782082007,101.6062003074316 3.10252495806801,101.56774202884965
3.10252495806801,101.56774202884965 3.0640666782082007,101.6062003074316
3.0640666782082007)),LINESTRING(101.62542331644784
3.11522483403459,101.61014545395078
3.0517101246727796),POINT(101.62542331644784 3.0729961344301295))"));

best regards

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Lines-and-polygons-not-showing-tp6590478p6590478.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list