jsylves

Help Creating a Jump to Google Tool with Python

Discussion created by jsylves on Oct 1, 2010
Latest reply on Jan 28, 2015 by sebutt
I am working to create a tool in python that will take the current extent of the map in ArcMap 10 and create a hyperlink to jump to googlemaps at the same location.

In VBA the link was created from this:
  pHyperlink.Link = "http://maps.google.com/maps?ll=" & pPoint.y & "," & pPoint.x
with the point derived from this:
  x = ((pEnvelope.XMax - pEnvelope.XMin) / 2) + pEnvelope.XMin
  y = ((pEnvelope.YMax - pEnvelope.YMin) / 2) + pEnvelope.YMin

How do I replicate this with python?


So far I have:
import webbrowser
url = 'http://www.googlemaps.com/'
webbrowser.open_new_tab(url)

Thanks,
Jenn

Outcomes