<?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: Get the current zoom level and Lat/Long in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322769#M8344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shouldn't Map.Resolution = one of the LODs ?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using this map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But Map.Resolution doesn't match any of the LODs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; private int GetZoomLevel()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double currentRes = MyMap.Resolution;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lods = ((ArcGISTiledMapServiceLayer)MyMap.Layers[0]).TileInfo.Lods.ToList();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int level = lods.IndexOf(lods.Where(l =&amp;gt; l.Resolution == currentRes).FirstOrDefault());

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return level;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:20:20 GMT</pubDate>
    <dc:creator>TylerRothermund</dc:creator>
    <dc:date>2021-12-11T15:20:20Z</dc:date>
    <item>
      <title>Get the current zoom level and Lat/Long</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322765#M8340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can I get the current zoom level and center point Lat/Long of the map?&amp;nbsp; I need to save these settings so I can restore them the next time the user hits the page.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 00:34:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322765#M8340</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2012-01-04T00:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get the current zoom level and Lat/Long</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322766#M8341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you clarify "current zoom level"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you mean current extent, you can get it by Map.Extent and it's center as Map.Extent.GetCenter().&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 04:17:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322766#M8341</guid>
      <dc:creator>SanajyJadhav</dc:creator>
      <dc:date>2012-01-04T04:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get the current zoom level and Lat/Long</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322767#M8342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is MyMap.Extent.GetCenter().X , Y&amp;nbsp; = Lat / Long or are those some kind of screen coordinate?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a property that tells me how far the user has zoomed (level) into the map like&amp;nbsp; a (1-9) or something?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 15:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322767#M8342</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2012-01-04T15:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get the current zoom level and Lat/Long</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322768#M8343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can look at the following SDK samples:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Map.Extent updates on pan/zoom&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MapExtent"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MapExtent&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Screen point can be converted to map coordinates&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MouseCoords"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MouseCoords&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;You can compare Map.Resolution property against ArcGISTiledMapServiceLayer.TileInfo.Lods.Resolution to know what level you are currently zoomed in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowMapProperties"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowMapProperties&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 16:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322768#M8343</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2012-01-04T16:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get the current zoom level and Lat/Long</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322769#M8344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shouldn't Map.Resolution = one of the LODs ?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using this map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But Map.Resolution doesn't match any of the LODs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; private int GetZoomLevel()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double currentRes = MyMap.Resolution;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lods = ((ArcGISTiledMapServiceLayer)MyMap.Layers[0]).TileInfo.Lods.ToList();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int level = lods.IndexOf(lods.Where(l =&amp;gt; l.Resolution == currentRes).FirstOrDefault());

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return level;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:20:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322769#M8344</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2021-12-11T15:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get the current zoom level and Lat/Long</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322770#M8345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unless you set SnapToLevels=true on the map, you can zoom between levels, so no there is no guarantee.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can instead pick the closest one which should be the one currently rendering.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Scale and/or Resolution is the most precise way for determining the zoom since this is a fully linear range as opposed to zoom levels.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 13:35:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/get-the-current-zoom-level-and-lat-long/m-p/322770#M8345</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2012-01-05T13:35:39Z</dc:date>
    </item>
  </channel>
</rss>

