How to call a leaflet Javascript Function in dropdown menu bar?

المشرف العام

Administrator
طاقم الإدارة
i have the following problem: my target is a hybrid app with leaflet. I create a dropdown menu with html/CSS/JQuery. Here is the code:


Now I like to call the Leaflet Geosearch Plug in from https://github.com/smeijer/L.GeoSearch at the point li id="search"

I know how to call the function within the javascript part, but not within the list element, which is outside the Leaflet function.

The code for the Leaflet Map is:

new L.Control.GeoSearch({ position: 'topcenter', provider: new L.GeoSearch.Provider.OpenStreetMap(), }).addTo(map);which I like to implement in the dropdown menu.

Much thanks for Help !



أكثر...
 
أعلى