Select to view content in your preferred language

display lat long using InfoWindowOptions

735
2
07-08-2010 07:59 AM
AndrewL
Frequent Contributor
Hi I am trying to display the lat/longs of a marker using a window using InfoWindowOptions almost exactly like this example:
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/samples/querytask/query_custom...

Here is my example. The dynamic layers are not visible due to a firewall but the search address and query works:
https://netfiles.uiuc.edu/alouchio/shared/test.shtml

If you search for "springfield, il" wait a few seconds, it will zoom, add a marker, and run a query which populates the infowindow with "county" and "township" from the dynamic layer.

Thank you.
0 Kudos
2 Replies
AlessioDi_Lorenzo
Emerging Contributor
First of all, I can't see the infowindow by clicking on your markers, but looking at the source it appears to be correct.

If you need to display the marker lat/lon the easiest way is to include the lat and lon fields in the query outfields array. If you haven't these fields in the attribute table of your layer you can calculate them in arcmap.
0 Kudos
AndrewL
Frequent Contributor
If you need to display the marker lat/lon the easiest way is to include the lat and lon fields in the query outfields array. If you haven't these fields in the attribute table of your layer you can calculate them in arcmap.


Thank you for your reply. Are you saying add two fields to my layer (LAT & LONG) and then calculate lat/longs so they are stored values in my layer? I'm not sure I understand how that would obtain the latlongs of the marker since that is created when i search for an address. I want to obtain the latlong of the marker using the google geocoding service. Thanks again!
0 Kudos