# Draggable Marker issue with Firefox

**URL:** <https://community.thinkgeo.com/t/draggable-marker-issue-with-firefox/4885>\
**Category:** WebForms\
**Created:** [July 9, 2009, 2:48pm UTC](https://community.thinkgeo.com/t/draggable-marker-issue-with-firefox/4885 "2009-07-09T14:48:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttd](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/90ced4/32.png) [@ttd](https://community.thinkgeo.com/u/ttd)\
**Post date:** [July 9, 2009, 2:48pm UTC](https://community.thinkgeo.com/t/draggable-marker-issue-with-firefox/4885/1 "2009-07-09T14:48:03Z")

</div>

I&nbsp;am&nbsp;trying&nbsp;to&nbsp;implement&nbsp;drag-able&nbsp;markers.&nbsp;We&nbsp;are&nbsp;adding&nbsp;a&nbsp;marker/symbol&nbsp;on&nbsp;client-side.&nbsp;Everything&nbsp;seems&nbsp;to&nbsp;work&nbsp;fine&nbsp;on&nbsp;IE&nbsp;7.0&nbsp;browser.&nbsp;However,&nbsp;it&nbsp;does&nbsp;not&nbsp;work&nbsp;on&nbsp;Firefox.&nbsp;I&nbsp;tried&nbsp;setting&nbsp;the&nbsp;setZIndex&nbsp;on&nbsp;the&nbsp;EditOverlay&nbsp;and&nbsp;marker&nbsp;layers&nbsp;without&nbsp;success.&nbsp;Attached&nbsp;is&nbsp;my&nbsp;sample&nbsp;code.

Moreover,&nbsp;when&nbsp;I&nbsp;attempted&nbsp;to&nbsp;do&nbsp;a&nbsp;drag-able&nbsp;marker&nbsp;on&nbsp;server-side&nbsp;(see&nbsp;below&nbsp;code&nbsp;on&nbsp;Page\_load).&nbsp;Initially,&nbsp;it&nbsp;works.&nbsp;However,&nbsp;when&nbsp;I&nbsp;start&nbsp;setting&nbsp;the&nbsp;Map1.SetDrawMode&nbsp;value&nbsp;(ex.&nbsp;Map1.SetDrawMode('Rectangle')),&nbsp;it&nbsp;no&nbsp;longer&nbsp;works.&nbsp;Is&nbsp;there&nbsp;a&nbsp;property&nbsp;that&nbsp;I&nbsp;am&nbsp;missing?&nbsp;

We&nbsp;are&nbsp;using&nbsp;WebEdition&nbsp;3.1.16&nbsp;and&nbsp;Firefox&nbsp;3.09&nbsp;(Opera&nbsp;9.64&nbsp;also&nbsp;has&nbsp;the&nbsp;same&nbsp;issue).&nbsp;

On&nbsp;Page\_load&nbsp;  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleMarkerOverlay&nbsp;objSimpleMarkerOverlay&nbsp;=&nbsp;new&nbsp;SimpleMarkerOverlay("MarkerSymbol");  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objSimpleMarkerOverlay.IsVisibleInOverlaySwitcher&nbsp;=&nbsp;false;  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objSimpleMarkerOverlay.DragMode&nbsp;=&nbsp;MarkerDragMode.Drag;  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebImage&nbsp;objSymbol&nbsp;=&nbsp;new&nbsp;WebImage(@"images/symbols/aerial\_svc\_wire.png");  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objSimpleMarkerOverlay.Markers.Add(new&nbsp;Marker(-80.121014,&nbsp;26.538472,&nbsp;objSymbol));  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebImage&nbsp;objSymbol2&nbsp;=&nbsp;new&nbsp;WebImage(@"images/symbols/aerial\_cable.png");  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objSimpleMarkerOverlay.Markers.Add(new&nbsp;Marker(-80.121014,&nbsp;26.538472,&nbsp;objSymbol2));  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.CustomOverlays.Add(objSimpleMarkerOverlay);

Thanks&nbsp;in&nbsp;advance&nbsp;...&nbsp;

[886-Add\_Draggable\_Marker--Symbol\_Code.txt](https://community.thinkgeo.com/uploads/default/original/1X/29bdc4ce1ce7f82155b101d7801e0da825275423.txt) (7.62 KB)

---

<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:** [July 9, 2009, 4:01pm UTC](https://community.thinkgeo.com/t/draggable-marker-issue-with-firefox/4885/2 "2009-07-09T16:01:11Z")

</div>

Ttd,  
  
  
  
I&nbsp;changed&nbsp;the&nbsp;Z-Index&nbsp;of&nbsp;the&nbsp;marker&nbsp;overlay;&nbsp;it&nbsp;works&nbsp;fine&nbsp;in&nbsp;both&nbsp;Firefox&nbsp;and&nbsp;IE.&nbsp;Please&nbsp;have&nbsp;a&nbsp;try&nbsp;the&nbsp;following&nbsp;script.&nbsp;Marker’s&nbsp;default&nbsp;zoom&nbsp;level&nbsp;is&nbsp;lower&nbsp;than&nbsp;EditOverlay&nbsp;for&nbsp;avoiding&nbsp;some&nbsp;event&nbsp;conflict.&nbsp;For&nbsp;example,&nbsp;if&nbsp;you&nbsp;are&nbsp;editing&nbsp;a&nbsp;shape,&nbsp;when&nbsp;mouse&nbsp;drag&nbsp;across&nbsp;the&nbsp;marker,&nbsp;it&nbsp;may&nbsp;have&nbsp;some&nbsp;problems.`var OnMapCreated = function(map){    var markerOverlay = map.getLayer('MarkerOverlay');    markerOverlay.div.style.zIndex = 9999;}`

It&nbsp;easily&nbsp;tell&nbsp;the&nbsp;marker&nbsp;overlay&nbsp;is&nbsp;on&nbsp;top&nbsp;of&nbsp;the&nbsp;edit&nbsp;overlay.

 ![](https://community.thinkgeo.com/uploads/default/original/2X/e/e6ef4a41fd7b438f3ee28e2647254136a79357aa.JPG)  
  
  
  
 ![](https://community.thinkgeo.com/uploads/default/original/2X/8/8c5a26b8eba2d96a06920c94b18d9a2699874647.JPG)  
  
  
  
Could&nbsp;you&nbsp;tell&nbsp;me&nbsp;what’s&nbsp;the&nbsp;exacte&nbsp;issue&nbsp;for&nbsp;the&nbsp;first&nbsp;question?&nbsp;  
  
  
  
Thanks,  
  
Howard
