I would like to allow the user to generate a thumbnail image of what the user is seeing in the OpenLayers map canvas so the user may print, save, share, email, or whatever.
Any ideas of how i would go about doing this?
I'm looking for solutions that generate an image. I don't want to save the innerHTML, feature data or anything other than an image. An image is much easier to share and cannot later be modified.
Examples:
or this will also work:
Answer
I've been looking at some of the new functionality in the development version of the OpenLayers library, and there is a demo of this exact feature. In this example, it enables an image to be generated using the basemap, a wms and a vector overlay. The example seems to work on Firefox ok (but every so often I get a string of errors while the page load), Safari seems fine as does Chrome. I'm having a hard time getting it to work on my own server for my own application as it does require lots of reworking of code. Many pieces are not compatible with the current openlayers library.
No comments:
Post a Comment