[OSM-talk] New OpenStreetBugs javascript client

Candid Dauth mailinglists at cdauth.de
Thu Nov 5 17:58:22 GMT 2009


Hello there,

a new OpenStreetBugs backend has been there for a while (see 
http://wiki.openstreetmap.org/wiki/OpenStreetBugs and 
http://wiki.openstreetmap.org/wiki/User:Emka/new_OSB) to resolve problems of 
the old one. However, the old JavaScript code is still being used, as the new 
API is compatible to the old one.

The current OpenStreetBugs JavaScript code consists of lots of global 
functions that call each other, not using object orientation. This leads to 
two problems:
1. You cannot properly extend the code. If you want to change the bug icon or 
the name of the layer for example, you have to copy the openstreetbugs.js to 
your server and change the part in the code. This way, you have to apply bug 
fixes yourself. (You could also try to include the original JavaScript file 
and then overwrite the global functions, but this is not a very proper way.)
2. You cannot include the layer into multiple maps on one page.

Emka (the author of the new OSB API) asked me to write a new JavaScript 
client. For that, I used the class model of OpenLayers and extended the 
OpenLayers.Layer.Markers and the OpenLayers.Control classes. This new OSB 
client can be extended and easily included into multiple maps on one page. It 
is added to a map like a normal Layer. There is also a “read-only” mode where 
you cannot comment or close bugs. The documentation is currently available on 
http://wiki.openstreetmap.org/wiki/OpenStreetBugs/New_Client, see the 
JavaScript code on http://osm.cdauth.de/map/openstreetbugs.js.

The GUI is very similar to the old one, you can test it on 
http://osm.cdauth.de/map/ by selecting the “Create OpenStreetBug” tool (the 
green circle with the plus in it on the top right toolbar). It is currently 
translated to English and German, additional translations would be appreciated 
on http://wiki.openstreetmap.org/wiki/OpenStreetBugs/New_Client/Translation.

Currently, many maps link to the current view on OpenStreetBugs, with the new 
JavaScript library it becomes possible to show the bugs in their own map. Some 
people have also suggested to integrate OpenStreetBugs into openstreetmap.org, 
this would now be easily possible.

Are there any suggestions about the new client, especially about its GUI? Does 
it work properly on your browsers? What’s your opinion about integrating it in 
the Slippy Map on openstreetmap.org?


-- 
Candid Dauth
Rotbachstr. 9
88433 Schemmerhofen-Ingerkingen
Germany

http://cdauth.de/
mailto:mailinglists at cdauth.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20091105/674d7200/attachment.pgp>


More information about the talk mailing list