0

I have two GeoServer WMS layers on OpenLayers 3 map. What I need to do is to make a button that will move one layer, let's say 10m to the East. Other layers should not move. Moved layer should keep 10m offset when zooming and panning.

I looked through OpenLayers documentation and examples, but I found nothing.

1

One possibility would be to make GeoServer to move the layer. You should make your OpenLayers application to use a tailored SLD or SLD_BODY for that layer and SLD should use the vendor parameter "offset". See the "Shadow" example in http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html

  • Thanks, this looks promising. I must admit that I never used external parameters for SLD but I will try. I hope this isn't too CPU intensive for the server. – Zoran Petrović Oct 23 '14 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.