# Tiles from wrong zoomlevel on OpenStreetMap

**URL:** <https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946>\
**Category:** WPF\
**Created:** [March 11, 2016, 3:15am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946 "2016-03-11T03:15:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 11, 2016, 3:15am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/1 "2016-03-11T03:15:45Z")

</div>

I&nbsp;have&nbsp;observed&nbsp;this&nbsp;issue&nbsp;many&nbsp;times&nbsp;while&nbsp;developing&nbsp;our&nbsp;map&nbsp;feature&nbsp;with&nbsp;ThinkGeo:  
  
Tiles&nbsp;from&nbsp;another&nbsp;zoomlevel&nbsp;than&nbsp;the&nbsp;current&nbsp;is&nbsp;displayed&nbsp;along&nbsp;side&nbsp;correct&nbsp;tiles,&nbsp;making&nbsp;the&nbsp;map&nbsp;look&nbsp;broken.&nbsp;  
  
I&nbsp;have&nbsp;only&nbsp;seen&nbsp;this&nbsp;using&nbsp;OpenStreetMapOverlay,&nbsp;and&nbsp;it&nbsp;seems&nbsp;to&nbsp;happen&nbsp;most&nbsp;often&nbsp;when&nbsp;there&nbsp;are&nbsp;  
  
shapefiles&nbsp;layered&nbsp;on&nbsp;top&nbsp;of&nbsp;it.&nbsp;&nbsp;  
  
I&nbsp;remember&nbsp;seeing&nbsp;an&nbsp;old&nbsp;post&nbsp;on&nbsp;this&nbsp;forum&nbsp;about&nbsp;this&nbsp;issue,&nbsp;and&nbsp;it&nbsp;was&nbsp;apparently&nbsp;fixed  
  
in&nbsp;map&nbsp;suite&nbsp;8.&nbsp;  
  
I&nbsp;am&nbsp;using&nbsp;map&nbsp;suite&nbsp;9.0.0.175&nbsp;(wpf).  
  
  
  
Sometimes&nbsp;it&nbsp;happens&nbsp;all&nbsp;the&nbsp;times,&nbsp;other&nbsp;times&nbsp;it&nbsp;is&nbsp;impossible&nbsp;to&nbsp;reproduce.  
  
  
  
I&nbsp;have&nbsp;attached&nbsp;a&nbsp;screenshot.  
  
[brokenOSM.png](https://community.thinkgeo.com/uploads/default/original/1X/571f57ad812fa8863461e4a3d42dc8c7beb87099.png) (93.3 KB)

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 14, 2016, 12:10am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/2 "2016-03-14T00:10:07Z")

</div>

Hi&nbsp;Jonas,&nbsp;  
&nbsp;&nbsp;  
&nbsp;It&nbsp;looks&nbsp;you&nbsp;failed&nbsp;to&nbsp;upload&nbsp;the&nbsp;screen&nbsp;shot.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;please&nbsp;show&nbsp;us&nbsp;some&nbsp;code&nbsp;to&nbsp;see&nbsp;how&nbsp;you&nbsp;using&nbsp;the&nbsp;OpenStreetMapOverlay,&nbsp;I&nbsp;think&nbsp;if&nbsp;the&nbsp;tile&nbsp;scale&nbsp;is&nbsp;not&nbsp;match&nbsp;the&nbsp;server&nbsp;tile&nbsp;scale,&nbsp;we&nbsp;can&nbsp;use&nbsp;our&nbsp;CustomZoomLevel,&nbsp;so&nbsp;I&nbsp;want&nbsp;to&nbsp;reproduce&nbsp;that&nbsp;first&nbsp;and&nbsp;then&nbsp;can&nbsp;help&nbsp;you&nbsp;on&nbsp;it.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 14, 2016, 6:42am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/3 "2016-03-14T06:42:21Z")

</div>

Ok&nbsp;I&nbsp;will&nbsp;try&nbsp;again.&nbsp;Hopefully&nbsp;the&nbsp;image&nbsp;is&nbsp;included&nbsp;now.  
  
  
  
