[OpenLayers-Users] Problems applying different clipping bounds to a layer

Richard Marsden winwaed at gmail.com
Thu Dec 3 22:48:51 EST 2009


Hopefully someone can help me...

I'm currently using OpenLayers to display maps using a range of azimuthal
projections. The base map displays MapServer-derived WMS tiles using the
MapServer layer.

I am then trying to display one or more GML (KML file) or GeoRSS layers on
top of this. Of course these use a geographic coordinate system rather than
a true projection.

I have all of the above working fine. The problem comes because I want to
clip the KML or GeoRSS layers to one hemisphere (for simplicity, the
Northern Hemisphere).
The basemap tiles are already clipped to the northern hemisphere using "hard
clipping" of the actual data. The KML / GeoRSS is going to be supplied by
third parties so it has to be clipped at runtime. Simple clipping to
vertices would be fine - as it is, most of the data will be point markers.

There isn't an obvious way of doing this in the documentation, but I have
found the Strategy and BBOX Strategy classes. Both are poorly documented,
but it looks like Strategy might be the right approach? BBOX looks like it
only uses the current map view bounds. I've made a copy and tried to amend
this so it uses bounds set as the northern hemisphere in geographic coords (
new OpenLayers.Bounds(-180,0,180,90) ).  However, it didn't work.

Has anyone tried this kind of thing before? (applying an input data clip on
a layer using that layer's coordinate system)
If not, how would you approach it?


Best regards,

Richard Marsden
http://www.winwaed.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091203/cd2c05c7/attachment.html


More information about the Users mailing list