@@ -40,15 +40,10 @@ declare global {
4040    feature_group : any 
4141    layer_control : any 
4242    Streamlit : any 
43+     debouncedUpdateComponentValue : any 
4344  } 
4445} 
4546
46- function  onMapClick ( e : any )  { 
47-   const  global_data  =  window . __GLOBAL_DATA__ 
48-   global_data . lat_lng_clicked  =  e . latlng 
49-   debouncedUpdateComponentValue ( window . map ) 
50- } 
51- 
5247let  debouncedUpdateComponentValue  =  debounce ( updateComponentValue ,  250 ) 
5348
5449function  updateComponentValue ( map : any )  { 
@@ -90,10 +85,6 @@ function updateComponentValue(map: any) {
9085  } 
9186} 
9287
93- function  onMapMove ( e : any )  { 
94-   debouncedUpdateComponentValue ( window . map ) 
95- } 
96- 
9788function  extractContent ( s : string )  { 
9889  var  span  =  document . createElement ( "span" ) 
9990  span . innerHTML  =  s 
@@ -215,11 +206,12 @@ function getPixelatedStyles(pixelated: boolean) {
215206  return  styles 
216207} 
217208window . Streamlit  =  Streamlit ; 
209+ window . debouncedUpdateComponentValue  =  debouncedUpdateComponentValue ; 
218210
219211window . initComponent  =  ( map : any ,  return_on_hover : boolean )  =>  { 
220212  const  global_data  =  window . __GLOBAL_DATA__ 
221-   map . on ( "click" ,  onMapClick ) 
222-   map . on ( "moveend" ,  onMapMove ) 
213+   //  map.on("click", onMapClick)
214+   //  map.on("moveend", onMapMove)
223215  for  ( let  key  in  map . _layers )  { 
224216    let  layer  =  map . _layers [ key ] 
225217    if  ( layer  &&  layer [ "_url" ]  &&  layer [ "wmsParams" ]  &&  layer [ "wmsParams" ] [ "layers" ] )  { 
0 commit comments