[OSM-talk] New OpenStreetBugs javascript client
Florian Lohoff
flo at rfc822.org
Thu Nov 5 20:15:33 GMT 2009
On Thu, Nov 05, 2009 at 06:58:22PM +0100, Candid Dauth wrote:
> 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.
I like the idea and tried it - I fail to disable the layer by default
and the other problem i see is the control adding - i liked the old
OSB way of first having to click an icon at the top before a click
to the map adds a bug - otherwise one accidentally adds bugs or at least
lets the form pop up regularly - a click on the map should never alone
trigger an event - typically clicking on the map means click-hold - pan
double-click zoom - so left click should be reserved for navigation and
not other actions ...
/* Openstreetbugs */
var osb = new OpenLayers.Layer.OpenStreetBugs("OpenStreetBugs", { "visibility": false });
map.addLayer(osb);
var osbControl = new OpenLayers.Control.OpenStreetBugs(osb);
map.addControl(osbControl);
Thats basically my code i added ... (http://maxspeed.osm.lab.rfc822.org)
> 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?
Flo
--
Florian Lohoff flo at rfc822.org
"Es ist ein grobes Missverständnis und eine Fehlwahrnehmung, dem Staat
im Internet Zensur- und Überwachungsabsichten zu unterstellen."
- - Bundesminister Dr. Wolfgang Schäuble -- 10. Juli in Berlin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20091105/5a73ba97/attachment.pgp>
More information about the talk
mailing list