# Overlay.Refresh Behavior?

**URL:** <https://community.thinkgeo.com/t/overlay-refresh-behavior/2954>\
**Category:** WPF\
**Created:** [February 24, 2011, 12:33pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954 "2011-02-24T12:33:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [February 24, 2011, 12:33pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/1 "2011-02-24T12:33:06Z")

</div>

I&nbsp;was&nbsp;just&nbsp;curious&nbsp;as&nbsp;to&nbsp;the&nbsp;behavior&nbsp;of&nbsp;Overlay.Refresh(),&nbsp;particularly&nbsp;when&nbsp;many&nbsp;calls&nbsp;to&nbsp;it&nbsp;come&nbsp;in&nbsp;at&nbsp;a&nbsp;short&nbsp;period&nbsp;of&nbsp;time...&nbsp;Does&nbsp;Overlay&nbsp;queue&nbsp;these&nbsp;up&nbsp;and&nbsp;execute&nbsp;each&nbsp;refresh,&nbsp;or&nbsp;if&nbsp;there&nbsp;is&nbsp;already&nbsp;one&nbsp;queued&nbsp;up&nbsp;to&nbsp;go,&nbsp;does&nbsp;it&nbsp;throw&nbsp;the&nbsp;rest&nbsp;away?

I'm&nbsp;running&nbsp;into&nbsp;an&nbsp;issue&nbsp;that&nbsp;without&nbsp;looking&nbsp;into&nbsp;it&nbsp;too&nbsp;much&nbsp;I&nbsp;think&nbsp;is&nbsp;caused&nbsp;by&nbsp;the&nbsp;refreshes&nbsp;being&nbsp;queued&nbsp;up&nbsp;and&nbsp;executing&nbsp;(specific&nbsp;to&nbsp;my&nbsp;case&nbsp;a&nbsp;WMSRasterLayer&nbsp;as&nbsp;download&nbsp;from&nbsp;WMS&nbsp;server&nbsp;can&nbsp;be&nbsp;slow).&nbsp;&nbsp;Anyhow,&nbsp;just&nbsp;knowing&nbsp;how&nbsp;Refresh&nbsp;works&nbsp;will&nbsp;help&nbsp;me&nbsp;determine&nbsp;the&nbsp;best&nbsp;way&nbsp;to&nbsp;go&nbsp;about&nbsp;figuring&nbsp;out&nbsp;my&nbsp;issue.

Thanks,

.Ryan.

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [February 24, 2011, 1:04pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/2 "2011-02-24T13:04:32Z")

</div>

I&nbsp;had&nbsp;another&nbsp;question/issue&nbsp;with&nbsp;Overlay.Refresh(&nbsp;)&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;have&nbsp;a&nbsp;custom&nbsp;MarkerOverlay&nbsp;that&nbsp;I&nbsp;use.&nbsp;&nbsp;Each&nbsp;marker&nbsp;has&nbsp;a&nbsp;context&nbsp;menu.&nbsp;&nbsp;From&nbsp;within&nbsp;the&nbsp;context&nbsp;menu,&nbsp;I&nbsp;update&nbsp;my&nbsp;overlay&nbsp;and&nbsp;call&nbsp;Overlay.Refresh(&nbsp;),&nbsp;however&nbsp;no&nbsp;changes&nbsp;occur&nbsp;until&nbsp;I&nbsp;close&nbsp;my&nbsp;context&nbsp;menu&nbsp;(IE&nbsp;if&nbsp;I&nbsp;remove&nbsp;the&nbsp;item&nbsp;from&nbsp;my&nbsp;data&nbsp;source&nbsp;and&nbsp;call&nbsp;refresh,&nbsp;the&nbsp;object&nbsp;is&nbsp;displayed&nbsp;on&nbsp;the&nbsp;map&nbsp;until&nbsp;I&nbsp;close&nbsp;the&nbsp;context&nbsp;menu&nbsp;(I&nbsp;know&nbsp;it&nbsp;doesn’t&nbsp;make&nbsp;sense&nbsp;to&nbsp;keep&nbsp;the&nbsp;menu&nbsp;open&nbsp;if&nbsp;I’ve&nbsp;removed&nbsp;my&nbsp;item,&nbsp;this&nbsp;was&nbsp;just&nbsp;an&nbsp;easy&nbsp;example&nbsp;for&nbsp;me&nbsp;to&nbsp;test)).&nbsp;&nbsp;I&nbsp;can,&nbsp;however,&nbsp;use&nbsp;WpfMap.ZoomTo&nbsp;which&nbsp;updates&nbsp;the&nbsp;map&nbsp;as&nbsp;soon&nbsp;as&nbsp;it&nbsp;is&nbsp;called.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;help&nbsp;would&nbsp;be&nbsp;appreciated.&nbsp;  
&nbsp;&nbsp;  
&nbsp;.Ryan.

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [February 24, 2011, 1:18pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/3 "2011-02-24T13:18:09Z")

</div>

Please&nbsp;ignore&nbsp;my&nbsp;second&nbsp;question…&nbsp;I&nbsp;found&nbsp;a&nbsp;bug&nbsp;in&nbsp;my&nbsp;code…&nbsp;  
&nbsp;.Ryan.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 25, 2011, 2:06am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/4 "2011-02-25T02:06:47Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;In&nbsp;fact,&nbsp;the&nbsp;WPF&nbsp;Map&nbsp;Control&nbsp;is&nbsp;not&nbsp;queuing&nbsp;up&nbsp;any&nbsp;WMS&nbsp;request&nbsp;internally.&nbsp;When&nbsp;refreshing&nbsp;an&nbsp;Overlay,&nbsp;all&nbsp;of&nbsp;the&nbsp;Tiles&nbsp;within&nbsp;current&nbsp;extent&nbsp;will&nbsp;be&nbsp;requested.&nbsp;  
&nbsp;&nbsp;  
&nbsp;For&nbsp;using&nbsp;the&nbsp;Refresh&nbsp;method&nbsp;continuously&nbsp;in&nbsp;a&nbsp;short&nbsp;period&nbsp;of&nbsp;time,&nbsp;the&nbsp;major&nbsp;factor&nbsp;that&nbsp;may&nbsp;affect&nbsp;the&nbsp;responding&nbsp;speed&nbsp;lies&nbsp;in&nbsp;both&nbsp;WMS&nbsp;Server&nbsp;and&nbsp;Map&nbsp;Control.&nbsp;Since&nbsp;a&nbsp;lot&nbsp;of&nbsp;WMS&nbsp;requests&nbsp;will&nbsp;be&nbsp;sent&nbsp;to&nbsp;WMS&nbsp;Server,&nbsp;these&nbsp;requests&nbsp;could&nbsp;be&nbsp;queued&nbsp;up&nbsp;at&nbsp;the&nbsp;server&nbsp;side,&nbsp;which&nbsp;could&nbsp;slow&nbsp;down&nbsp;the&nbsp;server’s&nbsp;responding&nbsp;for&nbsp;incoming&nbsp;requests,&nbsp;meanwhile,&nbsp;when&nbsp;making&nbsp;a&nbsp;new&nbsp;Refresh&nbsp;action,&nbsp;Tiles&nbsp;on&nbsp;Map&nbsp;Control&nbsp;will&nbsp;still&nbsp;be&nbsp;waiting&nbsp;for&nbsp;the&nbsp;sent&nbsp;requests,&nbsp;which&nbsp;will&nbsp;also&nbsp;slow&nbsp;down&nbsp;the&nbsp;Map’s&nbsp;responding.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;So,&nbsp;it’s&nbsp;not&nbsp;suggested&nbsp;to&nbsp;use&nbsp;Overlay.Refresh&nbsp;method&nbsp;if&nbsp;there’s&nbsp;no&nbsp;style&nbsp;or&nbsp;layer&nbsp;changes&nbsp;in&nbsp;the&nbsp;Overlay.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Further&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Carlos1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/6a8cbe/32.png) [@Carlos1](https://community.thinkgeo.com/u/Carlos1)\
**Post date:** [February 25, 2011, 3:13am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/5 "2011-02-25T03:13:08Z")

</div>

Hi&nbsp;James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;But&nbsp;forgetting&nbsp;the&nbsp;WMS,&nbsp;imagine&nbsp;an&nbsp;application&nbsp;with&nbsp;multiple&nbsp;threads&nbsp;that&nbsp;may&nbsp;call&nbsp;Overlay.Refresh&nbsp;method&nbsp;when&nbsp;other’s&nbsp;thread&nbsp;Overlay.Refresh&nbsp;is&nbsp;still&nbsp;being&nbsp;processed.&nbsp;What&nbsp;would&nbsp;be&nbsp;the&nbsp;result?&nbsp;One&nbsp;of&nbsp;them&nbsp;being&nbsp;ignored&nbsp;because&nbsp;the&nbsp;other&nbsp;is&nbsp;in&nbsp;progress,&nbsp;one&nbsp;of&nbsp;them&nbsp;being&nbsp;cancelled&nbsp;because&nbsp;the&nbsp;second&nbsp;started&nbsp;executing,&nbsp;or&nbsp;one&nbsp;of&nbsp;them&nbsp;being&nbsp;queued&nbsp;and&nbsp;executed&nbsp;after&nbsp;first&nbsp;one&nbsp;completion?&nbsp;(Last&nbsp;one&nbsp;you&nbsp;already&nbsp;answered&nbsp;is&nbsp;not&nbsp;the&nbsp;right&nbsp;one,&nbsp;so&nbsp;we&nbsp;have&nbsp;two&nbsp;options)

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 28, 2011, 3:53am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/6 "2011-02-28T03:53:46Z")