I&nbsp;can&nbsp;add&nbsp;that&nbsp;I&nbsp;see&nbsp;a&nbsp;similar&nbsp;issue&nbsp;when&nbsp;working&nbsp;with&nbsp;heavy&nbsp;images&nbsp;on&nbsp;a&nbsp;GdiPlusRasterLayer&nbsp;with&nbsp;a&nbsp;FileBitmapTileCache.&nbsp;  
  
  
  
General&nbsp;map&nbsp;settings:  
  
I&nbsp;have&nbsp;not&nbsp;set&nbsp;a&nbsp;ZoomLevelSet&nbsp;for&nbsp;the&nbsp;map,&nbsp;so&nbsp;it&nbsp;is&nbsp;just&nbsp;the&nbsp;default.&nbsp;  
  
MapUnit&nbsp;is&nbsp;meters.&nbsp;  
  
MapResizeMode="PreserveScale"&nbsp;  
  
  
  
OpenStreetMapOverlay&nbsp;settings:  
  
TileType&nbsp;=&nbsp;TileType.HybridTile;  
TransitionEffect&nbsp;=&nbsp;TransitionEffect.Stretch;  
IsBase&nbsp;=&nbsp;true;&nbsp;  
  
I&nbsp;have&nbsp;not&nbsp;changed&nbsp;Tile&nbsp;scale&nbsp;anywhere.  
  
  
  
Thanks&nbsp;  
  
Jonas  
  
  
[brokenOSM.png](https://community.thinkgeo.com/uploads/default/original/1X/571f57ad812fa8863461e4a3d42dc8c7beb87099.png) (93.3 KB)

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 15, 2016, 12:46am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/4 "2016-03-15T00:46:27Z")

</div>

Hi&nbsp;Jonas,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;image,&nbsp;yes&nbsp;you’re&nbsp;right,&nbsp;it&nbsp;looks&nbsp;there&nbsp;is&nbsp;a&nbsp;tile&nbsp;in&nbsp;the&nbsp;left&nbsp;side&nbsp;is&nbsp;not&nbsp;belong&nbsp;to&nbsp;current&nbsp;zoom&nbsp;level.&nbsp;  
&nbsp;&nbsp;  
&nbsp;As&nbsp;below&nbsp;is&nbsp;the&nbsp;test&nbsp;code&nbsp;I&nbsp;did&nbsp;for&nbsp;that&nbsp;with&nbsp;the&nbsp;latest&nbsp;9.0.265.0,&nbsp;it&nbsp;render&nbsp;the&nbsp;NewYork.&nbsp;I&nbsp;tried&nbsp;to&nbsp;keep&nbsp;zoom&nbsp;in/out&nbsp;and&nbsp;pan&nbsp;about&nbsp;15&nbsp;mins,&nbsp;but&nbsp;hadn’t&nbsp;succeed&nbsp;to&nbsp;reproduced&nbsp;that.&nbsp;So&nbsp;please&nbsp;view&nbsp;my&nbsp;code&nbsp;and&nbsp;see&nbsp;whether&nbsp;I&nbsp;missed&nbsp;any&nbsp;setting&nbsp;for&nbsp;map.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;please&nbsp;let&nbsp;me&nbsp;know&nbsp;whether&nbsp;it&nbsp;appear&nbsp;frequently,&nbsp;whether&nbsp;we&nbsp;can&nbsp;see&nbsp;that&nbsp;in&nbsp;a&nbsp;specified&nbsp;extent?&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;`using System.Diagnostics;using System.Windows;using System.Windows.Controls;using ThinkGeo.MapSuite.Core;using ThinkGeo.MapSuite.WpfDesktopEdition;namespace CSHowDoISamples{    public partial class UseMicrosoftMapsLayer : UserControl    {        public UseMicrosoftMapsLayer()        {            InitializeComponent();        }        private void WpfMap_Loaded(object sender, RoutedEventArgs e)        {            wpfMap1.MapUnit = GeographyUnit.Meter;            wpfMap1.MapResizeMode = MapResizeMode.PreserveScale;            wpfMap1.CurrentExtent = new RectangleShape(-8252283.35963031, 4977643.2676051, -8237855.90662718, 4966177.7420397);            OpenStreetMapOverlay osmo = new OpenStreetMapOverlay();            osmo.TileType = TileType.HybridTile;            osmo.TransitionEffect = TransitionEffect.Stretch;            osmo.IsBase = true;            wpfMap1.CurrentExtentChanged += wpfMap1_CurrentExtentChanged;            wpfMap1.Overlays.Add(osmo);            wpfMap1.Refresh();        }        private void wpfMap1_CurrentExtentChanged(object sender, CurrentExtentChangedWpfMapEventArgs e)        {            Debug.WriteLine(e.CurrentExtent.ToString());        }    }} `&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 15, 2016, 12:48am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/5 "2016-03-15T00:48:10Z")

