[Openstreetmap-dev] Re: Experimenting with SVG and JavaScript

nick at hogweed.org nick at hogweed.org
Thu Jul 21 14:28:25 BST 2005


>I believe the people over at www.onemap.org are using SVG as their map
>drawing method.  You might find some useful tips there.  I do not
>know, as I have never been able to get their map drawing front end to
>work.

OK thanks for that.

> Which bring me to my second point.  Please keep the browser
> requirements low, if you want as many people as possible to be able to
> view the map.  Requiring javascript will drop off a certain percentage
> of the possible users (for example me), and requiring svg as well will
> loose even more potential users.  If you want as many users as
> possible to be able to view your map, you should stick to the web
> browser features available in all browsers.

However far I get with an SVG version, I have no intention of withdrawing the 
current version  (and even that depends on JavaScript for the distance 
calculator!)  until SVG is fully supported by mainstream browsers and even 
then would keep a non SVG version up.

The SVG/JavaScript idea would be more of a "development" version, aimed at 
exploring the possibilities of technologies which will be more fully 
supported in the future. If a combination of JS and SVG will potentially lead 
to web applications which have all the interactivity of non-web desktop 
applications, it's something worth experimenting with.

For example, one thing I would like to do is allow a user of Freemap to 
contribute their own walks. I would like them to be able to define the route 
of their walk by dragging the mouse over the map to trace the route out. This 
is possible using straight JavaScript (no SVG), but finding the mouse 
position is hacky with cross-browser issues (ref: www.quirksmode.org - follow 
links to DHTML and finding mouse position). Having defined their route, it 
would be good to display the route overlaid on the Freemap map (again SVG 
seems best approach here) and the route to be sent across to a database of 
walking routes (can be done with non-SVG technology).

So while this is doable with non-SVG technology, the "DHTML" required is 
somewhat iffy from a standards point of view.

Nick




More information about the dev mailing list