</div>

Carlos,&nbsp;  
&nbsp;&nbsp;  
&nbsp;As&nbsp;Overlay.Refresh&nbsp;is&nbsp;interacted&nbsp;with&nbsp;UI&nbsp;Element,&nbsp;when&nbsp;calling&nbsp;it&nbsp;in&nbsp;multiple-thread,&nbsp;there&nbsp;will&nbsp;be&nbsp;an&nbsp;error.&nbsp;So,&nbsp;for&nbsp;now,&nbsp;Overlay.Refresh&nbsp;can&nbsp;only&nbsp;be&nbsp;called&nbsp;in&nbsp;single&nbsp;thread.&nbsp;Anyway,&nbsp;thank&nbsp;you&nbsp;for&nbsp;caring&nbsp;about&nbsp;MapSuiteWpfDesktopEdition.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Further&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;James&nbsp;

---

<div class="post-metadata">

**Author:** ![Carlos1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/6a8cbe/32.png) [@Carlos1](https://community.thinkgeo.com/u/Carlos1)\
**Post date:** [February 28, 2011, 4:30am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/7 "2011-02-28T04:30:17Z")

</div>

Hi&nbsp;James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;I&nbsp;know&nbsp;that,&nbsp;but&nbsp;independent&nbsp;threads&nbsp;use&nbsp;invoke&nbsp;method&nbsp;to&nbsp;interact&nbsp;with&nbsp;the&nbsp;UI&nbsp;(this&nbsp;is&nbsp;the&nbsp;standard&nbsp;procedure&nbsp;for&nbsp;all&nbsp;the&nbsp;interactions&nbsp;betwen&nbsp;working&nbsp;threads&nbsp;and&nbsp;UI)&nbsp;

---

<div class="post-metadata">

**Author:** ![Klaus3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/e5b9ba/32.png) [@Klaus3](https://community.thinkgeo.com/u/Klaus3)\
**Post date:** [February 28, 2011, 7:37am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/8 "2011-02-28T07:37:19Z")

</div>

Carlos,&nbsp;just&nbsp;adding&nbsp;to&nbsp;what&nbsp;James&nbsp;said:&nbsp;&nbsp;Overlay.Refresh()&nbsp;is&nbsp;eventually&nbsp;invoked&nbsp;by&nbsp;the&nbsp;main&nbsp;thread's&nbsp;dispatcher&nbsp;as&nbsp;you&nbsp;indicated.&nbsp;&nbsp;So,&nbsp;if&nbsp;you&nbsp;have&nbsp;two&nbsp;simultaneous&nbsp;calls&nbsp;to&nbsp;overlay.refresh,&nbsp;these&nbsp;calls&nbsp;will&nbsp;be&nbsp;added&nbsp;to&nbsp;the&nbsp;main&nbsp;dispatcher's&nbsp;queue&nbsp;and&nbsp;processed&nbsp;in&nbsp;a&nbsp;FIFO&nbsp;manner&nbsp;as&nbsp;they&nbsp;will&nbsp;arrive&nbsp;at&nbsp;same&nbsp;priority.&nbsp;  
  
  
  
I&nbsp;do&nbsp;not&nbsp;see&nbsp;a&nbsp;problem&nbsp;here.

---

<div class="post-metadata">

**Author:** ![Carlos1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/6a8cbe/32.png) [@Carlos1](https://community.thinkgeo.com/u/Carlos1)\
**Post date:** [February 28, 2011, 9:57am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/9 "2011-02-28T09:57:43Z")

</div>

Hi&nbsp;Klaus,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;There&nbsp;is&nbsp;no&nbsp;problem,&nbsp;it&nbsp;was&nbsp;a&nbsp;question&nbsp;on&nbsp;how&nbsp;it&nbsp;work,&nbsp;because&nbsp;if&nbsp;it&nbsp;is&nbsp;that&nbsp;way&nbsp;then&nbsp;I&nbsp;(and&nbsp;probably&nbsp;Ryan&nbsp;too)&nbsp;will&nbsp;need&nbsp;to&nbsp;"filter"&nbsp;the&nbsp;calls&nbsp;to&nbsp;the&nbsp;refresh&nbsp;function&nbsp;in&nbsp;a&nbsp;"lazy"&nbsp;way&nbsp;to&nbsp;avoid&nbsp;too&nbsp;often&nbsp;refeshes&nbsp;and&nbsp;loss&nbsp;of&nbsp;responsiveness&nbsp;

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [February 28, 2011, 10:41am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/10 "2011-02-28T10:41:22Z")

</div>

Yes&nbsp;Carlos,&nbsp;that&nbsp;was&nbsp;exactly&nbsp;what&nbsp;I&nbsp;was&nbsp;trying&nbsp;to&nbsp;figure&nbsp;out.&nbsp;&nbsp;Thanks!

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 1, 2011, 9:40pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/11 "2011-03-01T21:40:58Z")

</div>

Ryan,&nbsp;I&nbsp;am&nbsp;glad&nbsp;you&nbsp;find&nbsp;the&nbsp;solution,&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;more&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;also&nbsp;Thank&nbsp;Carlos&nbsp;and&nbsp;Klaus,&nbsp;I&nbsp;appreciate&nbsp;your&nbsp;sharing.&nbsp;  
&nbsp;&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [March 2, 2011, 10:59am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/12 "2011-03-02T10:59:44Z")

</div>

James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Just&nbsp;a&nbsp;quick&nbsp;question&nbsp;on&nbsp;Refresh().&nbsp;&nbsp;When&nbsp;Refresh()&nbsp;is&nbsp;called,&nbsp;does&nbsp;it&nbsp;store&nbsp;a&nbsp;snapshot&nbsp;of&nbsp;the&nbsp;map&nbsp;(ie&nbsp;extent,&nbsp;visible&nbsp;layers,&nbsp;etc)&nbsp;for&nbsp;use&nbsp;during&nbsp;that&nbsp;refresh,&nbsp;or&nbsp;does&nbsp;Refresh()&nbsp;take&nbsp;the&nbsp;current&nbsp;state&nbsp;of&nbsp;the&nbsp;map&nbsp;when&nbsp;the&nbsp;refresh&nbsp;actually&nbsp;executes&nbsp;as&nbsp;its&nbsp;state?&nbsp;&nbsp;Just&nbsp;trying&nbsp;to&nbsp;figure&nbsp;out&nbsp;the&nbsp;best&nbsp;way&nbsp;to&nbsp;filter&nbsp;out&nbsp;unnecessary&nbsp;refresh&nbsp;calls.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;.Ryan.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 3, 2011, 1:48am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/13 "2011-03-03T01:48:51Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;can&nbsp;find&nbsp;a&nbsp;property&nbsp;named&nbsp;MapArgument&nbsp;in&nbsp;Overlay,&nbsp;where&nbsp;the&nbsp;extent&nbsp;of&nbsp;the&nbsp;map&nbsp;and&nbsp;other&nbsp;information&nbsp;are&nbsp;stored,&nbsp;and&nbsp;in&nbsp;LayerOverlay,&nbsp;the&nbsp;Layers&nbsp;property&nbsp;holds&nbsp;reference&nbsp;to&nbsp;the&nbsp;layers&nbsp;added&nbsp;to&nbsp;the&nbsp;overlay.&nbsp;When&nbsp;Overlay.Refresh&nbsp;method&nbsp;is&nbsp;called,&nbsp;the&nbsp;entire&nbsp;related&nbsp;state&nbsp;is&nbsp;loaded&nbsp;from&nbsp;these&nbsp;properties.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Further&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;James&nbsp;

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [March 3, 2011, 11:17am UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/14 "2011-03-03T11:17:49Z")

</div>

I&nbsp;guess&nbsp;my&nbsp;question&nbsp;is&nbsp;assuming&nbsp;we&nbsp;have&nbsp;a&nbsp;bunch&nbsp;of&nbsp;refreshes&nbsp;come&nbsp;in&nbsp;that&nbsp;get&nbsp;queued&nbsp;up…&nbsp;each&nbsp;refresh&nbsp;actually&nbsp;executes&nbsp;(is&nbsp;no&nbsp;longer&nbsp;in&nbsp;the&nbsp;queue)…&nbsp;does&nbsp;it&nbsp;read&nbsp;the&nbsp;extent&nbsp;information&nbsp;etc&nbsp;at&nbsp;that&nbsp;point&nbsp;in&nbsp;time,&nbsp;or&nbsp;is&nbsp;that&nbsp;information&nbsp;stored&nbsp;with&nbsp;the&nbsp;queued&nbsp;up&nbsp;refresh&nbsp;request?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Just&nbsp;an&nbsp;example&nbsp;to&nbsp;illustrate&nbsp;my&nbsp;question,&nbsp;if&nbsp;for&nbsp;some&nbsp;reason&nbsp;a&nbsp;refresh&nbsp;was&nbsp;queued&nbsp;up&nbsp;for&nbsp;60&nbsp;seconds,&nbsp;and&nbsp;in&nbsp;that&nbsp;time&nbsp;the&nbsp;user&nbsp;has&nbsp;panned&nbsp;the&nbsp;map,&nbsp;when&nbsp;that&nbsp;refresh&nbsp;actually&nbsp;gets&nbsp;executed,&nbsp;will&nbsp;it&nbsp;know&nbsp;the&nbsp;new&nbsp;map&nbsp;extent&nbsp;and&nbsp;all&nbsp;other&nbsp;related&nbsp;information,&nbsp;or&nbsp;will&nbsp;it&nbsp;do&nbsp;the&nbsp;refresh&nbsp;of&nbsp;the&nbsp;overlay&nbsp;as&nbsp;if&nbsp;the&nbsp;map&nbsp;was&nbsp;still&nbsp;at&nbsp;the&nbsp;previous&nbsp;map&nbsp;extent?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;.Ryan.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 3, 2011, 8:36pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/15 "2011-03-03T20:36:23Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Overlay&nbsp;contains&nbsp;tiles,&nbsp;but&nbsp;tile&nbsp;doesn’t&nbsp;know&nbsp;its&nbsp;parent&nbsp;information&nbsp;because&nbsp;overlay&nbsp;is&nbsp;not&nbsp;a&nbsp;FrameworkElement&nbsp;but&nbsp;just&nbsp;an&nbsp;object.&nbsp;All&nbsp;tiles&nbsp;are&nbsp;quered&nbsp;in&nbsp;the&nbsp;UI&nbsp;thread&nbsp;and&nbsp;proceeding&nbsp;its&nbsp;rendering.&nbsp;After&nbsp;sleeping&nbsp;60s,&nbsp;the&nbsp;tile&nbsp;maintains&nbsp;its&nbsp;own&nbsp;informations&nbsp;such&nbsp;as&nbsp;tile’s&nbsp;extent,&nbsp;the&nbsp;map&nbsp;draws&nbsp;the&nbsp;quered&nbsp;tiles&nbsp;based&nbsp;on&nbsp;its&nbsp;latest&nbsp;extent&nbsp;and&nbsp;the&nbsp;tiles&nbsp;information.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [March 4, 2011, 2:02pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/16 "2011-03-04T14:02:29Z")

</div>

Hi&nbsp;James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I’ve&nbsp;sent&nbsp;a&nbsp;sample&nbsp;to&nbsp;support&nbsp;to&nbsp;forward&nbsp;on&nbsp;to&nbsp;you.&nbsp;&nbsp;In&nbsp;the&nbsp;sample,&nbsp;I&nbsp;connect&nbsp;to&nbsp;a&nbsp;WMS&nbsp;server&nbsp;to&nbsp;get&nbsp;layers&nbsp;depending&nbsp;on&nbsp;check&nbsp;boxes.&nbsp;&nbsp;If&nbsp;you&nbsp;go&nbsp;down&nbsp;the&nbsp;list&nbsp;and&nbsp;select&nbsp;all&nbsp;the&nbsp;check&nbsp;boxes,&nbsp;then&nbsp;while&nbsp;it&nbsp;is&nbsp;loading&nbsp;zoom&nbsp;in&nbsp;with&nbsp;the&nbsp;zoom&nbsp;box&nbsp;and&nbsp;wait,&nbsp;you&nbsp;will&nbsp;see&nbsp;some&nbsp;funny&nbsp;things&nbsp;happen&nbsp;(including&nbsp;it&nbsp;appearing&nbsp;to&nbsp;switch&nbsp;zoom&nbsp;levels&nbsp;without&nbsp;any&nbsp;user&nbsp;interaction&nbsp;due&nbsp;to&nbsp;old&nbsp;tiles&nbsp;being&nbsp;drawn)&nbsp;due&nbsp;to&nbsp;the&nbsp;multiple&nbsp;refresh,&nbsp;then&nbsp;eventually&nbsp;a&nbsp;crash.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;This&nbsp;is&nbsp;just&nbsp;an&nbsp;easy&nbsp;example&nbsp;of&nbsp;some&nbsp;of&nbsp;the&nbsp;problems&nbsp;I’m&nbsp;experiencing.&nbsp;&nbsp;My&nbsp;application&nbsp;is&nbsp;heavily&nbsp;multithreaded&nbsp;and&nbsp;refreshes&nbsp;can&nbsp;be&nbsp;coming&nbsp;from&nbsp;all&nbsp;over&nbsp;the&nbsp;place.&nbsp;&nbsp;I’m&nbsp;just&nbsp;curious&nbsp;if&nbsp;you&nbsp;had&nbsp;any&nbsp;ideas&nbsp;for&nbsp;a&nbsp;solution&nbsp;to&nbsp;at&nbsp;least&nbsp;make&nbsp;it&nbsp;work&nbsp;(ie&nbsp;not&nbsp;crash&nbsp;and&nbsp;not&nbsp;appear&nbsp;to&nbsp;zoom&nbsp;to&nbsp;different&nbsp;extents)&nbsp;even&nbsp;if&nbsp;we&nbsp;take&nbsp;the&nbsp;performance&nbsp;hit&nbsp;of&nbsp;the&nbsp;multiple&nbsp;refreshes&nbsp;going&nbsp;through.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;.Ryan.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 6, 2011, 11:01pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/17 "2011-03-06T23:01:21Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;haven’t&nbsp;got&nbsp;the&nbsp;sample&nbsp;yet,&nbsp;I&nbsp;will&nbsp;ask&nbsp;support,&nbsp;and&nbsp;once&nbsp;I&nbsp;get&nbsp;it&nbsp;I&nbsp;think&nbsp;I&nbsp;could&nbsp;recreate&nbsp;your&nbsp;problem&nbsp;and&nbsp;give&nbsp;you&nbsp;a&nbsp;solution&nbsp;for&nbsp;it.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;James&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 7, 2011, 8:53pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/18 "2011-03-07T20:53:09Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;sample.&nbsp;I&nbsp;can&nbsp;recreate&nbsp;your&nbsp;problem&nbsp;that&nbsp;after&nbsp;I&nbsp;select&nbsp;all&nbsp;the&nbsp;check&nbsp;boxes&nbsp;and&nbsp;zoom&nbsp;in&nbsp;and&nbsp;wait,&nbsp;it&nbsp;will&nbsp;throw&nbsp;Object&nbsp;null&nbsp;reference&nbsp;exception&nbsp;eventually,&nbsp;we&nbsp;have&nbsp;fixed&nbsp;this&nbsp;bug&nbsp;in&nbsp;4.5.128.0&nbsp;version,&nbsp;please&nbsp;get&nbsp;the&nbsp;latest&nbsp;package(development&nbsp;branch)&nbsp;and&nbsp;try&nbsp;it&nbsp;again.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [March 8, 2011, 12:22pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/19 "2011-03-08T12:22:53Z")

</div>

Hi&nbsp;James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;can&nbsp;confirm&nbsp;that&nbsp;I&nbsp;don’t&nbsp;see&nbsp;the&nbsp;crash&nbsp;anymore?&nbsp;&nbsp;I&nbsp;was&nbsp;wondering&nbsp;if&nbsp;you&nbsp;were&nbsp;able&nbsp;to&nbsp;see&nbsp;where&nbsp;it&nbsp;will&nbsp;sometimes&nbsp;switch&nbsp;to&nbsp;a&nbsp;different&nbsp;zoom&nbsp;level&nbsp;and&nbsp;if&nbsp;this&nbsp;was&nbsp;fixed?&nbsp;&nbsp;I&nbsp;know&nbsp;I&nbsp;still&nbsp;see&nbsp;it&nbsp;when&nbsp;I’m&nbsp;switching&nbsp;using&nbsp;the&nbsp;OpenStreetMapOverlay&nbsp;and&nbsp;an&nbsp;overlay&nbsp;with&nbsp;local&nbsp;shapefiles,&nbsp;and&nbsp;I&nbsp;know&nbsp;I’ve&nbsp;seen&nbsp;it&nbsp;in&nbsp;my&nbsp;example&nbsp;app&nbsp;a&nbsp;few&nbsp;times&nbsp;before…&nbsp;&nbsp;Not&nbsp;sure&nbsp;if&nbsp;the&nbsp;two&nbsp;are&nbsp;related&nbsp;at&nbsp;all&nbsp;and&nbsp;it&nbsp;was&nbsp;just&nbsp;something&nbsp;that&nbsp;got&nbsp;missed&nbsp;in&nbsp;the&nbsp;OSM&nbsp;overlay…&nbsp;if&nbsp;not,&nbsp;I’ll&nbsp;create&nbsp;a&nbsp;new&nbsp;topic&nbsp;w/&nbsp;a&nbsp;sample&nbsp;app.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks!&nbsp;  
&nbsp;.Ryan.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 8, 2011, 11:53pm UTC](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954/20 "2011-03-08T23:53:10Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;glad&nbsp;that&nbsp;you&nbsp;confirm&nbsp;the&nbsp;crash&nbsp;problem&nbsp;is&nbsp;fixed.&nbsp;But&nbsp;I&nbsp;am&nbsp;still&nbsp;not&nbsp;sure&nbsp;what&nbsp;the&nbsp;appear&nbsp;to&nbsp;zoom&nbsp;to&nbsp;different&nbsp;extents&nbsp;problem&nbsp;is,&nbsp;I&nbsp;think&nbsp;the&nbsp;different&nbsp;zoom&nbsp;level&nbsp;tile&nbsp;is&nbsp;just&nbsp;preview&nbsp;effect,&nbsp;you&nbsp;can&nbsp;try&nbsp;to&nbsp;set&nbsp;TransitionEffect&nbsp;of&nbsp;Overlay&nbsp;to&nbsp;none&nbsp;and&nbsp;see&nbsp;if&nbsp;your&nbsp;problem&nbsp;is&nbsp;still&nbsp;existing.&nbsp;If&nbsp;it&nbsp;is,&nbsp;could&nbsp;you&nbsp;provide&nbsp;more&nbsp;information&nbsp;to&nbsp;us,&nbsp;such&nbsp;as&nbsp;a&nbsp;screen-shot,&nbsp;you&nbsp;can&nbsp;mark&nbsp;something&nbsp;on&nbsp;that&nbsp;image&nbsp;to&nbsp;show&nbsp;your&nbsp;problem.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;James

[Next page](https://community.thinkgeo.com/t/overlay-refresh-behavior/2954.md?page=2)