</div>

Hi&nbsp;Jonas,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;image,&nbsp;yes&nbsp;you’re&nbsp;right,&nbsp;it&nbsp;looks&nbsp;there&nbsp;is&nbsp;a&nbsp;tile&nbsp;in&nbsp;the&nbsp;left&nbsp;side&nbsp;is&nbsp;not&nbsp;belong&nbsp;to&nbsp;current&nbsp;zoom&nbsp;level.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;As&nbsp;below&nbsp;is&nbsp;the&nbsp;test&nbsp;code&nbsp;I&nbsp;did&nbsp;for&nbsp;that&nbsp;with&nbsp;the&nbsp;dll&nbsp;9.0.0.175,&nbsp;it&nbsp;render&nbsp;the&nbsp;NewYork.&nbsp;I&nbsp;tried&nbsp;to&nbsp;keep&nbsp;zoom&nbsp;in/out&nbsp;and&nbsp;pan&nbsp;about&nbsp;15&nbsp;mins,&nbsp;but&nbsp;hadn’t&nbsp;succeed&nbsp;to&nbsp;reproduced&nbsp;that.&nbsp;So&nbsp;please&nbsp;view&nbsp;my&nbsp;code&nbsp;and&nbsp;see&nbsp;whether&nbsp;I&nbsp;missed&nbsp;any&nbsp;setting&nbsp;for&nbsp;map.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;please&nbsp;let&nbsp;me&nbsp;know&nbsp;whether&nbsp;it&nbsp;appear&nbsp;frequently,&nbsp;whether&nbsp;we&nbsp;can&nbsp;see&nbsp;that&nbsp;in&nbsp;a&nbsp;specified&nbsp;extent?&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;`using System.Diagnostics;using System.Windows;using System.Windows.Controls;using ThinkGeo.MapSuite.Core;using ThinkGeo.MapSuite.WpfDesktopEdition;namespace CSHowDoISamples{    public partial class UseMicrosoftMapsLayer : UserControl    {        public UseMicrosoftMapsLayer()        {            InitializeComponent();        }        private void WpfMap_Loaded(object sender, RoutedEventArgs e)        {            wpfMap1.MapUnit = GeographyUnit.Meter;            wpfMap1.MapResizeMode = MapResizeMode.PreserveScale;            wpfMap1.CurrentExtent = new RectangleShape(-8252283.35963031, 4977643.2676051, -8237855.90662718, 4966177.7420397);            OpenStreetMapOverlay osmo = new OpenStreetMapOverlay();            osmo.TileType = TileType.HybridTile;            osmo.TransitionEffect = TransitionEffect.Stretch;            osmo.IsBase = true;            wpfMap1.CurrentExtentChanged += wpfMap1_CurrentExtentChanged;            wpfMap1.Overlays.Add(osmo);            wpfMap1.Refresh();        }        private void wpfMap1_CurrentExtentChanged(object sender, CurrentExtentChangedWpfMapEventArgs e)        {            Debug.WriteLine(e.CurrentExtent.ToString());        }    }} `&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 15, 2016, 2:05am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/6 "2016-03-15T02:05:45Z")

</div>

