[OpenLayers-Users] Accuracy of OpenLayers at scales less than
1:15000
j-ms
j-ms at souwest.co.za
Fri Sep 19 05:42:27 EDT 2008
I am developing an application that displays land ownership information via
OpenLayers. One of the requirements is to be able to select a land parcel
using OpenLayers using GetFeatureInfo for further manipulating. The problem
I have is that once I zoom down to a scale less than 1:15000, the accuracy
of the displayed land parcels goes out in a seemingly random manner.
The link http://souwest.dnsalias.com/instant/pages/test.html shows an
example of the problem. It shows a set of land parcels within a certain
bounds and has a layer showing a selected land parcel (in this example #15).
I am quite sure that the centroid of the land parcel being displayed is
correct as shown and that the bounds used to zoom are correct. At the zoom
selected by getZoomForExtents in this example, the map seems shifted north
and east. If you zoom out once, it then seems shifted south and west.
Zooming out more seems to show an accurate projection.
The WKT data for the selected land parcel is:
MULTIPOLYGON(((28.15951 -32.759207,28.159547 -32.759313,28.159599
-32.759351,28.159321 -32.759625,28.159174 -32.759518,28.159095
-32.759293,28.15951 -32.759207)))
The data is stored in Postgis served via GeoServer and the SRS is EPSG:4326.
Using Udig or going directly to GeoServer and exporting a png, the map is
shown 100% accurately so the problem I am having is only exhibited using
OpenLayers.
Could anyone perhaps help me to find what I am doing wrong ? This is my
first OpenLayers application (in fact, my first geospatial application !) so
I know I must be doing something really stupid. I have seen a post on this
mailing list about JS rounding errors but the extent of the inaccuracy shown
here is far greater than what was suggested in that post.
--
View this message in context: http://www.nabble.com/Accuracy-of-OpenLayers-at-scales-less-than-1%3A15000-tp19567946p19567946.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list