[OSM-talk] Web Based Yahoo! Maps/OpenLayers Editor

Christopher Schmidt crschmidt at metacarta.com
Mon Apr 16 02:05:01 BST 2007


http://labs.metacarta.com/osm/edit.html

Draw a feature, you'll get something like:

http://labs.metacarta.com/osm/edit.html?lat=51.50281&lon=-0.04867&zoom=16&layers=TBT0

You can edit the JSON for this feature here:

http://labs.metacarta.com/osm/edit-json.html?id=3

Once you do, it will update the content, including the OSM export:

http://labs.metacarta.com/osm/fs/featureserver.cgi/scribble/3.osm

If you enter attribute values, you can query against them, like so:

http://labs.metacarta.com/osm/fs/featureserver.cgi/scribble/data.osm?queryable=status&status=demoonly

Which gives you a .osm file that JOSM can open.

You can get a GeoRSS feed of all edits:

http://labs.metacarta.com/osm/fs/featureserver.cgi/scribble/data.atom?maxfeatures=10

You can use:
http://labs.metacarta.com/osm/fs/featureserver.cgi/scribble/data.gml as
a WFS layer in OpenLayers in any version with Vector support.

Note that the Yahoo! API is kind of clunky, and sometimes doesn't do
things like get go of mouse controls. If you're in a position where you
can't draw, you might try clicking on the controls, or zooming in/out.

Additionally, you can load map data from the rectifier, by entering a
rectifier ID: '79' is a nicely warped map of baghdad.

There is also OpenStreetmap data from the 2007-04-04 planet dump as an
additional layer. Just click the layer switcher, and yu'll be able to
see the areas of the map that have already been filled in.

If the OSM export is bad for some reason, let me know. I believe that
this is a valid use of Yahoo's API via their agreement with OSM. If it's
not, please also let me know, and I can take it down.

Also, if you find it useful, it would be nice to know that too :)

Nick: You might want to look at something like this for your editor. The
Yahoo!  vector drawing code only works in
http://svn.openlayers.org/sandbox/crschmidt/slowvector/ -- this will be
merged in some way before 2.5.

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the talk mailing list