Hi&nbsp;Jonas,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;tested&nbsp;that&nbsp;in&nbsp;a&nbsp;slow&nbsp;network&nbsp;environment&nbsp;again,&nbsp;and&nbsp;found&nbsp;sometimes&nbsp;a&nbsp;tile&nbsp;hadn’t&nbsp;get&nbsp;refreshed&nbsp;when&nbsp;I&nbsp;zoom&nbsp;in/out,&nbsp;but&nbsp;if&nbsp;I&nbsp;stay&nbsp;for&nbsp;a&nbsp;long&nbsp;time,&nbsp;it&nbsp;get&nbsp;refreshed.&nbsp;I&nbsp;am&nbsp;not&nbsp;sure&nbsp;whether&nbsp;that’s&nbsp;what&nbsp;you&nbsp;met,&nbsp;but&nbsp;it&nbsp;should&nbsp;be&nbsp;a&nbsp;network&nbsp;issue.&nbsp;  
&nbsp;&nbsp;  
&nbsp;There&nbsp;are&nbsp;some&nbsp;solution&nbsp;for&nbsp;that:&nbsp;  
&nbsp;1.&nbsp;Use&nbsp;SingleTile&nbsp;mode.&nbsp;The&nbsp;problem&nbsp;is&nbsp;the&nbsp;map&nbsp;looks&nbsp;render&nbsp;slow.&nbsp;  
&nbsp;2.&nbsp;Clear&nbsp;the&nbsp;urls&nbsp;in&nbsp;openStreetMapOverlay.CustomServerUris&nbsp;and&nbsp;add&nbsp;the&nbsp;fastest&nbsp;urls&nbsp;in&nbsp;your&nbsp;network.&nbsp;The&nbsp;format&nbsp;should&nbsp;like&nbsp;this:&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;“[a.tile.openstreetmap.org/{0}/{1}/{2}.png](http://a.tile.openstreetmap.org/%7B0%7D/%7B1%7D/%7B2%7D.png)”&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;“[b.tile.openstreetmap.org/{0}/{1}/{2}.png](http://b.tile.openstreetmap.org/%7B0%7D/%7B1%7D/%7B2%7D.png)”&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;“[c.tile.openstreetmap.org/{0}/{1}/{2}.png](http://c.tile.openstreetmap.org/%7B0%7D/%7B1%7D/%7B2%7D.png)”&nbsp;  
&nbsp;3.&nbsp;Pan&nbsp;or&nbsp;zoom&nbsp;one&nbsp;more&nbsp;time&nbsp;to&nbsp;force&nbsp;map&nbsp;refresh&nbsp;when&nbsp;you&nbsp;met&nbsp;that&nbsp;again.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Wish&nbsp;that’s&nbsp;helpful.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 21, 2016, 10:00am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/7 "2016-03-21T10:00:59Z")

</div>

