ArcGIS Online parsing of google map location url

1641
4
Jump to solution
04-17-2018 09:42 AM
PeteVitt
Occasional Contributor III

Hi - I've got a hyperlink to google map location I've inserted into ArcGIS online pop-up -- the problem is ArcGIS online isnt parsing the url correctly.  the url is:

https://www.google.com/maps/place/34%C2%B004'42.1%22N+117%C2%B042'17.6%22W/@34.078349,-117.7070777,1...

when I I click the link in ArcGIS on line it goes to a place in the northern part of Algeria

it should be going to this location as it correctly does in ArcMap:

I've tried adding the anchor tag with target blank:

<a target='blank' href='https://www.google.com/maps/place/34%C2%B004'42.1%22N+117%C2%B042'17.6%22W/@34.078349,-117.7070777,1...'>More Info</a>

but it gives the same result.  Any idea how I could change the llink to get it to parse correctly?  I'm thinking it has to be one of the special characters -- % or something that is throwing it off

In ArcGIS pro it throws an error without the anchor tag, and goes to the wrong location with the anchor tag

Thanks

Pete

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Actually I just tried bitly and it didn't seem to work but you can get a shortened link by clicking the share button in Google Maps.

View solution in original post

4 Replies
by Anonymous User
Not applicable

Did you try using a shortened URL like you generate using bitly.com?

0 Kudos
by Anonymous User
Not applicable

Actually I just tried bitly and it didn't seem to work but you can get a shortened link by clicking the share button in Google Maps.

PeteVitt
Occasional Contributor III

Thanks - that did the trick!

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Pete, 

The quote by the 04 was truncating the href url early. Ti avoid this issue, try using double quotes if a single quote is contained in the url. Using the shortened link will remove the need to do this.

href='https://www.google.com/maps/place/34%C2%B004'42.1%22N+117%C2%B042'17.6%22W/@34.078349,-117.7070777,1...'>More Info</a>

Also, if you want to try a similar workflow with ArcGIS Online Maps, check out the marker functionality in this documentation:

Use URL parameters to modify embedded maps—ArcGIS Online Help | ArcGIS 

-Kelly

0 Kudos