AW: [OpenLayers-Users] Lines and polygons not showing

Arnd Wippermann arnd.wippermann at web.de
Sun Jul 17 12:14:00 EDT 2011


Hi,

The WKT string is correct. 

Perhaps you doesn't zoom near enough. 
The features have only a little extent. 

The point will have the same size for all zoom levels , but the line and the
polygon are drawn in map units and may be hidden by the point.

Arnd 

-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von erndev
Gesendet: Sonntag, 17. Juli 2011 00:40
An: users at openlayers.org
Betreff: [OpenLayers-Users] Lines and polygons not showing

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-tp6590
478p6590478.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list