Open constantbourgois opened 4 years ago
Hi Thanks for your work. May I suggest to add a feature for enabling popup options like this
addMarker(result, query) { const { marker: options, showPopup, popupFormat , popupOptions } = this.options; const marker = new L.Marker([result.y, result.x], options); let popupLabel = result.label; if (typeof popupFormat === 'function') { popupLabel = popupFormat({ query, result }); } marker.bindPopup(popupLabel, popupOptions);
and then you provide the options you need like this for instance
const searchControl = new GeoSearchControl({ provider: new OpenStreetMapProvider(), style: "bar", showMarker: true, // optional: true|false - default true showPopup: true, keepResult: true, marker: { icon: new Icon.Default(), draggable: false, }, popupFormat: function ({result}){ return result.label}, popupOptions: { closeOnClick: false, className : "classname" } });
Hi Thanks for your work. May I suggest to add a feature for enabling popup options like this
and then you provide the options you need like this for instance