[OSM-talk] Clickable map (was: Very Happy - Looking forward)
Roland Olbricht
roland.olbricht at gmx.de
Sun Jul 22 07:59:10 BST 2012
> * Make it easy to users to view the data (eg clicking a node/way could
> bring up data about it - the url and opening hours tags are not visible in
> map renders but is very useful to many end users)
There is already a prototype that does show all data
http://overpass-api.de/open_layers_popup.html
Just pan and zoom to your area of interest and click somewhere on the map. It
then shows you all information known about named objects in this place.
A more verbatim variant is
http://overpass-api.de/open_layers_click.html
This shows all objects with their tag data.
Note that this is not a complete map but merely an OpenLayers addon. For that
reason, no search box, no shortlinks and so on are integrated. You can add it
easily to an existing map. Just include
<script src="http://overpass-api.de/overpass.js"></script>
and add
var click = new OpenLayers.Control.Click(
"http://overpass-api.de/api/popup?data="
+ "[out:popup(\"POIs\";[name][highway!~\".\"][railway!~\".\"][landuse!~\".\"][type!~\"route|network|associatedStreet\"][public_transport!~\".\"][route!~\"bus|ferry|railway|train|tram|trolleybus|subway|light_rail\"];\"name\";)(\"Streets\";[highway~\"primary|secondary|tertiary|residential|unclassified\"];\"name\";)(\"Public Transport Stops\";[name][highway~\"bus_stop|tram_stop\"];[name][railway~\"halt|station|tram_stop\"];\"name\";)(\"Public Transport Lines\";[route~\"bus|ferry|railway|train|tram|trolleybus|subway|light_rail|monorail\"];\"ref\";)];"
+ "(node(bbox);way(bbox););(._;<;);out;"
+ "&redirect=no&template=ids.popup", 0.0003, map);
map.addControl(click);
click.activate();
to your OpenLayers map. It is also a prototype in the sense that no documentation has been written for it yet.
Cheers,
Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20120722/5528c221/attachment.html>
More information about the talk
mailing list