Skip to content

Instantly share code, notes, and snippets.

@nixta
Last active April 20, 2017 13:17
Show Gist options
  • Save nixta/5871524 to your computer and use it in GitHub Desktop.
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.
<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>
@nixta
Copy link
Author

nixta commented Jun 26, 2013

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.

@coobr01
Copy link

coobr01 commented Apr 20, 2017

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