ArcGIS Online – How to Add Link in Web Map Popup for Driving Directions

arcgis-onlinebing-mapsdrivinggoogle mapspopup

I have an ArcGIS webmap with school boundaries. I would like to provide a link in the pop up that takes a public user to a free routing website like Bing or Google with the directions to their neighborhood school already filled in.

http://agtrail.rivcoca.org/ The County of Riverside has what I am talking about on their webmaps.

Is this something I will have to create a url for for each school and add it to each school boundary attribute? Or is there a faster way?

I know ESRI can do routing directions but they use up credits and I want to do this without costing my district any more money.

My scripting skills are very basic but if coding is the only way to do this I am willing to try my best.

Best Answer

Good question. You can achieve this in an ArcGIS Web Map by providing a custom value in the popup window.

I added a sample New Zealand schools layer by searching for "school" within ArcGIS Online. This sample dataset contains a field called ADDRESS which lists the school's address.

Next choose > Configure Popup:

enter image description here

Choose a Custom Attribute Display, and use the format {ADDRESS} to display the actual value of the address when you click on a point, eg:

The address is {ADDRESS}

enter image description here

Use the hyperlink button on the formatting toolbar, and enter the URL for a Google or Bing search, followed by the address parameter. eg:

https://www.google.com.au/maps/place/{ADDRESS}
http://www.bing.com/maps/default.aspx?Rtp=~adr.{ADDRESS}

Choose Save and OK to close all the dialogs, then try clicking on a school. You should be shown the actual address with a hyperlink - clicking this should open Google/Bing Maps at that location.

See this sample map that I made to illustrate the above. I switched off the default Esri "driving directions" link by unchecking that option within > ArcGIS.com > My Content.

Related Question