Hi&nbsp;Don&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;reply&nbsp;-&nbsp;I&nbsp;appreciate&nbsp;that&nbsp;you&nbsp;took&nbsp;the&nbsp;time&nbsp;to&nbsp;reproduce&nbsp;the&nbsp;issue.&nbsp;  
&nbsp;The&nbsp;problem&nbsp;is&nbsp;not&nbsp;just&nbsp;that&nbsp;some&nbsp;tiles&nbsp;are&nbsp;wrong.&nbsp;It&nbsp;is&nbsp;worse&nbsp;because&nbsp;the&nbsp;wrong&nbsp;tiles&nbsp;are&nbsp;cached,&nbsp;and&nbsp;will&nbsp;appear&nbsp;until&nbsp;the&nbsp;program&nbsp;is&nbsp;restarted.&nbsp;This&nbsp;is&nbsp;not&nbsp;a&nbsp;very&nbsp;nice&nbsp;behavior.&nbsp;&nbsp;  
&nbsp;As&nbsp;mentioned,&nbsp;I&nbsp;have&nbsp;seen&nbsp;the&nbsp;same&nbsp;behavior&nbsp;with&nbsp;a&nbsp;HybridTile&nbsp;GdiPlusRasterLayer&nbsp;on&nbsp;a&nbsp;LayerOverlay&nbsp;with&nbsp;a&nbsp;FileBitmapTileCache.&nbsp;It&nbsp;seems&nbsp;that&nbsp;if&nbsp;you&nbsp;start&nbsp;zooming&nbsp;before&nbsp;the&nbsp;map&nbsp;is&nbsp;done&nbsp;rendering&nbsp;all&nbsp;the&nbsp;tiles,&nbsp;there’s&nbsp;a&nbsp;chance&nbsp;it&nbsp;will&nbsp;cache&nbsp;something&nbsp;that&nbsp;doesn’t&nbsp;belong,&nbsp;especially&nbsp;if&nbsp;you&nbsp;also&nbsp;have&nbsp;other&nbsp;content&nbsp;on&nbsp;the&nbsp;map&nbsp;like&nbsp;the&nbsp;shapefile&nbsp;in&nbsp;my&nbsp;example.&nbsp;  
&nbsp;To&nbsp;address&nbsp;your&nbsp;suggestions:&nbsp;  
&nbsp;1:&nbsp;SingleTile&nbsp;seems&nbsp;to&nbsp;make&nbsp;the&nbsp;map&nbsp;unresponsive&nbsp;until&nbsp;it&nbsp;is&nbsp;done&nbsp;rendering.&nbsp;HybridTile&nbsp;gives&nbsp;a&nbsp;better&nbsp;user&nbsp;experience,&nbsp;and&nbsp;we&nbsp;would&nbsp;like&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;continue&nbsp;using&nbsp;this&nbsp;option.&nbsp;  
&nbsp;2:&nbsp;I&nbsp;dont&nbsp;understand&nbsp;this&nbsp;-&nbsp;can&nbsp;you&nbsp;elaborate?&nbsp;I&nbsp;dont&nbsp;know&nbsp;what&nbsp;you&nbsp;mean&nbsp;by&nbsp;adding&nbsp;the&nbsp;fastest&nbsp;urls&nbsp;in&nbsp;my&nbsp;network&nbsp;when&nbsp;your&nbsp;examples&nbsp;points&nbsp;to&nbsp;some&nbsp;OpenStreetMap&nbsp;server&nbsp;address.&nbsp;Do&nbsp;you&nbsp;mean&nbsp;that&nbsp;I&nbsp;should&nbsp;somehow&nbsp;find&nbsp;a&nbsp;server&nbsp;closer&nbsp;to&nbsp;my&nbsp;location?&nbsp;If&nbsp;that&nbsp;is&nbsp;the&nbsp;case,&nbsp;how&nbsp;can&nbsp;I&nbsp;do&nbsp;that?&nbsp;  
&nbsp;3:&nbsp;This&nbsp;does&nbsp;not&nbsp;work&nbsp;when&nbsp;the&nbsp;tiles&nbsp;are&nbsp;cached,&nbsp;and&nbsp;I&nbsp;would&nbsp;not&nbsp;want&nbsp;to&nbsp;turn&nbsp;off&nbsp;the&nbsp;caching.&nbsp;Also,&nbsp;I&nbsp;believe&nbsp;it&nbsp;is&nbsp;against&nbsp;the&nbsp;usage&nbsp;terms:&nbsp;“Cache&nbsp;Tile&nbsp;downloads&nbsp;locally&nbsp;according&nbsp;to&nbsp;HTTP&nbsp;Expiry&nbsp;Header,&nbsp;alternatively&nbsp;a&nbsp;minimum&nbsp;of&nbsp;7&nbsp;days.”&nbsp;  
&nbsp;&nbsp;  
&nbsp;In&nbsp;my&nbsp;view,&nbsp;there’s&nbsp;a&nbsp;bug&nbsp;in&nbsp;your&nbsp;caching&nbsp;mechanism&nbsp;that&nbsp;causes&nbsp;wrong&nbsp;tiles&nbsp;to&nbsp;be&nbsp;cached&nbsp;if&nbsp;the&nbsp;system&nbsp;is&nbsp;put&nbsp;under&nbsp;a&nbsp;bit&nbsp;of&nbsp;stress.

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 23, 2016, 12:48pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/8 "2016-03-23T12:48:06Z")

</div>

Hi Don

Thanks for your response. Somehow, your post has disappeared again from the site, maybe some issues with the redesign of your site.

I have sent a project that should make it possible for you to reproduce the issue. It includes a Visual Studio project and also a video wherein I reproduce the issue (21 seconds into the video). The shapefiles on the map are in different projection than the map, but I did not bother to convert projection so they are placed in a weird position, please ignore that.

I use MapSuite 9.0.0.175 (wpf desktop) dlls.

I found this other thread discussing the same issue:

