Last active
April 20, 2017 13:17
-
-
Save nixta/5871524 to your computer and use it in GitHub Desktop.
A bookmark to give you info on your current view of a map at ArcGIS.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='javascript:void((function(){var m=false; if (typeof esri !== "undefined" && typeof esri.arcgisonline !== "undefined") {if (esri.arcgisonline.map.main.map !== null) {m=true;}}; if (m) {var a=esri.arcgisonline.map.main.map; var l=a.__LOD, c=a.extent.getCenter(); alert("Scale: " + l.scale + "\nLevel: " + l.level + "\nCenter: " + c.x + "," + c.y + "\nLat,Lon: " + c.getLatitude() + "," + c.getLongitude());} else {alert("Use this bookmark while viewing a map at ArcGIS.com!");}})());'>ArcGIS Map Deets</a> |
Great Gist Nicholas! Do you know if a similar variable can be found or retro-created from an initialized map on a webpage built outside of AGOL. Basically a webpage created using the vanilla "ArcGIS API for JavaScript"? Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go to this page to find a Bookmarklet you can drag straight to your bookmarks bar.
Yes, that's right, the gist description doesn't handle mark down. Go figure.