Select to view content in your preferred language

Click on Map get attribute

594
2
11-08-2011 02:29 PM
MatthewStull
Occasional Contributor
I need to make my Javascript API app to do this...

1) activate a tool by clicking on button
2) click on a property parcel on the map
3) get the parcel number from the clicked parcel and put this number into a variable
4) this parcel number in the variable will be used to do a search on a separate website (non ArcGIS Server site)

I have some ideas about how to do this but if anyone has any tips that would be appreciated.  I do not necessarily want pop-ups windows.  It just needs to be able to grap the parcel number from the parcel clicked. 

Thank you
Matt
0 Kudos
2 Replies
StephenLead
Honored Contributor
Hi Matt,

Check out the Query Task section of the samples to get an idea of where you could start.

The Query Results in Chart sample shows how to run a query when the user clicks on the map.

This section shows how to handle the results of the query:

for (var i=0; i<features.length; i++) {
          feature = features;
          attributes = feature.attributes;

          white = parseInt(attributes.WHITE);


In your case, once you have the variable ("white") you could pass it to the second program.

Hope this helps,
Steve
0 Kudos
MatthewStull
Occasional Contributor
Thanks for your help Steve! 

Matt
0 Kudos