Go To XY Widget for 4.6?

Document created by xennn on Apr 2, 2018
Version 1Show Document
  • View in full screen mode

I want to add go to xy widget on my codes but I couldn't find any custom/official go to xy widget for 4.6. There are many widgets for 3.x but they are not working with 4.6. So, I tried goto() function. I want to take input as lat and long then write it into goto(lat,long). However, it won't work. Here are my codes. 

 

 

 

 

<form id="form" action="" method="get">
<table>
<tr>
<td>Latitute:</td>
<td><input type="text" name="formlat"><br><br></td>
</tr>
<tr>
<td>Longitute:</td>
<td><input type="text" name="formlon"><br><br></td>
</tr>
<tr><td><button onclick="myFunction()">GO!</button></td></tr>
</table>
</form>

 

function myFunction() {
var inputlat = document.getElementById("formlat").value;
var inputlon = document.getElementById("formlon").value;
goto(inputlat, inputlon);
}

Attachments

    Outcomes