[OSM-dev] Using API 0.6 to create a new node

Paul Norman penorman at mac.com
Wed Jun 15 08:57:46 UTC 2016

On 6/14/2016 8:41 AM, toni hernández wrote:
> Hi everyone,
> I am trying to display OSM data into my web map as well as other 
> custom layers.
> One of the goals of my web application is to upload data from my 
> application to the osm database.  I have been reading this 
> http://wiki.openstreetmap.org/wiki/API_v0.6#Elements but still I do 
> not understand how a PUT request functions. I have so much to learn....
> After authentificating with osmauth.js I try this code without any 
> success. I get a 401 error.
> var xml_string = '<?xml version="1.0" encoding="UTF-8"?> <osm 
> version="0.6" generator="MyOpenstreetmapApp"><node changeset="0" 
> lat="41.983910" lon="2.816094"><tag k="shop" 
> v="supermarket"/></node></osm>';
> ajaxurl= "http://www.openstreetmap.org/api/0.6/node/create"; 

I do not recommend the node/create API endpoint. Instead, use the diff 
upload API call documented at 

You will have to use this endpoint anyways for modifying existing data.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20160615/498e87d1/attachment.html>

More information about the dev mailing list