[OpenLayers-Users] the labels of polygon display at wrong placement, Why?

jiyee jiyee.sheng at gmail.com
Mon Oct 31 07:22:46 EDT 2011


In my application, i wanna to label the polygon geometry, i use vector - WFS
protocal, but it display at wrong placement.
http://osgeo-org.1803224.n2.nabble.com/file/n6947791/sshot-1.png 

I have debugged this problem through the whole afternoon, it didn't have any
clues.
but in WMS protocal using the geoserver customed style, it works well.
http://osgeo-org.1803224.n2.nabble.com/file/n6947791/sshot-3.png 

I console.log(location.x + ", " + location.y); at the Renderer.js before
this.drawText(feature.id, style, location);
and I Query the PostGIS table using SELECT st_astext(centroid(the_geom))
FROM "DK_GEOM";
beyond compare, i find out the coordinate didn't display at the same bbox.
this is the two txt files including the coords.
http://osgeo-org.1803224.n2.nabble.com/file/n6947791/txt1.txt txt1.txt 
http://osgeo-org.1803224.n2.nabble.com/file/n6947791/txt1.txt txt1.txt 

So, I wonder this is the postgis problems while i import the shapefile into
postgis.
the imported Polygons use EPSG:2363, the shapefile placed belows:
http://osgeo-org.1803224.n2.nabble.com/file/n6947791/data.zip data.zip 

Thanks for any help...

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/the-labels-of-polygon-display-at-wrong-placement-Why-tp6947791p6947791.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list