points and coordinates

555
2
07-28-2013 08:44 AM
MartinAshmore
New Contributor III
Hi,

I am trying to create a really simple map which does the following:

1. User clicks on the map to place a point. This point is not recorded, but a symbol needs to be displayed.
2. The coordinates of the point are displayed in form fields beneath the map. I want to get the information from these fields later using a standard javascript getElementById.

I'm fine with creating the map and getting my map layer etc from the samples, and I can see how to create a pop up showing the coordinates (unfortunately I don't want to achieve this with a popup). But I'm getting confused about which ?classes? I need to use to do this from the api: screenpoint, point.

Any pointers about how to do what seems like a simple thing would be greatly appreciated.

The closest sample I have been able to find is:

<http://developers.arcgis.com/en/javascript/samples/widget_measurement/>

In this sample the location tool does what I require, but I want the results to be placed into fields outside the map.

Just to be clear I don't want a pop up box, which all the samples that do what I want seem to use.

Thanks,

Martin
0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Martin,

Take a look at this fiddle example.  Is this along the lines of what you are looking for?
0 Kudos
MartinAshmore
New Contributor III
Hi Jake,

That is exactly what i'm looking for.

Thanks,

Martin
0 Kudos