How to create a simple hyperlinked map

604
2
10-06-2011 07:55 AM
StaceMaples
Occasional Contributor III
I have a map service with an attribute that has a URL in it.  I simply want a pan/zoom javascript map that navigates to the URL when clicked on.  Like an old school image map.  Just like the functionality with the Hyperlink Tool in ArcMap.

Any Thoughts?

The service is here:
http://fesarc10iis.yu.yale.edu/ArcGIS/rest/services/Other/World_with_Links/MapServer

and the field is [anchor_cod]
0 Kudos
2 Replies
KenDoman
Occasional Contributor II
I could think of two ways you could do this.

  1. You could create an infoTemplate or Popup with the link in an anchor tag. You would use an identify task, query task, or feature layer to make it visible

  2. Or you could set up an onClick event on the map that queries the feature with the [anchor_cod] as the outfield. When you get the results, run window.open() on that results attribute.

0 Kudos
derekswingley1
Frequent Contributor
Looking into formatting an info window or popup:  http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_formatinfowindow.htm

Also, is your service publicly accessible? I'm not able to see it...
0 Kudos