> [@Zooming and Tile from Wrong Zoom Level Shown](http://community.thinkgeo.com/t/zooming-and-tile-from-wrong-zoom-level-shown/3700):
>
> Hi, &nbsp;I’ve&nbsp;been&nbsp;doing&nbsp;some&nbsp;work&nbsp;with&nbsp;the&nbsp;OpenStreetMap&nbsp;layer&nbsp;and&nbsp;have&nbsp;notice&nbsp;a&nbsp;little&nbsp;quirk&nbsp;when&nbsp;zooming&nbsp;in&nbsp;and&nbsp;out&nbsp;on&nbsp;the&nbsp;map&nbsp;(using&nbsp;version&nbsp;8.0.0.46)&nbsp;&nbsp;I’ve&nbsp;been&nbsp;using&nbsp;the&nbsp;mouse&nbsp;wheel&nbsp;to&nbsp;do&nbsp;the&nbsp;zoom&nbsp;(because&nbsp;it’s&nbsp;so&nbsp;convenient)&nbsp;but&nbsp;now&nbsp;and&nbsp;again&nbsp;I’ll&nbsp;see&nbsp;a&nbsp;tile&nbsp;on&nbsp;the&nbsp;map&nbsp;that&nbsp;doesn’t&nbsp;belong&nbsp;there.&nbsp;It’s&nbsp;the&nbsp;tile&nbsp;from&nbsp;another&nbsp;zoom&nbsp;level&nbsp;see&nbsp;it&nbsp;in&nbsp;the&nbsp;attached&nbsp;image.&nbsp;&nbsp;I&nbsp;can&nbsp;make&nbsp;the&nbsp;happen&nbsp;fairly&nbsp;regularly&nbsp;and&nbsp;am&nbsp;using&nbsp;the&nbsp;following&nbsp;code&nbsp;to&nbsp;add&nbsp;the&nbsp;layer: Dim&nbsp;osm&nbsp;As&nbsp;New&nbsp;OpenStreetMapOve…

To address your three points again:

_1: Continue use multiply tile mode is OK, but the single tile will render the map after get the whole image, if you found singletile looks slow, that means your machine view OSM maybe not fast enough._

We will use HybridTile for OpenStreetMap overlay. SingleTile locks the map and gives a bad user experience, even on my modern i7 workstation with 1 gigabit connection.

_2: I guess why that happen because when you zoom in one or more tiles hadn’t got response from the server, so it can only keep original image. If that’s the reason, it related with the network speed, so I suggest to find the fastest server, which can reduce the issue. I think you can just use single url for test, then find which one looks faster._

If network speed causes the framework to cache tiles from the wrong zoomlevel, I think the issue is primarily in the framework, not in the network speed. We have customers all over the world, and we cannot expect them all to have top notch network speed. That said, it even fails in my office, and as mentioned I’m on a 1 gigabit connection with low ping.  
I have tried to use the CustomServerUris - I found that I could try to connect to [http://a.tile.openstreetmap.de/{0}/{1}/{2}.png](http://a.tile.openstreetmap.de/%7B0%7D/%7B1%7D/%7B2%7D.png) instead of [http://a.tile.openstreetmap.org/{0}/{1}/{2}.png](http://a.tile.openstreetmap.org/%7B0%7D/%7B1%7D/%7B2%7D.png), but all I got was the pink exception tiles. Do you have some kind of documentation for OpenStreetMapOverlay?

_3: By default the cache for overlay should be closed, if you assign cache for it, the tile will be cached to local, please can add code to manage them follow the usage terms._

The OpenStreetMapOverlay has a tilecache by default in \AppData\Local\Temp\MapSuite\OpenStreetMapTmpTileCache.

Best regards  
Jonas

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [March 24, 2016, 9:07am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/9 "2016-03-24T09:07:42Z")

</div>

Hi Jonas,

Thanks for sharing the sample. It helps so much.  
We focused on the issue and fixed it. This fix will be available in the version 9.0.275.0 or later. Please get it and have a try again.

Any questions please let us know.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [March 24, 2016, 3:54pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/10 "2016-03-24T15:54:00Z")

</div>

Hi Jonas,

It seems that the server of **[http://a.tile.openstreetmap.de](http://a.tile.openstreetmap.de)** is not available.

In order to get the high performance on OpenStreetMapOverlay, it has a TileCache(an instance of FileBitmapTileCache) by default. And we can set the expiration time via the ExpirationTime property of FileBitmapTileCache.

More information abut OpenStreetMapOverlay please refer to these links:  
[http://wiki.thinkgeo.com/wiki/thinkgeo.mapsuite.wpfdesktopedition.openstreetmapoverlay](http://wiki.thinkgeo.com/wiki/thinkgeo.mapsuite.wpfdesktopedition.openstreetmapoverlay)  
[http://wiki.thinkgeo.com/wiki/map\_suite\_wpf\_desktop\_edition\_all\_samples#openstreetmap](http://wiki.thinkgeo.com/wiki/map_suite_wpf_desktop_edition_all_samples#openstreetmap)

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 29, 2016, 9:57am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/11 "2016-03-29T09:57:20Z")

</div>

Hi Peter

That is great news.  
Version 9.0.275.0 is the development build, right?  
Will this fix also be available in 9.0.0.275 - the production build?

Jonas

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [March 29, 2016, 3:14pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/12 "2016-03-29T15:14:39Z")

</div>

Hi Jonas,

Yes, the fixed will be available in Development build version 9.0.275.0 or higher. Please get it and have a try again.

This fix will not be available in the Production version unless it is stable.

Any questions please let us know.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 30, 2016, 3:09pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/13 "2016-03-30T15:09:23Z")

</div>

Hi Peter

I have now tried the newest development version (9.0.280.0), and sadly I can still reproduce the problem. The fix did not do the trick I’m afraid.

I’m curious - can you say something about how you stabilize changes? If the fix did resolve the issue, how/when would you know that the fix is stable?

Jonas

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [March 30, 2016, 5:06pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/14 "2016-03-30T17:06:52Z")

</div>

Hi Jonas,

Very sad to hear that, but I can’t recreate this issue. Could you please tell us the testing environment?

We say it’s not stable, because it lack the regression testing. And we can know if the fix is stable by some ways, such as testing by ourselves, feedback from customers, etc.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [March 30, 2016, 5:49pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/15 "2016-03-30T17:49:55Z")

</div>

Hi Jonas,

Please remember to clear the caching tiles before testing.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [March 31, 2016, 9:15am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/16 "2016-03-31T09:15:35Z")

</div>

Hi Peter

My understanding is that by default, a new tilecache is started every time you create the overlay. But I made another test, this time making sure that the cache folder was empty beforehand, and I could still reproduce it. I have made a new video where I reproduce it using the sample project I sent you. The video has been sent to [forumsupport@thinkgeo.com](mailto:forumsupport@thinkgeo.com).

My environment:

Windows 8.1 Enterprise

CPU: Intel i7 4790K  
Memory: 16 GBytes DDR3  
Graphics: Asus Geforce GT 730  
SSD: Samsung 840 Evo

 ![](https://community.thinkgeo.com/uploads/default/original/3X/a/6/a6731cfc7ee5f60aa3a5e2bf95d9eecbc19b5f71.png)

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [April 5, 2016, 9:22am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/17 "2016-04-05T09:22:16Z")

</div>

Hi Jonas,

Sorry for the delay.

Thanks for your more information, it helps so much. Yes, you’re right, it seems that the bug wasn’t fixed successfully in the last Changeset, and it’s very difficult to fix. Our developer are still working on it. Any progress will be updated here.

Sorry for any inconvenience.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [April 15, 2016, 2:05am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/18 "2016-04-15T02:05:07Z")

</div>

Hi Jonas,

I did some tests and it seems that that this bug has been fixed. It will be available in the version 9.0.296.0 or later. Please get it and try it again.

Any questions please let me know.

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![Jonas](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonas](https://community.thinkgeo.com/u/Jonas)\
**Post date:** [May 2, 2016, 1:21pm UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/19 "2016-05-02T13:21:12Z")

</div>

Hi Peter

Sorry for this late reply, I have been on vacation.

I tried the newest development build (9.0.309.0) and it really does look like you have fixed the problem. That is great!

Can you give an approximate time when this will go into the production builds? Days, weeks or months from now?

Best regards  
Jonas

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [May 3, 2016, 5:35am UTC](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946/20 "2016-05-03T05:35:40Z")

</div>

Hi Jonas,

Generally, we will move the change to release branch after it’s proved stable, so it should get moved for 10.0.

Do you think this change is very hurry and important for you to move to production build? If so please let us know, we can do some more test for this change and estimate when we can move it.

Regards,

Don

[Next page](https://community.thinkgeo.com/t/tiles-from-wrong-zoomlevel-on-openstreetmap/3946.md?page=2)
