1

I ma currently developing a web mapping app. How do I make it possible for my app to clip and save area of interests or area I am working on. I can create a vector layer, modify it and delete if I want to, but how can I clip using OpenLayers 2.

1

One way to do this is using canvas.

Here's a working solution:

html2canvas

This script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.

And some examples.

Edit: You may be able to use GeoJson.write() to serialize your vector object. Here's another discussion on the matter.

  • I read the question as asking for a "clip, zip and ship" of vector data. Your answer does not seem to describe a vector data download. – PolyGeo Jul 13 '15 at 22:08
  • @PolyGeo you're likely correct, I've edited the post to better provide for 'clipping' a vector object. – Dylan Jul 14 '15 at 18:14

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.