how to prevent the close button of popup in geocoder control leaflet from changing your actual route (note working with Ionic 6 Angular )

Viewed 16

I've been trying everything to remove the 'href' attribute from the close button but nothing worked I need your help and thx.

here is my code :

searchByPlaceName(showPoly: boolean){
      const g = geo.geocoder({
        defaultMarkGeocode:true,
        collapsed:false,
        position:'topright',
        showResultIcons:true,
        placeholder:'City Name'
      }).on('markgeocode',($event)=>{
       if(showPoly){
        const bbox = $event.geocode.bbox;
        const poly = L.polygon([
          bbox.getSouthEast(),
          bbox.getNorthEast(),
          bbox.getNorthWest(),
          bbox.getSouthWest(),
        ]).addTo(this.map);
        this.map.flyToBounds(poly.getBounds());
            poly.addEventListener('dblclick',($e)=>{
            poly.removeFrom(this.map);
        });
      }
      }).addTo(this.map);
}
0 Answers
Related