# Adding client-side markers: JS bug

**URL:** <https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326>\
**Category:** WebForms\
**Created:** [May 21, 2010, 5:12am UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326 "2010-05-21T05:12:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janet](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/5e9695/32.png) [@Janet](https://community.thinkgeo.com/u/Janet)\
**Post date:** [May 21, 2010, 5:12am UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/1 "2010-05-21T05:12:02Z")

</div>

I&nbsp;was&nbsp;investigating&nbsp;the&nbsp;adding&nbsp;of&nbsp;markers&nbsp;on&nbsp;the&nbsp;map&nbsp;through&nbsp;Javascript,&nbsp;and&nbsp;found&nbsp;a&nbsp;topic&nbsp;on&nbsp;the&nbsp;forums&nbsp;that&nbsp;offered&nbsp;code&nbsp;to&nbsp;do&nbsp;it:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;markerUrl&nbsp;=&nbsp;"Images/marker\_blue.gif";  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;markerWidth&nbsp;=&nbsp;21;  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;markerHeight&nbsp;=&nbsp;25;  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;markerOffsetX&nbsp;=&nbsp;-10.5;  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;markerOffsetY&nbsp;=&nbsp;-25;  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;OnMapCreating&nbsp;=&nbsp;function&nbsp;(map)&nbsp;{  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OpenLayers.Layer.Vector&nbsp;=&nbsp;OpenLayers.Class(OpenLayers.Layer.Vector,&nbsp;{  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onFeatureInsert:&nbsp;function&nbsp;(feature)&nbsp;{  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;markerLayer&nbsp;=&nbsp;map.getLayer('SomeMarkers');  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;size&nbsp;=&nbsp;new&nbsp;OpenLayers.Size(markerWidth,&nbsp;markerHeight);  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;offset&nbsp;=&nbsp;new&nbsp;OpenLayers.Pixel(markerOffsetX,&nbsp;markerOffsetY);  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;icon&nbsp;=&nbsp;new&nbsp;OpenLayers.Icon(markerUrl,&nbsp;size,&nbsp;offset);  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;marker&nbsp;=&nbsp;new&nbsp;OpenLayers.Marker(feature.geometry.bounds.getCenterLonLat(),&nbsp;icon.clone());  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;marker.id&nbsp;=&nbsp;new&nbsp;Date().toTimeString();  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//markerLayer.addMarker(marker);  
  
&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;&nbsp;};

This&nbsp;is&nbsp;used&nbsp;in&nbsp;combo&nbsp;with&nbsp;"Map1.SetDrawMode('Point')".&nbsp;Now,&nbsp;this&nbsp;works...almost.

I&nbsp;was&nbsp;getting&nbsp;a&nbsp;syntax&nbsp;error,&nbsp;which&nbsp;I&nbsp;finally&nbsp;tracked&nbsp;down&nbsp;to&nbsp;the&nbsp;"AddMarkersByAjax"&nbsp;method,&nbsp;in&nbsp;helper\_geoResource.axd.&nbsp;The&nbsp;first&nbsp;line&nbsp;of&nbsp;that&nbsp;method&nbsp;reads:

**var&nbsp;markerOverlays&nbsp;=&nbsp;eval('('&nbsp;+&nbsp;json&nbsp;+&nbsp;')');**

Assuming&nbsp;this&nbsp;was&nbsp;trying&nbsp;to&nbsp;parse&nbsp;the&nbsp;JSON&nbsp;object&nbsp;that&nbsp;holds&nbsp;the&nbsp;list&nbsp;of&nbsp;overlays,&nbsp;I&nbsp;corrected&nbsp;this&nbsp;to&nbsp;the&nbsp;follow:

**var&nbsp;markerOverlays&nbsp;=&nbsp;eval('['&nbsp;+&nbsp;json&nbsp;+&nbsp;']');**

This&nbsp;solved&nbsp;the&nbsp;syntax&nbsp;error,&nbsp;and&nbsp;clicking&nbsp;on&nbsp;the&nbsp;map&nbsp;now&nbsp;adds&nbsp;my&nbsp;image&nbsp;as&nbsp;a&nbsp;marker,&nbsp;as&nbsp;expected.&nbsp;Could&nbsp;this&nbsp;be&nbsp;fixed&nbsp;in&nbsp;the&nbsp;daily&nbsp;build?&nbsp;I&nbsp;have&nbsp;an&nbsp;overwritten&nbsp;version&nbsp;of&nbsp;that&nbsp;method&nbsp;in&nbsp;my&nbsp;code&nbsp;right&nbsp;now,&nbsp;but&nbsp;obviously&nbsp;I'd&nbsp;prefer&nbsp;to&nbsp;remove&nbsp;it.

---

<div class="post-metadata">

**Author:** ![Khalil](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Khalil](https://community.thinkgeo.com/u/Khalil)\
**Post date:** [May 23, 2010, 9:49pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/2 "2010-05-23T21:49:52Z")

</div>

Janet,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;not&nbsp;sure&nbsp;whether&nbsp;the&nbsp;error&nbsp;exists.&nbsp;We&nbsp;have&nbsp;tested&nbsp;it&nbsp;and&nbsp;it&nbsp;works&nbsp;well.&nbsp;&nbsp;  
&nbsp;Also&nbsp;there&nbsp;is&nbsp;no&nbsp;need&nbsp;to&nbsp;override&nbsp;the&nbsp;onFeatureInsert&nbsp;method&nbsp;if&nbsp;you&nbsp;just&nbsp;want&nbsp;to&nbsp;add&nbsp;markers&nbsp;on&nbsp;map&nbsp;through&nbsp;JavaScript.&nbsp;I&nbsp;guess&nbsp;that&nbsp;the&nbsp;offered&nbsp;code&nbsp;is&nbsp;just&nbsp;suited&nbsp;to&nbsp;some&nbsp;special&nbsp;conditions&nbsp;for&nbsp;some&nbsp;users.&nbsp;Please&nbsp;provide&nbsp;us&nbsp;with&nbsp;the&nbsp;scenario&nbsp;for&nbsp;you.&nbsp;So&nbsp;we&nbsp;could&nbsp;give&nbsp;the&nbsp;best&nbsp;suggestion&nbsp;for&nbsp;you.&nbsp;  
&nbsp;If&nbsp;this&nbsp;error&nbsp;still&nbsp;exists&nbsp;in&nbsp;your&nbsp;web&nbsp;app,&nbsp;please&nbsp;provide&nbsp;us&nbsp;the&nbsp;solution&nbsp;so&nbsp;that&nbsp;we&nbsp;could&nbsp;address&nbsp;it&nbsp;quickly.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Khalil

---

<div class="post-metadata">

**Author:** ![Chad1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/chad1/32/24984_2.png) [@Chad1](https://community.thinkgeo.com/u/Chad1)\
**Post date:** [January 17, 2012, 9:04pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/3 "2012-01-17T21:04:56Z")

</div>

&nbsp;Can&nbsp;someone&nbsp;explain&nbsp;the&nbsp;usage&nbsp;of&nbsp;this&nbsp;example&nbsp;if&nbsp;it&nbsp;works?&nbsp;&nbsp;

I&nbsp;looked&nbsp;at&nbsp;the&nbsp;js&nbsp;API&nbsp;here:&nbsp;[gis.thinkgeo.com/Support/Dis...x#HowToUse](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5616/afv/topic/Default.aspx#HowToUse)

I&nbsp;do&nbsp;not&nbsp;see&nbsp;anyone&nbsp;using&nbsp;js&nbsp;to&nbsp;create&nbsp;markers&nbsp;anywhere&nbsp;in&nbsp;that&nbsp;thread,&nbsp;but&nbsp;maybe&nbsp;I&nbsp;am&nbsp;missing&nbsp;something?

All&nbsp;I&nbsp;want&nbsp;to&nbsp;do&nbsp;is&nbsp;create&nbsp;a&nbsp;marker&nbsp;on&nbsp;the&nbsp;client-side&nbsp;with&nbsp;a&nbsp;mouse&nbsp;click&nbsp;(at&nbsp;the&nbsp;point&nbsp;of&nbsp;click),&nbsp;preferably&nbsp;in&nbsp;SimpleMarkerOverlay&nbsp;so&nbsp;my&nbsp;user&nbsp;has&nbsp;the&nbsp;ability&nbsp;to&nbsp;drag&nbsp;it,&nbsp;&nbsp;and&nbsp;then&nbsp;save&nbsp;it&nbsp;to&nbsp;the&nbsp;database&nbsp;InMemoryMarkerLayer.

Thanks

---

<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:** [January 18, 2012, 12:35pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/4 "2012-01-18T12:35:06Z")

</div>

Hi&nbsp;Chad,

I&nbsp;think&nbsp;these&nbsp;two&nbsp;topics&nbsp;maybe&nbsp;helpful&nbsp;for&nbsp;your&nbsp;requirement.

[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/5675/afv/topic/Default.aspx)  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/6348/afv/topic/Default.aspx)

Regards,

Don

---

<div class="post-metadata">

**Author:** ![Chad1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/chad1/32/24984_2.png) [@Chad1](https://community.thinkgeo.com/u/Chad1)\
**Post date:** [January 20, 2012, 11:03pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/5 "2012-01-20T23:03:34Z")

</div>

Don,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;response.&nbsp;I&nbsp;have&nbsp;managed&nbsp;to&nbsp;do&nbsp;most&nbsp;everything&nbsp;I&nbsp;want&nbsp;given&nbsp;the&nbsp;examples&nbsp;you&nbsp;provided.&nbsp;  
&nbsp;&nbsp;  
&nbsp;There&nbsp;are&nbsp;2&nbsp;things&nbsp;I&nbsp;am&nbsp;still&nbsp;struggling&nbsp;with.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;First,&nbsp;I&nbsp;can’t&nbsp;figure&nbsp;out&nbsp;how&nbsp;to&nbsp;make&nbsp;the&nbsp;markers&nbsp;draggable&nbsp;from&nbsp;the&nbsp;client&nbsp;side.&nbsp;&nbsp;I&nbsp;have&nbsp;set&nbsp;the&nbsp;layer&nbsp;to&nbsp;allow&nbsp;them&nbsp;to&nbsp;drag&nbsp;on&nbsp;the&nbsp;server&nbsp;side,&nbsp;but&nbsp;any&nbsp;click&nbsp;creates&nbsp;a&nbsp;marker,&nbsp;even&nbsp;if&nbsp;&nbsp;it&nbsp;is&nbsp;“on”&nbsp;an&nbsp;existing&nbsp;marker.&nbsp;&nbsp;This&nbsp;is&nbsp;before&nbsp;the&nbsp;save,&nbsp;so&nbsp;they&nbsp;should&nbsp;still&nbsp;be&nbsp;in&nbsp;the&nbsp;SimpleMarkerOverlay,&nbsp;which&nbsp;means&nbsp;I&nbsp;should&nbsp;be&nbsp;able&nbsp;to&nbsp;drag&nbsp;them,&nbsp;right?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Second,&nbsp;I&nbsp;am&nbsp;having&nbsp;trouble&nbsp;with&nbsp;saving&nbsp;a&nbsp;marker&nbsp;and&nbsp;having&nbsp;the&nbsp;cursor&nbsp;in&nbsp;“Create&nbsp;Marker&nbsp;mode”&nbsp;directly&nbsp;after.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;pop&nbsp;up&nbsp;a&nbsp;modal&nbsp;after&nbsp;ever&nbsp;marker&nbsp;creation&nbsp;(mouse&nbsp;click).&nbsp;&nbsp;There&nbsp;are&nbsp;two&nbsp;buttons,&nbsp;one&nbsp;is&nbsp;“Save”&nbsp;and&nbsp;the&nbsp;other&nbsp;is&nbsp;“Save&nbsp;and&nbsp;Add&nbsp;Another&nbsp;Marker”.&nbsp;&nbsp;“Save”&nbsp;works&nbsp;as&nbsp;it&nbsp;should.&nbsp;&nbsp;&nbsp;&nbsp;“Save&nbsp;and&nbsp;Add&nbsp;Another&nbsp;Marker”&nbsp;saves&nbsp;the&nbsp;markers,&nbsp;but&nbsp;I&nbsp;cannot&nbsp;get&nbsp;it&nbsp;to&nbsp;be&nbsp;in&nbsp;“Create&nbsp;Marker&nbsp;mode”&nbsp;after&nbsp;the&nbsp;save.&nbsp;  
&nbsp;&nbsp;  
&nbsp;To&nbsp;troubleshoot&nbsp;I&nbsp;just&nbsp;put&nbsp;Map1.SetDrawMode(‘Point’);&nbsp;right&nbsp;after&nbsp;setting&nbsp;the&nbsp;baselayer&nbsp;of&nbsp;the&nbsp;map&nbsp;in&nbsp;the&nbsp;initial&nbsp;js.&nbsp;&nbsp;This&nbsp;did&nbsp;not&nbsp;work&nbsp;either.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I.e.&nbsp;  
&nbsp;` <script type=“text/javascript”>            Map1.SetBaseLayer(“BING”);            Map1.SetDrawMode(‘Point’)</script>`&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;appreciate&nbsp;any&nbsp;help&nbsp;you&nbsp;can&nbsp;provide.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Chad

---

<div class="post-metadata">

**Author:** ![Chad1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/chad1/32/24984_2.png) [@Chad1](https://community.thinkgeo.com/u/Chad1)\
**Post date:** [January 20, 2012, 11:16pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/6 "2012-01-20T23:16:21Z")

</div>

BTW,&nbsp;I&nbsp;also&nbsp;tried&nbsp;this&nbsp;at&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;"AddMarker"&nbsp;server&nbsp;side&nbsp;method:&nbsp;  
&nbsp;&nbsp;  
&nbsp;` if (((Button)sender).Text.ToUpper().Contains("ANOTHER"))            {                ClientScript.RegisterStartupScript(GetType(), "AddAnotherMarker", "openMarker();", true);            }`&nbsp;  
&nbsp;&nbsp;  
&nbsp;When&nbsp;I&nbsp;do&nbsp;this,&nbsp;it&nbsp;looks&nbsp;like&nbsp;there&nbsp;is&nbsp;a&nbsp;js&nbsp;error&nbsp;as&nbsp;the&nbsp;map&nbsp;turns&nbsp;grey.

---

<div class="post-metadata">

**Author:** ![Chad1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/chad1/32/24984_2.png) [@Chad1](https://community.thinkgeo.com/u/Chad1)\
**Post date:** [January 21, 2012, 10:19pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/7 "2012-01-21T22:19:53Z")

</div>

Also,&nbsp;since&nbsp;I&nbsp;have&nbsp;implemented&nbsp;the&nbsp;feature&nbsp;of&nbsp;adding&nbsp;the&nbsp;markers&nbsp;from&nbsp;the&nbsp;client&nbsp;side,&nbsp;any&nbsp;time&nbsp;I&nbsp;try&nbsp;to&nbsp;draw&nbsp;a&nbsp;shape,&nbsp;it&nbsp;now&nbsp;wants&nbsp;to&nbsp;add&nbsp;a&nbsp;marker&nbsp;in&nbsp;addition&nbsp;to&nbsp;boundary&nbsp;point&nbsp;for&nbsp;each&nbsp;mouse&nbsp;click.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;How&nbsp;can&nbsp;I&nbsp;manage&nbsp;this&nbsp;so&nbsp;that&nbsp;it&nbsp;"knows"&nbsp;that&nbsp;I&nbsp;want&nbsp;to&nbsp;draw&nbsp;a&nbsp;shape&nbsp;as&nbsp;opposed&nbsp;to&nbsp;set&nbsp;a&nbsp;marker?

---

<div class="post-metadata">

**Author:** ![Clint](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@Clint](https://community.thinkgeo.com/u/Clint)\
**Post date:** [January 23, 2012, 11:57am UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/8 "2012-01-23T11:57:25Z")

</div>

Chad,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;question.&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;can&nbsp;find&nbsp;out&nbsp;what&nbsp;mode&nbsp;you&nbsp;are&nbsp;in&nbsp;by&nbsp;checking&nbsp;controls&nbsp;collection&nbsp;off&nbsp;of&nbsp;the&nbsp;OpenLayers&nbsp;Map.&nbsp;&nbsp;For&nbsp;example&nbsp;this&nbsp;function&nbsp;will&nbsp;pop&nbsp;up&nbsp;a&nbsp;message&nbsp;box&nbsp;if&nbsp;you&nbsp;are&nbsp;in&nbsp;Polygon&nbsp;Draw&nbsp;Mode.&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;Map&nbsp;=&nbsp;Map1.GetOpenLayersMap();&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(key&nbsp;in&nbsp;Map.controls)&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;&nbsp;&nbsp;var&nbsp;control&nbsp;=&nbsp;Map.controls[key];&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(control.id&nbsp;==&nbsp;‘Polygon’&nbsp;&&&nbsp;control.active)&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(‘In&nbsp;Draw&nbsp;Polygon&nbsp;Mode’);&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;&nbsp;}&nbsp;  
&nbsp;&nbsp;  
&nbsp;Hope&nbsp;this&nbsp;helps.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks!

---

<div class="post-metadata">

**Author:** ![Chad1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/chad1/32/24984_2.png) [@Chad1](https://community.thinkgeo.com/u/Chad1)\
**Post date:** [February 4, 2012, 4:54pm UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/9 "2012-02-04T16:54:50Z")

</div>

Clint,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;reply.&nbsp;&nbsp;I&nbsp;managed&nbsp;to&nbsp;remove&nbsp;the&nbsp;markers&nbsp;from&nbsp;the&nbsp;shape&nbsp;files&nbsp;with&nbsp;the&nbsp;provided&nbsp;code.&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [February 6, 2012, 8:45am UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/10 "2012-02-06T08:45:40Z")

</div>

Hello&nbsp;Chad,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know&nbsp;your&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Chad1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/chad1/32/24984_2.png) [@Chad1](https://community.thinkgeo.com/u/Chad1)\
**Post date:** [February 6, 2012, 9:20am UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/11 "2012-02-06T09:20:35Z")

</div>

Gary,&nbsp;I&nbsp;have&nbsp;asked&nbsp;my&nbsp;questions&nbsp;in&nbsp;separate&nbsp;threads&nbsp;to&nbsp;make&nbsp;it&nbsp;easier&nbsp;for&nbsp;those&nbsp;in&nbsp;the&nbsp;future&nbsp;to&nbsp;quickly&nbsp;find&nbsp;their&nbsp;answers.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [February 7, 2012, 6:59am UTC](https://community.thinkgeo.com/t/adding-client-side-markers-js-bug/5326/12 "2012-02-07T06:59:00Z")

</div>

Hello&nbsp;Chad,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;help.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;please&nbsp;check&nbsp;your&nbsp;another&nbsp;post,&nbsp;I&nbsp;have&nbsp;answered&nbsp;it,&nbsp;I&nbsp;hope&nbsp;it&nbsp;can&nbsp;help&nbsp;you.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary
