FTFN_GIS_1

Geocoding specific locations

Discussion created by FTFN_GIS_1 on Dec 6, 2013
Hi,

Prior to use ArcGIS API for javascript, i was using Google API  for Javascript.  I tried to use a function of Google API javascript in ARcGIS api for javascript.  Unfortunately, it does not function. Below my code

<!DOCTYPE html>
<html>
<head>
  <title>Create a Map</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
  <link rel="stylesheet" href="http://js.arcgis.com/3.7/js/dojo/dijit/themes/claro/claro.css">
  <link rel="stylesheet" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
  <style>
    html, body, #mapDiv{
      padding: 0;
      margin: 0;
      height: 100%;
    }
  </style>
 
  <script src="http://js.arcgis.com/3.7/"></script>
  <script>
    var map;
    require(["esri/map", "dojo/domReady!"], function(Map) {
      map = new Map("mapDiv", {
        center: [-56.049, 38.485],
        zoom: 3,
        basemap: "streets"
      });
    });
   
    function go() {
lng = parseFloat(document.getElementById("maahan").value.split(",")[0]);
lat = parseFloat(document.getElementById("maahan").value.split(",")[1]);
scale = parseInt(document.getElementById("maahan").value.split(",")[2]);
map.setCenter(new GLatLng(lat,lng),scale);
}

  </script>

</head>
<body class="claro">
<select name="Jump to selected camp"  style="font-size:8pt;" id="maahan"

onchange="go()" title="Jump to selected camp" >

<option selected value= " -72.289084 ,  18.56275 ,  20 " >Acra Cité Nord Del 33</option>

<option value= " -72.26377 ,  18.559274 ,  20 " >Te Roche</option>

<option value= " -72.270535 ,  18.562965 ,  20 " >Mega 4 new</option>

<option value= " -72.32271 ,  18.568343 ,  20 " >Camp Boulos</option>


</select> 
  <div id="mapDiv"></div>
</body>
</html>

is there a code that allows me to have the location of my zone in a combo box?

Any help will be useful

Daw

Outcomes