Hello, I want to add a share button on the map. By clicking it user should able to share current map Image. Such functionality is already given at http://www.openstreetmap.org/#map=2/49.0/124.1. I want to do the same. Can I have small example? Thanks Hardik Pancholi asked 24 Mar '14, 06:03 hardikpancho... iii |
You are refering to what we call 'permalink'. This functionality is embedded in the particular webmap library you are using to display the interactive map. So there are different ways on how to enable this kind of functionality on the libs:
Then you just need a piece of JavaScript that triggers that functionality and returns an link wherever you want it. answered 24 Mar '14, 10:16 iii Hello, You gave very nice example. Using http://openlayers.org/dev/examples/controls.html now I am able to add zooming pane. But in this example there isn't anything related to Share functionality. Can you give some specific example for share? Thanks
(25 Mar '14, 03:30)
hardikpancho...
click the "permalink" in the right bottom corner. The URL in your browser will change. It typically adds coordinates and depending on the application selected layers, etc. Copy the http-address from your browser's address bar, This is different UI from the Share button you see on OSM.org, but does basically the same.
(25 Mar '14, 16:05)
escada
1
Hello, Sorry but I didn't get you. What I want to share functionality same as on http://www.openstreetmap.org/. In right side menu list there are list of functionality are there. I want to implement share functionality. It will be really good If I can have example. Thanks
(27 Mar '14, 06:30)
hardikpancho...
perhaps look at the source code of the main page. All functionality is Javascript and can be examined through your browser. Or look at the source repository for the website (I don't have a link to that)
(27 Mar '14, 16:26)
escada
|