<?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 Resetting SnapToLevels=true Is Not Applied Until the Next Map Extent Zoom Change in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resetting-snaptolevels-true-is-not-applied-until/m-p/558437#M14356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Silverlight API 2.2 ArcGIS 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just figured this one out and thought I would share it.&amp;nbsp; Not clear on how else to report it as a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Our application uses SnapToLevels=true but dynamically changes this value to false when the user approaches the minimum resolution of the base map (online world street map).&amp;nbsp; This allows the user to zoom in past the minimum resolution of the base map to a resolution that makes sense for our app, but still otherwise enjoy the benefits of SnapToLevels=true.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When zoomed in maximally (SnapToLevels set to false), it is possible to use a very small shift-ctl-zoom-out-box to zoom-out to level where the code resets SnapToLevels back to true.&amp;nbsp; This change however does not take effect on the map until the next map extent zoom level change (panning doesn't do it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Simple work around is to set the map's extent to be itself:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.SnapToLevels = ViewModel.MapSnapToLevels;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map.SnapToLevels)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.Extent = map.Extent;&amp;nbsp; // This actually causes the SnapToLevels = true to be applied immediately&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest SnapToLevels should be fixed to affect the map immediately upon being reset to true.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Sep 2011 17:12:41 GMT</pubDate>
    <dc:creator>TVlasschaert</dc:creator>
    <dc:date>2011-09-01T17:12:41Z</dc:date>
    <item>
      <title>Resetting SnapToLevels=true Is Not Applied Until the Next Map Extent Zoom Change</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resetting-snaptolevels-true-is-not-applied-until/m-p/558437#M14356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Silverlight API 2.2 ArcGIS 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just figured this one out and thought I would share it.&amp;nbsp; Not clear on how else to report it as a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Our application uses SnapToLevels=true but dynamically changes this value to false when the user approaches the minimum resolution of the base map (online world street map).&amp;nbsp; This allows the user to zoom in past the minimum resolution of the base map to a resolution that makes sense for our app, but still otherwise enjoy the benefits of SnapToLevels=true.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When zoomed in maximally (SnapToLevels set to false), it is possible to use a very small shift-ctl-zoom-out-box to zoom-out to level where the code resets SnapToLevels back to true.&amp;nbsp; This change however does not take effect on the map until the next map extent zoom level change (panning doesn't do it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Simple work around is to set the map's extent to be itself:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.SnapToLevels = ViewModel.MapSnapToLevels;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map.SnapToLevels)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.Extent = map.Extent;&amp;nbsp; // This actually causes the SnapToLevels = true to be applied immediately&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest SnapToLevels should be fixed to affect the map immediately upon being reset to true.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 17:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resetting-snaptolevels-true-is-not-applied-until/m-p/558437#M14356</guid>
      <dc:creator>TVlasschaert</dc:creator>
      <dc:date>2011-09-01T17:12:41Z</dc:date>
    </item>
  </channel>
</rss>

