<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to make a form with Argis 3.40? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-make-a-form-with-argis-3-40/m-p/1176843#M77460</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I did not find information on how I can make a form in version 3.40, but what I need, a form where I can insert the longitude and latitude where it shows it on the map once inserted.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For the time being, I add the points with a button:&lt;/P&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A title="Sample graphics add" href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=graphics_add" target="_self"&gt;Sample graphics add&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/**
   * The function is called initToolbar() and it creates a new Draw object called tb. The tb object is
   * then used to create a new event listener called "draw-end" which calls the addGraphic() function.
   * The function then creates a new event listener called "click" which listens for clicks on the
   * "info" div. If the click is on the "info" div, the function returns. If the click is on a button,
   * the function gets the id of the button and sets the tool variable to the id of the button. The map
   * navigation is then disabled and the tb object is activated with the tool variable.
   * @returns the value of the variable tb.
   */
  function initToolbar() {
    tb = new Draw(map);
    tb.on("draw-end", addGraphic);

    // event delegation so a click handler is not
    // needed for each individual button
    on(dom.byId("info"), "click", function (evt) {
      if (evt.target.id === "info") {
        return;
      }
      var tool = evt.target.id.toLowerCase();
      map.disableMapNavigation();
      tb.activate(tool);
    });
  }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; function addGraphic(evt) {
    //deactivate the toolbar and clear existing graphics
    tb.deactivate();
    map.enableMapNavigation();

    // figure out which symbol to use
    var symbol;
    if (evt.geometry.type === "point" || evt.geometry.type === "multipoint") {
      symbol = markerSymbol;
    } else {
      symbol = fillSymbol;
    }
    var graphic = new Graphic(evt.geometry, symbol, {Latitude: evt.geometry.getLatitude(), Longitude: evt.geometry.getLongitude()});
    var features = [graphic];

    featureLayer.applyEdits(features, null, null);

    map.infoWindow.setTitle("Localización");
            map.infoWindow.setContent("Latitud: "+evt.geometry.getLatitude()+ "Longitud: "+evt.geometry.getLongitude());
            map.infoWindow.show(graphic.geometry, map.getInfoWindowAnchor(graphic.geometry));
            map.centerAndZoom(graphic.geometry, 3);

    // map.graphics.add(new Graphic(evt.geometry, symbol));
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But I can't figure out how to make a form.&lt;BR /&gt;&lt;BR /&gt;I hope you can help me, thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 14:54:07 GMT</pubDate>
    <dc:creator>EdissonGabrielLópezSalamanca</dc:creator>
    <dc:date>2022-05-24T14:54:07Z</dc:date>
    <item>
      <title>How to make a form with Argis 3.40?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-make-a-form-with-argis-3-40/m-p/1176843#M77460</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I did not find information on how I can make a form in version 3.40, but what I need, a form where I can insert the longitude and latitude where it shows it on the map once inserted.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For the time being, I add the points with a button:&lt;/P&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A title="Sample graphics add" href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=graphics_add" target="_self"&gt;Sample graphics add&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/**
   * The function is called initToolbar() and it creates a new Draw object called tb. The tb object is
   * then used to create a new event listener called "draw-end" which calls the addGraphic() function.
   * The function then creates a new event listener called "click" which listens for clicks on the
   * "info" div. If the click is on the "info" div, the function returns. If the click is on a button,
   * the function gets the id of the button and sets the tool variable to the id of the button. The map
   * navigation is then disabled and the tb object is activated with the tool variable.
   * @returns the value of the variable tb.
   */
  function initToolbar() {
    tb = new Draw(map);
    tb.on("draw-end", addGraphic);

    // event delegation so a click handler is not
    // needed for each individual button
    on(dom.byId("info"), "click", function (evt) {
      if (evt.target.id === "info") {
        return;
      }
      var tool = evt.target.id.toLowerCase();
      map.disableMapNavigation();
      tb.activate(tool);
    });
  }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; function addGraphic(evt) {
    //deactivate the toolbar and clear existing graphics
    tb.deactivate();
    map.enableMapNavigation();

    // figure out which symbol to use
    var symbol;
    if (evt.geometry.type === "point" || evt.geometry.type === "multipoint") {
      symbol = markerSymbol;
    } else {
      symbol = fillSymbol;
    }
    var graphic = new Graphic(evt.geometry, symbol, {Latitude: evt.geometry.getLatitude(), Longitude: evt.geometry.getLongitude()});
    var features = [graphic];

    featureLayer.applyEdits(features, null, null);

    map.infoWindow.setTitle("Localización");
            map.infoWindow.setContent("Latitud: "+evt.geometry.getLatitude()+ "Longitud: "+evt.geometry.getLongitude());
            map.infoWindow.show(graphic.geometry, map.getInfoWindowAnchor(graphic.geometry));
            map.centerAndZoom(graphic.geometry, 3);

    // map.graphics.add(new Graphic(evt.geometry, symbol));
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But I can't figure out how to make a form.&lt;BR /&gt;&lt;BR /&gt;I hope you can help me, thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 14:54:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-make-a-form-with-argis-3-40/m-p/1176843#M77460</guid>
      <dc:creator>EdissonGabrielLópezSalamanca</dc:creator>
      <dc:date>2022-05-24T14:54:07Z</dc:date>
    </item>
  </channel>
</rss>

