2

The standard formula for a google maps url is:

https://www.google.com/maps/@-15.623037,18.388672,8z

https://www.google.com/maps/@(latitude),(longitude),(zoom level)z

I am trying to make a new column on a point layer that would link you directly to google maps based on the layers x and y coordinates from other columns.

....but I am unable to get the values to show up it always fills it up with:

https://www.google.com/maps/@[x],[y],8z

Here is a sample that I am plugging into the field calculator.

4
  • 2
    Could you confirm that you are using ampersands and double quotes in place, such as "google.com/maps/@" & [x] & "," & [y] & ",8z", if you are using VBA? Formatting the strings are far easier in Python.
    – fatih_dur
    Jun 18, 2015 at 23:16
  • Are you looking at exporting the attribute to excel and using that as a stand alone document? Just curious to know why you would need a link to Google maps when you would have access to basemaps in Arcgis or are you using an earlier version of Arc?
    – TsvGis
    Jun 19, 2015 at 5:42
  • So after taking a look at the recommendations for the getting the x,y coordinates to display here is the formula. "google.com/maps/place/…" So then it displays something like this google.com/maps/place/@-80.02035,35.94735,16z But this does not give you the x,y point on the map. This will only center the map over that position. Any thoughts on how to get the point to display? Jun 19, 2015 at 13:14
  • 1
    After playing around with it for one more minute here is the formula that I came up with. Still not sure what the additional data after the zoom is, but would like to know. "google.com/maps/place//…" Jun 19, 2015 at 13:21

1 Answer 1

1

After a while I figured out that to format this in VBA it is imputed to the field calculator like this:

"https://www.google.com/maps/place//@"&[y]&","&[x]&",15z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0"

adding in the hyperlink (for arcgis online or google earth):

"<a href=""https://www.google.com/maps/place//@"&[point_y]&","&[point_x]&",15z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0"">Google Maps</a>"

EXTRA CREDIT!

Here is the formatting for streetview:

"https://www.google.com/maps?cbll="&[POINT_Y]&","&[POINT_X]&"&cbp=12,90,0,0,5&layer=c"

adding in the hyperlink (for arcgis online or google earth):

"<a href=""https://www.google.com/maps/place//@"&[point_y]&","&[point_x]&",15z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0"">Google Maps</a>"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.