File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -193,26 +193,22 @@ export class Map {
193193      // Create marker 
194194      const  marker  =  L . marker ( L . latLng ( item . latitude ,  item . longitude ) ,  { 
195195        icon : icon , 
196+         autoPanOnFocus : false , 
196197        bubblingMouseEvents : true , 
197198      } ) ; 
198199
199200      if  ( item . popover_html )  { 
200201        // Add popup to marker 
201-         marker . bindPopup ( 
202+         marker . bindTooltip ( 
202203          `<div class="flex flex-1 flex-row items-center min-w-[370px]">${ item . popover_html }  </div>` , 
204+           { 
205+             direction : "top" , 
206+             permanent : false , 
207+             sticky : true , 
208+             offset : [ 0 ,  0 ] , 
209+             opacity : 1 , 
210+           } , 
203211        ) ; 
204- 
205-         // Open popup on hover 
206-         marker . on ( "mouseover" ,  ( )  =>  { 
207-           this . enabledMoveEnd  =  false ; 
208-           marker . openPopup ( ) ; 
209-         } ) ; 
210- 
211-         // Close popup on mouseout 
212-         marker . on ( "mouseout" ,  ( )  =>  { 
213-           this . enabledMoveEnd  =  true ; 
214-           marker . closePopup ( ) ; 
215-         } ) ; 
216212      } 
217213
218214      // Add marker to the marker cluster group 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments