<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 6/14/2016 8:41 AM, toni hernández wrote:<br>
    <blockquote
      cite="mid:170471f7-1add-5db3-fb1c-16bf5a61a9d7@sigte.udg.edu"
      type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      Hi everyone,<br>
      <br>
      I am trying to display OSM data into my web map as well as other
      custom layers.<br>
      One of the goals of my web application is to upload data from my
      application to the osm database.  I have been reading this <a
        moz-do-not-send="true" class="moz-txt-link-freetext"
        href="http://wiki.openstreetmap.org/wiki/API_v0.6#Elements"><a class="moz-txt-link-freetext" href="http://wiki.openstreetmap.org/wiki/API_v0.6#Elements">http://wiki.openstreetmap.org/wiki/API_v0.6#Elements</a></a>
      but still I do not understand how a PUT request functions. I have
      so much to learn....<br>
      <br>
      After authentificating with osmauth.js I try this code without any
      success. I get a 401 error.<br>
      <br>
      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>';<br>
      <br>
      ajaxurl= <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="http://www.openstreetmap.org/api/0.6/node/create">"http://www.openstreetmap.org/api/0.6/node/create"</a>;
    </blockquote>
    <br>
    I do not recommend the node/create API endpoint. Instead, use the
    diff upload API call documented at
<a class="moz-txt-link-freetext" href="http://wiki.openstreetmap.org/wiki/API_v0.6#Diff_upload:_POST_.2Fapi.2F0.6.2Fchangeset.2F.23id.2Fupload">http://wiki.openstreetmap.org/wiki/API_v0.6#Diff_upload:_POST_.2Fapi.2F0.6.2Fchangeset.2F.23id.2Fupload</a>.<br>
    <br>
    You will have to use this endpoint anyways for modifying existing
    data.<br>
  </body>
</html>