<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help Creating a Jump to Google Tool with Python in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106208#M1247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cosmin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your link to the toolbox doesn't work. Could you publish the script you got working please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 04:25:23 GMT</pubDate>
    <dc:creator>StuartButt</dc:creator>
    <dc:date>2015-01-29T04:25:23Z</dc:date>
    <item>
      <title>Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106199#M1238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In VBA the link was created from this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; pHyperlink.Link = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://maps.google.com/maps?ll=" rel="nofollow" target="_blank"&gt;http://maps.google.com/maps?ll=&lt;/A&gt;&lt;SPAN&gt;" &amp;amp; pPoint.y &amp;amp; "," &amp;amp; pPoint.x&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;with the point derived from this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; x = ((pEnvelope.XMax - pEnvelope.XMin) / 2) + pEnvelope.XMin&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; y = ((pEnvelope.YMax - pEnvelope.YMin) / 2) + pEnvelope.YMin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I replicate this with python? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far I have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import webbrowser&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;url = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.googlemaps.com/" rel="nofollow" target="_blank"&gt;http://www.googlemaps.com/&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;webbrowser.open_new_tab(url)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jenn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 12:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106199#M1238</guid>
      <dc:creator>jennifersylvester</dc:creator>
      <dc:date>2010-10-01T12:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106200#M1239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;got it. it is unprojected NAD83&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import webbrowser, arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dataFrame = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;externalScales = [192000000,96000000,48000000,24000000,12000000,6000000,3000000,1500000,725000,350000,188000,93000,46000,23000,9000,4500,2250]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;currentScale = dataFrame.scale&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;previous = 200000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;z = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter = 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for scale in externalScales:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print scale&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; current = math.fabs(currentScale - scale)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if current &amp;lt; previous:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; previous = current&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z = counter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter += 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;x = (dataFrame.extent.XMin + dataFrame.extent.XMax)/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;y = (dataFrame.extent.YMin + dataFrame.extent.YMax)/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;thelink = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://maps.google.com/maps?ll=" rel="nofollow" target="_blank"&gt;http://maps.google.com/maps?ll=&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thelink = thelink + str(y) + "," + str(x) + "&amp;amp;z=" + str(z)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;webbrowser.open_new_tab(thelink)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 18:25:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106200#M1239</guid>
      <dc:creator>jennifersylvester</dc:creator>
      <dc:date>2010-10-01T18:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106201#M1240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so, now does anyone know how to convert it to UTM or any other projected coordinate system in python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 20:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106201#M1240</guid>
      <dc:creator>jennifersylvester</dc:creator>
      <dc:date>2010-10-05T20:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106202#M1241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I have my data in UTM what would be the code for this script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the only piece I'm missing is inserting the correct "externalScales"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want this function badly, please help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 18:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106202#M1241</guid>
      <dc:creator>AaronPaul</dc:creator>
      <dc:date>2010-11-16T18:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106203#M1242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I still cant figure it out. Ive been busy also and havent had time to work on it. Its really tricky! ill re-post to the thread if i get it working, and you do the same!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works like a charm in an unprojected dataframe, unfortuantely how often do we use those?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 18:09:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106203#M1242</guid>
      <dc:creator>jennifersylvester</dc:creator>
      <dc:date>2010-11-16T18:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106204#M1243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the external scales are the scales used by googlemaps, so you will still need those. in the old VBA code a projection file (one of the core projections that comes with arc) was called that was used to do the conversion, its that part that I am having trouble with in python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 18:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106204#M1243</guid>
      <dc:creator>jennifersylvester</dc:creator>
      <dc:date>2010-11-16T18:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106205#M1244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Very helpful, thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know if it's possible to use an address rather than plugging in x, y??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd think that Google could take the address and plug in the x, y.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working with parcel data and usually have at minimum address, taxlot #, and (x, y).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to select a record and have that record correspond to any of these attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do u think?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 18:45:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106205#M1244</guid>
      <dc:creator>AaronPaul</dc:creator>
      <dc:date>2010-11-16T18:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106206#M1245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes, i would think that you could do it much the same way. you need to find how google contructs their links with addresses (you should be able to google it) and instead of plugging in x,y corrdinates, you would construct the link in python using the addresses and the proper formatting. you may not need the scales anymore since they were used to get the correct zoom level (one that correlates to the scale in arc) and an address will go directly to the point &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the tricky part will be getting it to read the addresses, you may need to build a model or tool to do this part. im not sure how you plan on doing that part of it, but you can use the code i posted as a jumping off point, but i think in the end you will have something that looks quite different.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 19:32:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106206#M1245</guid>
      <dc:creator>jennifersylvester</dc:creator>
      <dc:date>2010-11-16T19:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106207#M1246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jenn!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your Google Maps extentScales (z = zoomlevels).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Due to your draft, I was able to find a solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a Toolbox and uploadet it to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=64C4E478-1422-2418-3465-8F28DEE228D6"&gt;http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=64C4E478-1422-2418-3465-8F28DEE228D6&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing you have to change is the path to the Projection file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if you have any problems running the code...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to Python Scripting, so please excuse if i don't fetch any possible error....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope you &amp;amp; everybody else can use this!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Please let me know if anybody has "better" google maps Scales available.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I think we found a simple and nice solution...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 08:40:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106207#M1246</guid>
      <dc:creator>CosminTana</dc:creator>
      <dc:date>2010-11-19T08:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help Creating a Jump to Google Tool with Python</title>
      <link>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106208#M1247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cosmin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your link to the toolbox doesn't work. Could you publish the script you got working please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 04:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/help-creating-a-jump-to-google-tool-with-python/m-p/106208#M1247</guid>
      <dc:creator>StuartButt</dc:creator>
      <dc:date>2015-01-29T04:25:23Z</dc:date>
    </item>
  </channel>
</rss>

