# Unable to refresh map with markers after adding them to map

**URL:** <https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917>\
**Category:** WebForms\
**Created:** [August 5, 2009, 11:25am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917 "2009-08-05T11:25:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 5, 2009, 11:25am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/1 "2009-08-05T11:25:09Z")

</div>

Hi&nbsp;all,  
  
  
  
I&nbsp;have&nbsp;an&nbsp;issue&nbsp;with&nbsp;web&nbsp;edition&nbsp;3&nbsp;where&nbsp;I&nbsp;can't&nbsp;seem&nbsp;to&nbsp;refresh&nbsp;the&nbsp;map&nbsp;with&nbsp;a&nbsp;custom&nbsp;overlay&nbsp;that  
  
I&nbsp;just&nbsp;put&nbsp;on&nbsp;it,&nbsp;at&nbsp;least,&nbsp;not&nbsp;without&nbsp;physically&nbsp;moving&nbsp;the&nbsp;map&nbsp;around&nbsp;first.&nbsp;&nbsp;How&nbsp;can&nbsp;I&nbsp;refresh&nbsp;the&nbsp;map&nbsp;so  
  
that&nbsp;the&nbsp;overlay&nbsp;shows&nbsp;up&nbsp;through&nbsp;code&nbsp;?&nbsp;&nbsp;I&nbsp;have&nbsp;a&nbsp;windows&nbsp;timer&nbsp;that&nbsp;I&nbsp;am&nbsp;using&nbsp;and&nbsp;initialize&nbsp;on  
  
Page\_Init&nbsp;to&nbsp;do&nbsp;the&nbsp;asynchronous&nbsp;updates&nbsp;to&nbsp;the&nbsp;markers&nbsp;(which&nbsp;I&nbsp;will&nbsp;be&nbsp;getting&nbsp;the&nbsp;positions&nbsp;for  
  
from&nbsp;a&nbsp;database).&nbsp;&nbsp;The&nbsp;map&nbsp;control&nbsp;itself&nbsp;is&nbsp;within&nbsp;an&nbsp;AJAX&nbsp;updatepanel.&nbsp;&nbsp;I&nbsp;read&nbsp;a&nbsp;post&nbsp;prior  
  
where&nbsp;support&nbsp;told&nbsp;the&nbsp;person&nbsp;not&nbsp;to&nbsp;put&nbsp;the&nbsp;map&nbsp;in&nbsp;an&nbsp;updatepanel&nbsp;but&nbsp;I&nbsp;don't&nbsp;want&nbsp;the&nbsp;map&nbsp;to  
  
cause&nbsp;a&nbsp;postback&nbsp;every&nbsp;time&nbsp;I&nbsp;zoom&nbsp;in&nbsp;or&nbsp;move&nbsp;the&nbsp;map&nbsp;around?&nbsp;&nbsp;I&nbsp;just&nbsp;want&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;have&nbsp;my  
  
timer&nbsp;update&nbsp;the&nbsp;marker&nbsp;positions,&nbsp;put&nbsp;them&nbsp;in&nbsp;an&nbsp;overlay&nbsp;and&nbsp;replace&nbsp;the&nbsp;previous&nbsp;overlay&nbsp;with&nbsp;the  
  
generated&nbsp;one.&nbsp;&nbsp;Any&nbsp;help&nbsp;would&nbsp;be&nbsp;appreciated!&nbsp;&nbsp;I&nbsp;have&nbsp;posted&nbsp;the&nbsp;code&nbsp;I&nbsp;am&nbsp;using&nbsp;below&nbsp;just&nbsp;in  
  
case&nbsp;it&nbsp;was&nbsp;needed.  
  
  
  
Thanks&nbsp;in&nbsp;advance.  
  
Bob  
  
  
  
Protected&nbsp;\_timer&nbsp;As&nbsp;System.Timers.Timer  
  
  
  
Protected&nbsp;Sub&nbsp;Page\_Init(ByVal&nbsp;sender&nbsp;As&nbsp;Object,&nbsp;ByVal&nbsp;e&nbsp;As&nbsp;System.EventArgs)&nbsp;Handles&nbsp;Me.Init  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;\_timer&nbsp;=&nbsp;New&nbsp;System.Timers.Timer(5000)  
  
&nbsp;&nbsp;&nbsp;&nbsp;AddHandler&nbsp;\_timer.Elapsed,&nbsp;AddressOf&nbsp;timer\_Elapsed  
  
  
  
End&nbsp;Sub  
  
  
  
Private&nbsp;Sub&nbsp;timer\_Elapsed(ByVal&nbsp;sender&nbsp;As&nbsp;Object,&nbsp;ByVal&nbsp;e&nbsp;As&nbsp;System.Timers.ElapsedEventArgs)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;Not&nbsp;tgMap.CustomOverlays.Contains("MarkerOverlay")&nbsp;Then  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;markerOverlay&nbsp;As&nbsp;New&nbsp;SimpleMarkerOverlay("MarkerOverlay")  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.DragMode&nbsp;=&nbsp;MarkerDragMode.Drag  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Markers.Add(New&nbsp;Marker(-8922952.93266,&nbsp;2984101.58384,&nbsp;New&nbsp;WebImage(21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Markers.Add(New&nbsp;Marker(-10830821.09801,&nbsp;4539747.98328,&nbsp;New&nbsp;WebImage(21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Markers.Add(New&nbsp;Marker(-12454955.13517,&nbsp;4980025.26614,&nbsp;New&nbsp;WebImage(21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Markers.Add(New&nbsp;Marker(-10772117.52067,&nbsp;3864656.14956,&nbsp;New&nbsp;WebImage(21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Markers.Add(New&nbsp;Marker(-13164290.75755,&nbsp;4035875.0929R,&nbsp;New&nbsp;WebImage(21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Markers.Add(New&nbsp;Marker(-9754587.80028,&nbsp;5156136.17929,&nbsp;New&nbsp;WebImage(21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CustomOverlays.Add(markerOverlay)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CustomOverlays.Remove("MarkerOverlay")  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Sub  
  
&nbsp;&nbsp;&nbsp;  
  
Protected&nbsp;Sub&nbsp;Page\_Load(ByVal&nbsp;sender&nbsp;As&nbsp;Object,&nbsp;ByVal&nbsp;e&nbsp;As&nbsp;System.EventArgs)&nbsp;Handles&nbsp;Me.Load  
  
&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bRes&nbsp;As&nbsp;Boolean&nbsp;=&nbsp;My.Computer.Network.IsAvailable  
  
&nbsp;&nbsp;&nbsp;  
  
&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;bRes&nbsp;Then  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.MapBackground.BackgroundBrush&nbsp;=&nbsp;New&nbsp;GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CurrentExtent&nbsp;=&nbsp;New&nbsp;RectangleShape(-13939426.6371,&nbsp;6701997.4056,&nbsp;-7812401.86,&nbsp;2626987.386962)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.MapUnit&nbsp;=&nbsp;GeographyUnit.Meter  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'tgMap.MapTools.OverlaySwitcher.Enabled&nbsp;=&nbsp;True  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.MapTools.MouseCoordinate.Enabled&nbsp;=&nbsp;True  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;google&nbsp;As&nbsp;New&nbsp;GoogleOverlay("Google&nbsp;Map")  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;google.JavaScriptLibraryUri&nbsp;=&nbsp;New&nbsp;Uri(ConfigurationManager.AppSettings("GoogleUri"))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;google.GoogleMapType&nbsp;=&nbsp;GoogleMapType.Normal  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CustomOverlays.Add(google)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If  
  
  
  
End&nbsp;Sub  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [August 5, 2009, 1:34pm UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/2 "2009-08-05T13:34:27Z")

</div>

Hi&nbsp;Bob,  
  
  
  
I&nbsp;remember&nbsp;that&nbsp;post&nbsp;you&nbsp;mentioned&nbsp;which&nbsp;you&nbsp;can&nbsp;access&nbsp;at:  
  
[gis.thinkgeo.com/Support/Dis....aspx#4905](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/4905/afv/topic/afpgj/1/Default.aspx#4905)  
  
  
  
In&nbsp;that&nbsp;post,&nbsp;we&nbsp;have&nbsp;two&nbsp;samples&nbsp;in&nbsp;the&nbsp;attachment.&nbsp;One&nbsp;is&nbsp;use&nbsp;Update&nbsp;Panel&nbsp;(Default.aspx)&nbsp;while&nbsp;another&nbsp;one&nbsp;is&nbsp;the&nbsp;one&nbsp;you&nbsp;specified&nbsp;which&nbsp;we&nbsp;recommend&nbsp;not&nbsp;to&nbsp;use&nbsp;Update&nbsp;Panel&nbsp;(DefaultByJavaScript.aspx).  
  
  
  
That’s&nbsp;a&nbsp;sample&nbsp;for&nbsp;the&nbsp;performance&nbsp;of&nbsp;refreshing&nbsp;the&nbsp;markers&nbsp;quickly.&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;refresh&nbsp;the&nbsp;map&nbsp;using&nbsp;.NET&nbsp;Timer&nbsp;control,&nbsp;in&nbsp;another&nbsp;word,&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;write&nbsp;refreshing&nbsp;map&nbsp;code&nbsp;on&nbsp;the&nbsp;server&nbsp;side&nbsp;not&nbsp;JavaScript,&nbsp;you&nbsp;can&nbsp;choose&nbsp;using&nbsp;the&nbsp;first&nbsp;sample&nbsp;which&nbsp;is&nbsp;less&nbsp;performance&nbsp;that&nbsp;the&nbsp;second&nbsp;sample&nbsp;but&nbsp;easy&nbsp;to&nbsp;implement.  
  
  
  
Also&nbsp;you&nbsp;can&nbsp;implement&nbsp;using&nbsp;client&nbsp;scripts&nbsp;which&nbsp;will&nbsp;take&nbsp;you&nbsp;more&nbsp;performance.&nbsp;Here&nbsp;is&nbsp;another&nbsp;post&nbsp;which&nbsp;may&nbsp;give&nbsp;you&nbsp;more&nbsp;suggestions.  
  
[gis.thinkgeo.com/Support/Dis....aspx#8323](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5675/afv/topic/afpgj/1/Default.aspx#8323)  
  
  
  
If&nbsp;you&nbsp;have&nbsp;any&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.  
  
  
  
Thanks,  
  
Howard  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 5, 2009, 6:16pm UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/3 "2009-08-05T18:16:02Z")

</div>

Thanks&nbsp;for&nbsp;the&nbsp;info&nbsp;Howard!&nbsp;&nbsp;&nbsp;I&nbsp;moved&nbsp;the&nbsp;map&nbsp;control&nbsp;out&nbsp;of&nbsp;the&nbsp;UpdatePanel&nbsp;now&nbsp;but,&nbsp;as&nbsp;I&nbsp;feared,&nbsp;it&nbsp;is&nbsp;now&nbsp;posting&nbsp;back&nbsp;every&nbsp;time&nbsp;I&nbsp;move&nbsp;the&nbsp;map&nbsp;around&nbsp;or&nbsp;when&nbsp;I&nbsp;zoom&nbsp;in&nbsp;and&nbsp;out.&nbsp;&nbsp;How&nbsp;can&nbsp;I&nbsp;prevent&nbsp;this?&nbsp;&nbsp;I&nbsp;have&nbsp;looked&nbsp;at&nbsp;code-behind&nbsp;as&nbsp;well&nbsp;as&nbsp;the&nbsp;properties&nbsp;of&nbsp;the&nbsp;map&nbsp;control&nbsp;and&nbsp;the&nbsp;form&nbsp;containing&nbsp;it,&nbsp;and&nbsp;also,&nbsp;web.config.&nbsp;&nbsp;Nothing&nbsp;stands&nbsp;out&nbsp;at&nbsp;me&nbsp;for&nbsp;preventing&nbsp;postback

Also,&nbsp;when&nbsp;I&nbsp;use&nbsp;google&nbsp;map&nbsp;instead&nbsp;of&nbsp;the&nbsp;base&nbsp;one&nbsp;in&nbsp;the&nbsp;example,&nbsp;the&nbsp;marker&nbsp;moves&nbsp;very&nbsp;little&nbsp;and&nbsp;the&nbsp;bounding&nbsp;box&nbsp;seems&nbsp;to&nbsp;have&nbsp;shrinked&nbsp;by&nbsp;orders&nbsp;of&nbsp;magnitude&nbsp;and&nbsp;is&nbsp;just&nbsp;off&nbsp;the&nbsp;coast&nbsp;of&nbsp;Aftica.&nbsp;&nbsp;Why&nbsp;is&nbsp;that?&nbsp;&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;use&nbsp;google&nbsp;as&nbsp;the&nbsp;base&nbsp;map&nbsp;in&nbsp;my&nbsp;case.&nbsp;&nbsp;The&nbsp;current&nbsp;code&nbsp;I&nbsp;am&nbsp;using&nbsp;is&nbsp;below.

Thanks&nbsp;in&nbsp;advance&nbsp;for&nbsp;any&nbsp;insight!  
  
Bob

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;Protected&nbsp;Sub&nbsp;Page\_Load(ByVal&nbsp;sender&nbsp;As&nbsp;Object,&nbsp;ByVal&nbsp;e&nbsp;As&nbsp;System.EventArgs)&nbsp;Handles&nbsp;Me.Load

&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bRes&nbsp;As&nbsp;Boolean&nbsp;=&nbsp;My.Computer.Network.IsAvailable  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;Not&nbsp;IsPostback&nbsp;Then  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;bRes&nbsp;Then  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.MapBackground.BackgroundBrush&nbsp;=&nbsp;New&nbsp;GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CurrentExtent&nbsp;=&nbsp;New&nbsp;RectangleShape(-132,&nbsp;40,&nbsp;-76,&nbsp;16.91)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.MapUnit&nbsp;=&nbsp;GeographyUnit.DecimalDegree  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;tgMap.CurrentExtent&nbsp;=&nbsp;New&nbsp;RectangleShape(-13939426.6371,&nbsp;6701997.4056,&nbsp;-7812401.86,&nbsp;2626987.386962)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;tgMap.MapUnit&nbsp;=&nbsp;GeographyUnit.Meter  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;tgMap.MapTools.OverlaySwitcher.Enabled&nbsp;=&nbsp;True  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.MapTools.MouseCoordinate.Enabled&nbsp;=&nbsp;True  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;google&nbsp;As&nbsp;New&nbsp;GoogleOverlay("Google&nbsp;Map")  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;google.JavaScriptLibraryUri&nbsp;=&nbsp;New&nbsp;Uri(ConfigurationManager.AppSettings("GoogleUri"))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;google.GoogleMapType&nbsp;=&nbsp;GoogleMapType.Normal  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CustomOverlays.Add(google)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;markerOverlay&nbsp;As&nbsp;New&nbsp;InMemoryMarkerOverlay("MarkerOverlay")  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage&nbsp;=&nbsp;New&nbsp;WebImage("theme/default/img/marker\_blue.gif",&nbsp;21,&nbsp;25)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Features.Add("TrackMarker",&nbsp;New&nbsp;Feature(-123,&nbsp;40))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CustomOverlays.Add(markerOverlay)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If

End&nbsp;Sub

&nbsp;

Function&nbsp;UpdateMapIcons()&nbsp;As&nbsp;Boolean  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;markerOverlay&nbsp;As&nbsp;InMemoryMarkerOverlay&nbsp;=&nbsp;New&nbsp;InMemoryMarkerOverlay("MarkerOverlay")  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage&nbsp;=&nbsp;\_  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New&nbsp;WebImage("theme/default/img/marker\_blue.gif",&nbsp;21,&nbsp;25,&nbsp;-10.5F,&nbsp;-25.0F)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Features.Add("TrackMarker",&nbsp;New&nbsp;Feature(-80,&nbsp;43.42))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;markerOverlay.Features.Add("TrackMarker2",&nbsp;New&nbsp;Feature(-90,&nbsp;43.42))  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tgMap.CustomOverlays.Add(markerOverlay)  
  
  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;tgMap.MapBackground.BackgroundBrush&nbsp;=&nbsp;New&nbsp;GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;tgMap.CurrentExtent&nbsp;=&nbsp;New&nbsp;RectangleShape(-131.22,&nbsp;55.05,&nbsp;-54.03,&nbsp;16.91)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;tgMap.MapUnit&nbsp;=&nbsp;GeographyUnit.DecimalDegree  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;Dim&nbsp;worldLayer&nbsp;As&nbsp;New&nbsp;ShapeFileFeatureLayer(MapPath("~/SampleData/world/cntry02.shp"))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle&nbsp;=&nbsp;AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(255,&nbsp;243,&nbsp;239,&nbsp;228),&nbsp;GeoColor.FromArgb(255,&nbsp;218,&nbsp;193,&nbsp;163),&nbsp;1)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level20  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;Protected&nbsp;Sub&nbsp;Timer1\_Tick(ByVal&nbsp;sender&nbsp;As&nbsp;Object,&nbsp;ByVal&nbsp;e&nbsp;As&nbsp;EventArgs)  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UpdateTrackShape()  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Sub  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [August 6, 2009, 10:00am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/4 "2009-08-06T10:00:33Z")

</div>

Hi&nbsp;Bob,  
  
  
  
First&nbsp;of&nbsp;all,&nbsp;I&nbsp;want&nbsp;to&nbsp;confirm&nbsp;what’s&nbsp;the&nbsp;version&nbsp;of&nbsp;web&nbsp;edition&nbsp;are&nbsp;you&nbsp;using?&nbsp;The&nbsp;following&nbsp;code&nbsp;helps&nbsp;you&nbsp;find&nbsp;the&nbsp;correct&nbsp;version&nbsp;of&nbsp;our&nbsp;product.&nbsp;Please&nbsp;let&nbsp;me&nbsp;know.  
  
`String version = Map.Version;`  
  
  
I’m&nbsp;a&nbsp;little&nbsp;confused&nbsp;that&nbsp;how&nbsp;do&nbsp;you&nbsp;navigate&nbsp;your&nbsp;map?&nbsp;Is&nbsp;there&nbsp;some&nbsp;buttons&nbsp;for&nbsp;panning&nbsp;while&nbsp;some&nbsp;buttons&nbsp;for&nbsp;zooming?&nbsp;Map&nbsp;control&nbsp;supports&nbsp;client&nbsp;panning&nbsp;and&nbsp;zooming,&nbsp;so&nbsp;it&nbsp;won’t&nbsp;raise&nbsp;post&nbsp;back.&nbsp;Hope&nbsp;there&nbsp;is&nbsp;no&nbsp;misunderstanding.  
  
  
  
Also,&nbsp;when&nbsp;you&nbsp;use&nbsp;GoogleOverlay,&nbsp;you&nbsp;need&nbsp;to&nbsp;set&nbsp;the&nbsp;map&nbsp;unit&nbsp;as&nbsp;GeographyUnit.Meter;&nbsp;and&nbsp;if&nbsp;the&nbsp;features&nbsp;which&nbsp;will&nbsp;be&nbsp;added&nbsp;into&nbsp;the&nbsp;MarkerOverlay&nbsp;are&nbsp;in&nbsp;DecimalDegree,&nbsp;you&nbsp;need&nbsp;to&nbsp;set&nbsp;the&nbsp;projection&nbsp;for&nbsp;the&nbsp;feature&nbsp;source&nbsp;of&nbsp;the&nbsp;marker&nbsp;overlay.&nbsp;Otherwise&nbsp;the&nbsp;markser&nbsp;will&nbsp;be&nbsp;added&nbsp;in&nbsp;to&nbsp;the&nbsp;map&nbsp;in&nbsp;decimal&nbsp;degree.&nbsp;That’s&nbsp;incorrect.  
  
  
  
Here&nbsp;is&nbsp;an&nbsp;online&nbsp;sample&nbsp;for&nbsp;adding&nbsp;markers&nbsp;on&nbsp;GoogleMap.  
  
[websamples.thinkgeo.com/webe...rkers.aspx](http://websamples.thinkgeo.com/webeditionsamples/Samples/Markers/AddProjectedMarkers.aspx)  
  
  
  
This&nbsp;is&nbsp;all&nbsp;I&nbsp;found&nbsp;in&nbsp;your&nbsp;code;&nbsp;if&nbsp;possible,&nbsp;please&nbsp;send&nbsp;us&nbsp;your&nbsp;quick&nbsp;sample&nbsp;and&nbsp;provide&nbsp;us&nbsp;more&nbsp;information.&nbsp;If&nbsp;your&nbsp;code&nbsp;is&nbsp;not&nbsp;public,&nbsp;please&nbsp;send&nbsp;to&nbsp;support@thinkgeo.com&nbsp;and&nbsp;ask&nbsp;to&nbsp;forward&nbsp;to&nbsp;me.  
  
  
  
If&nbsp;you&nbsp;have&nbsp;any&nbsp;queries&nbsp;please&nbsp;let&nbsp;me&nbsp;know.  
  
  
  
Thanks,  
  
Howard  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 6, 2009, 11:10am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/5 "2009-08-06T11:10:12Z")

</div>

Hi&nbsp;Howard,

The&nbsp;version&nbsp;string&nbsp;reports&nbsp;as&nbsp;follows:

"MapSuiteCore:3.1.16;WebEdition:3.1.16"

Now,&nbsp;I&nbsp;have&nbsp;done&nbsp;a&nbsp;little&nbsp;digging&nbsp;this&nbsp;morning&nbsp;and&nbsp;found&nbsp;that&nbsp;if&nbsp;I&nbsp;add&nbsp;a&nbsp;map&nbsp;to&nbsp;a&nbsp;brand&nbsp;new&nbsp;page,  
  
it&nbsp;does&nbsp;NOT&nbsp;postback&nbsp;at&nbsp;all&nbsp;when&nbsp;simply&nbsp;moving&nbsp;the&nbsp;map&nbsp;around&nbsp;or&nbsp;zooming/unzooming&nbsp;in.&nbsp;&nbsp;I&nbsp;also  
  
added&nbsp;a&nbsp;brand&nbsp;new&nbsp;map&nbsp;object&nbsp;to&nbsp;my&nbsp;original&nbsp;default.aspx&nbsp;page&nbsp;and&nbsp;it&nbsp;also&nbsp;does&nbsp;not&nbsp;postback  
  
when&nbsp;moving&nbsp;or&nbsp;zooming&nbsp;the&nbsp;map.&nbsp;&nbsp;Only&nbsp;the&nbsp;one&nbsp;where&nbsp;I&nbsp;have&nbsp;the&nbsp;moving&nbsp;marker.&nbsp;&nbsp;If&nbsp;this&nbsp;doesn't  
  
give&nbsp;you&nbsp;enough&nbsp;then&nbsp;I&nbsp;will&nbsp;have&nbsp;to&nbsp;send&nbsp;the&nbsp;code&nbsp;to&nbsp;you&nbsp;over&nbsp;the&nbsp;support&nbsp;email.&nbsp;&nbsp;I've&nbsp;looked&nbsp;all&nbsp;over  
  
for&nbsp;any&nbsp;postback&nbsp;specific&nbsp;settings&nbsp;and&nbsp;just&nbsp;cannot&nbsp;figure&nbsp;out&nbsp;why&nbsp;it&nbsp;is&nbsp;posting&nbsp;back.&nbsp;&nbsp;Given&nbsp;the&nbsp;evidence,  
  
it&nbsp;appears&nbsp;to&nbsp;be&nbsp;something&nbsp;to&nbsp;do&nbsp;with&nbsp;the&nbsp;tgMap&nbsp;object&nbsp;specifically&nbsp;since&nbsp;the&nbsp;other&nbsp;map&nbsp;did&nbsp;not  
  
exhibit&nbsp;this&nbsp;behaviour.&nbsp;Just&nbsp;for&nbsp;reference,&nbsp;I&nbsp;have&nbsp;also&nbsp;tried&nbsp;replacing&nbsp;the&nbsp;tgMap&nbsp;control&nbsp;by&nbsp;deleting&nbsp;both  
  
it&nbsp;and&nbsp;the&nbsp;associated&nbsp;scriptmanager&nbsp;control&nbsp;and&nbsp;then&nbsp;re-adding&nbsp;it.&nbsp;&nbsp;It&nbsp;still&nbsp;postsback&nbsp;if&nbsp;I&nbsp;give&nbsp;it&nbsp;the  
  
name&nbsp;"tgMap".&nbsp;&nbsp;Any&nbsp;ideas?

&nbsp;

Bob

&nbsp;

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 6, 2009, 11:13am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/6 "2009-08-06T11:13:00Z")

</div>

Also,&nbsp;just&nbsp;a&nbsp;note&nbsp;for&nbsp;all&nbsp;of&nbsp;you,&nbsp;that&nbsp;I&nbsp;have&nbsp;noticed&nbsp;some&nbsp;oddities&nbsp;when&nbsp;re-compiling&nbsp;that&nbsp;sometimes&nbsp;the&nbsp;built-in&nbsp;page&nbsp;server&nbsp;in&nbsp;.NET&nbsp;seems&nbsp;to&nbsp;be&nbsp;pulling&nbsp;cached&nbsp;copies&nbsp;of&nbsp;previous&nbsp;versions&nbsp;of&nbsp;pages&nbsp;and&nbsp;serving&nbsp;those&nbsp;instead&nbsp;of&nbsp;the&nbsp;current&nbsp;compiled&nbsp;version!&nbsp;&nbsp;I&nbsp;find&nbsp;that&nbsp;sometimes&nbsp;I&nbsp;have&nbsp;to&nbsp;delete&nbsp;all&nbsp;cookies&nbsp;and&nbsp;temp&nbsp;files&nbsp;in&nbsp;IE&nbsp;every&nbsp;once&nbsp;in&nbsp;awhile&nbsp;for&nbsp;the&nbsp;new&nbsp;compiled&nbsp;page&nbsp;to&nbsp;be&nbsp;served.&nbsp;

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [August 6, 2009, 11:25am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/7 "2009-08-06T11:25:13Z")

</div>

Bob,&nbsp;  
&nbsp;&nbsp;  
&nbsp;The&nbsp;version&nbsp;you&nbsp;are&nbsp;using&nbsp;is&nbsp;a&nbsp;little&nbsp;old.&nbsp;Currently,&nbsp;our&nbsp;public&nbsp;release&nbsp;is&nbsp;3.1.182.&nbsp;It&nbsp;fixed&nbsp;many&nbsp;bugs&nbsp;and&nbsp;added&nbsp;some&nbsp;new&nbsp;features.&nbsp;Please&nbsp;download&nbsp;the&nbsp;latest&nbsp;version&nbsp;and&nbsp;see&nbsp;if&nbsp;the&nbsp;issue&nbsp;still&nbsp;exists.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Also,&nbsp;in&nbsp;the&nbsp;sample,&nbsp;we&nbsp;have&nbsp;an&nbsp;UpdatePanel&nbsp;containing&nbsp;the&nbsp;timer;&nbsp;please&nbsp;see&nbsp;if&nbsp;this&nbsp;is&nbsp;the&nbsp;difference.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Looking&nbsp;forward&nbsp;your&nbsp;code.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Howard

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 6, 2009, 11:33am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/8 "2009-08-06T11:33:33Z")

</div>

I&nbsp;will&nbsp;try&nbsp;the&nbsp;update&nbsp;but&nbsp;have&nbsp;my&nbsp;doubts&nbsp;it&nbsp;will&nbsp;fix&nbsp;it&nbsp;due&nbsp;to&nbsp;the&nbsp;various&nbsp;results&nbsp;of&nbsp;the&nbsp;tests&nbsp;I’ve&nbsp;outlined&nbsp;above.&nbsp;&nbsp;The&nbsp;only&nbsp;thing&nbsp;that&nbsp;I&nbsp;can&nbsp;see&nbsp;that&nbsp;is&nbsp;different&nbsp;between&nbsp;a&nbsp;normal&nbsp;page&nbsp;and&nbsp;the&nbsp;one&nbsp;I&nbsp;am&nbsp;using&nbsp;is&nbsp;the&nbsp;fact&nbsp;that&nbsp;my&nbsp;page&nbsp;references&nbsp;the&nbsp;ajaxcontroltoolkit&nbsp;as&nbsp;I&nbsp;have&nbsp;some&nbsp;extenders&nbsp;applied&nbsp;to&nbsp;various&nbsp;controls&nbsp;on&nbsp;the&nbsp;form.&nbsp;&nbsp;I&nbsp;will&nbsp;send&nbsp;the&nbsp;code&nbsp;shortly.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Tx&nbsp;again!&nbsp;  
&nbsp;Bob&nbsp;

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 6, 2009, 11:35am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/9 "2009-08-06T11:35:53Z")

</div>

Oh!&nbsp;&nbsp;forgot&nbsp;to&nbsp;mention&nbsp;too&nbsp;in&nbsp;my&nbsp;last&nbsp;reply&nbsp;that&nbsp;the&nbsp;timer&nbsp;is&nbsp;in&nbsp;an&nbsp;updatepanel&nbsp;and&nbsp;updates&nbsp;without&nbsp;a&nbsp;postback.&nbsp;&nbsp;It&nbsp;is&nbsp;just&nbsp;when&nbsp;I&nbsp;physically&nbsp;move&nbsp;things&nbsp;around&nbsp;on&nbsp;tgMap&nbsp;where&nbsp;I&nbsp;experience&nbsp;the&nbsp;postback.&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [August 6, 2009, 11:42am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/10 "2009-08-06T11:42:19Z")

</div>

Bob,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;guess&nbsp;this&nbsp;may&nbsp;caused&nbsp;by&nbsp;some&nbsp;JavaScript&nbsp;issue&nbsp;which&nbsp;raises&nbsp;the&nbsp;postback&nbsp;event&nbsp;by&nbsp;mistake.&nbsp;I’ll&nbsp;check&nbsp;it&nbsp;when&nbsp;I&nbsp;get&nbsp;your&nbsp;code.&nbsp;Also,&nbsp;you&nbsp;can&nbsp;upgrade&nbsp;the&nbsp;application&nbsp;to&nbsp;our&nbsp;latest&nbsp;version.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Howard

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [August 6, 2009, 2:02pm UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/11 "2009-08-06T14:02:28Z")

</div>

Bob,  
  
  
  
I&nbsp;found&nbsp;something&nbsp;in&nbsp;your&nbsp;code.&nbsp;Please&nbsp;see&nbsp;the&nbsp;code&nbsp;which&nbsp;I&nbsp;copied&nbsp;from&nbsp;your&nbsp;solution:  
`Protected Sub tgMap_ExtentChanged(ByVal sender As Object, ByVal e As ThinkGeo.MapSuite.WebEdition.ExtentChangedEventArgs) Handles tgMap.ExtentChanged        'Stop        Dim Cent As PointShape        Cent = tgMap.CurrentExtent.GetCenterPoint()        Session("X") = Cent.X        Session("Y") = Cent.Y        Dim dZoom As Double = GetZoomLevel(tgMap)End Sub`  
  
  
This&nbsp;code&nbsp;hook&nbsp;an&nbsp;event&nbsp;handler&nbsp;to&nbsp;map's&nbsp;ExtentChanged&nbsp;event.&nbsp;It's&nbsp;a&nbsp;server&nbsp;event&nbsp;in&nbsp;our&nbsp;product&nbsp;which&nbsp;rises&nbsp;whenever&nbsp;extent&nbsp;changed;&nbsp;in&nbsp;your&nbsp;app,&nbsp;when&nbsp;you&nbsp;zooming&nbsp;and&nbsp;panning,&nbsp;it&nbsp;causes&nbsp;the&nbsp;extent&nbsp;changes&nbsp;so&nbsp;that&nbsp;it&nbsp;posts&nbsp;back&nbsp;and&nbsp;rises&nbsp;the&nbsp;tgMap\_ExtentChanged&nbsp;event;&nbsp;it&nbsp;will&nbsp;be&nbsp;fine&nbsp;if&nbsp;you&nbsp;delete&nbsp;this&nbsp;event.&nbsp;Also&nbsp;you&nbsp;can&nbsp;use&nbsp;our&nbsp;client&nbsp;API&nbsp;to&nbsp;get&nbsp;the&nbsp;center&nbsp;x&nbsp;and&nbsp;y&nbsp;instead.  
  
  
  
If&nbsp;you&nbsp;have&nbsp;any&nbsp;questions&nbsp;please&nbsp;let&nbsp;me&nbsp;know.  
  
  
  
Thanks,  
  
Howard

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 7, 2009, 9:14am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/12 "2009-08-07T09:14:19Z")

</div>

Thanks&nbsp;Howard!&nbsp;&nbsp;That&nbsp;did&nbsp;it!&nbsp;&nbsp;Wow.&nbsp;&nbsp;I&nbsp;should&nbsp;have&nbsp;seen&nbsp;that&nbsp;one!&nbsp;&nbsp;Anyway,&nbsp;are&nbsp;there&nbsp;any&nbsp;examples&nbsp;out&nbsp;there&nbsp;you&nbsp;could&nbsp;point&nbsp;me&nbsp;to&nbsp;on&nbsp;how&nbsp;to&nbsp;use&nbsp;the&nbsp;APIs?&nbsp;&nbsp;The&nbsp;API&nbsp;docs&nbsp;strictly&nbsp;have&nbsp;the&nbsp;definitions&nbsp;of&nbsp;all&nbsp;the&nbsp;API's.&nbsp;&nbsp;I&nbsp;&nbsp;was&nbsp;keeping&nbsp;track&nbsp;of&nbsp;the&nbsp;current&nbsp;extent&nbsp;of&nbsp;the&nbsp;map&nbsp;before&nbsp;because,&nbsp;after&nbsp;clicking&nbsp;save&nbsp;on&nbsp;a&nbsp;setup&nbsp;form&nbsp;I&nbsp;have,&nbsp;it&nbsp;would&nbsp;postback&nbsp;(as&nbsp;it&nbsp;should)&nbsp;and&nbsp;proceed&nbsp;to&nbsp;change&nbsp;the&nbsp;map&nbsp;extent&nbsp;back&nbsp;to&nbsp;its&nbsp;startup&nbsp;default.&nbsp;&nbsp;It&nbsp;doesn't&nbsp;seem&nbsp;to&nbsp;do&nbsp;that&nbsp;now&nbsp;however.  
  
  
  
Tx&nbsp;a&nbsp;million!  
  
Bob

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 7, 2009, 9:37am UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/13 "2009-08-07T09:37:19Z")

</div>

Oh!&nbsp;&nbsp;I&nbsp;also&nbsp;forgot&nbsp;to&nbsp;ask:&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;mentioned&nbsp;that&nbsp;with&nbsp;google&nbsp;maps,&nbsp;I&nbsp;have&nbsp;to&nbsp;convert&nbsp;use&nbsp;meters&nbsp;for&nbsp;the&nbsp;coordinate&nbsp;system.&nbsp;&nbsp;Are&nbsp;there&nbsp;examples&nbsp;of&nbsp;how&nbsp;I&nbsp;can&nbsp;convert&nbsp;coordinates&nbsp;to&nbsp;meters?&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Also,&nbsp;how&nbsp;specify&nbsp;a&nbsp;different&nbsp;image&nbsp;for&nbsp;every&nbsp;unit&nbsp;I&nbsp;want&nbsp;to&nbsp;display&nbsp;on&nbsp;the&nbsp;map&nbsp;like&nbsp;simplemarker&nbsp;object&nbsp;does&nbsp;with&nbsp;the&nbsp;code&nbsp;above&nbsp;(instead&nbsp;of&nbsp;applying&nbsp;a&nbsp;default&nbsp;icon&nbsp;to&nbsp;every&nbsp;unit)?&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![va3wxw](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@va3wxw](https://community.thinkgeo.com/u/va3wxw)\
**Post date:** [August 7, 2009, 8:51pm UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/14 "2009-08-07T20:51:17Z")

</div>

Just&nbsp;for&nbsp;completeness&nbsp;sake,&nbsp;there&nbsp;was&nbsp;a&nbsp;post&nbsp;at&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;web&nbsp;forums&nbsp;showing&nbsp;examples&nbsp;of&nbsp;how&nbsp;to&nbsp;use&nbsp;the&nbsp;API&nbsp;here:&nbsp;  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5616/afv/topic/Default.aspx)&nbsp;  
  
  
  
I&nbsp;also&nbsp;found&nbsp;a&nbsp;code&nbsp;example&nbsp;for&nbsp;populating&nbsp;a&nbsp;google&nbsp;map&nbsp;that&nbsp;included&nbsp;conversion&nbsp;of&nbsp;the&nbsp;lat&nbsp;&&nbsp;lon&nbsp;output&nbsp;by&nbsp;most&nbsp;GPS'&nbsp;to&nbsp;meters.&nbsp;  
  
This&nbsp;example&nbsp;does&nbsp;that&nbsp;here:&nbsp;

[gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5456/afv/topic/Default.aspx&nbsp;](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5456/afv/topic/Default.aspx)  
  
  
  
I&nbsp;am&nbsp;still&nbsp;looking&nbsp;for&nbsp;a&nbsp;way&nbsp;to&nbsp;change&nbsp;the&nbsp;markers&nbsp;for&nbsp;each&nbsp;marker&nbsp;I&nbsp;may&nbsp;decide&nbsp;to&nbsp;plot&nbsp;on&nbsp;a&nbsp;map&nbsp;(users&nbsp;can&nbsp;select&nbsp;what&nbsp;  
  
units&nbsp;display&nbsp;which&nbsp;icon&nbsp;and&nbsp;they&nbsp;have&nbsp;hundreds&nbsp;to&nbsp;choose&nbsp;from).&nbsp;&nbsp;But&nbsp;will&nbsp;post&nbsp;the&nbsp;code&nbsp;once&nbsp;I've&nbsp;found&nbsp;it&nbsp;or&nbsp;someone&nbsp;  
  
posts&nbsp;it&nbsp;here.&nbsp;  
  
  
  
Thanks&nbsp;again&nbsp;for&nbsp;all&nbsp;the&nbsp;help&nbsp;Howard!!&nbsp;You&nbsp;really&nbsp;helped&nbsp;me&nbsp;out!!&nbsp;  
  
  
  
Cheers,&nbsp;  
  
Bob

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [August 11, 2009, 4:06pm UTC](https://community.thinkgeo.com/t/unable-to-refresh-map-with-markers-after-adding-them-to-map/4917/15 "2009-08-11T16:06:31Z")

</div>

Bob,

You&nbsp;are&nbsp;welcome.

First&nbsp;of&nbsp;all,&nbsp;the&nbsp;API&nbsp;you&nbsp;posted&nbsp;is&nbsp;our&nbsp;client&nbsp;APIs.&nbsp;As&nbsp;you&nbsp;know,&nbsp;our&nbsp;Web&nbsp;Edition&nbsp;is&nbsp;a&nbsp;normal&nbsp;web&nbsp;control&nbsp;which&nbsp;cans&nbsp;easily&nbsp;config&nbsp;by&nbsp;the&nbsp;server&nbsp;code.&nbsp;Normally,&nbsp;people&nbsp;like&nbsp;this&nbsp;way&nbsp;and&nbsp;if&nbsp;they&nbsp;use&nbsp;UpdatePanel&nbsp;with&nbsp;our&nbsp;control,&nbsp;it’ll&nbsp;be&nbsp;synchronize&nbsp;update.

But&nbsp;some&nbsp;advanced&nbsp;user&nbsp;like&nbsp;you&nbsp;doesn’t&nbsp;like&nbsp;post&nbsp;back;&nbsp;they&nbsp;get&nbsp;rid&nbsp;of&nbsp;using&nbsp;UpdatePanel&nbsp;and&nbsp;use&nbsp;JavaScript&nbsp;or&nbsp;call&nbsp;back&nbsp;technolege&nbsp;instead&nbsp;to&nbsp;gain&nbsp;higher&nbsp;performance.&nbsp;Our&nbsp;control&nbsp;accepts&nbsp;this&nbsp;way&nbsp;too.

In&nbsp;web&nbsp;edition,&nbsp;we&nbsp;wrap&nbsp;OpenLayers&nbsp;library&nbsp;and&nbsp;our&nbsp;client&nbsp;APIs&nbsp;are&nbsp;some&nbsp;easy&nbsp;ways&nbsp;to&nbsp;find&nbsp;the&nbsp;OpenLayers&nbsp;object&nbsp;we&nbsp;are&nbsp;using.&nbsp;&nbsp;In&nbsp;another&nbsp;word,&nbsp;you&nbsp;can&nbsp;choose&nbsp;using&nbsp;our&nbsp;APIs&nbsp;or&nbsp;using&nbsp;OpenLayers&nbsp;APIs&nbsp;directly.

In&nbsp;our&nbsp;forum,&nbsp;there&nbsp;are&nbsp;a&nbsp;lot&nbsp;of&nbsp;existing&nbsp;sample&nbsp;using&nbsp;Client&nbsp;APIs&nbsp;but&nbsp;we&nbsp;don’t&nbsp;have&nbsp;any&nbsp;regular&nbsp;article&nbsp;for&nbsp;it.&nbsp;Sorry&nbsp;for&nbsp;the&nbsp;inconvenience.&nbsp;Please&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;queries&nbsp;about&nbsp;it.

For&nbsp;the&nbsp;projection&nbsp;issue.&nbsp;You&nbsp;can&nbsp;find&nbsp;an&nbsp;online&nbsp;sample&nbsp;at:  
  
[websamples.thinkgeo.com/webeditionsamples/](http://websamples.thinkgeo.com/webeditionsamples/)

The&nbsp;sample&nbsp;you&nbsp;need&nbsp;is&nbsp;under&nbsp;Samples/Markers/Add&nbsp;Projected&nbsp;Markers&nbsp;which&nbsp;you&nbsp;can&nbsp;check&nbsp;the&nbsp;source&nbsp;code.

See&nbsp;these&nbsp;lines&nbsp;of&nbsp;code&nbsp;which&nbsp;automatically&nbsp;projects&nbsp;the&nbsp;shapes&nbsp;from&nbsp;decimal&nbsp;degree&nbsp;to&nbsp;meters.&nbsp;If&nbsp;it’s&nbsp;null,&nbsp;it&nbsp;doesn’t&nbsp;project&nbsp;at&nbsp;all&nbsp;but&nbsp;keep&nbsp;its&nbsp;original&nbsp;shapes&nbsp;in&nbsp;decimal&nbsp;degree.  
  
`Proj4Projection proj4 = new Proj4Projection();  proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);  proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString(); markerOverlay.FeatureSource.Projection = proj4;`

Hope&nbsp;it&nbsp;helps.&nbsp;Please&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;more&nbsp;questions.

Thanks,  
  
Howard
