Q: leaflet-gesture-handling
basz opened this issue · 3 comments
Hi,
I'm trying to create an addon that provide leaflet-gesture-handling. https://github.com/elmarquis/Leaflet.GestureHandling
Could you advise me on how to add it's required options to the LeafletMap that does the map instantiation?
I need to plugin into the LeafletMap component I think
var map = L.map("map", {
/* ... initial options */
gestureHandling: true,
gestureHandlingOptions: {
duration: 5000
}
});
I've added the following to an initializer and that seems to work... Works for all maps, but that is fine I guess.
L.Map.mergeOptions({
gestureHandling: true,
gestureHandlingOptions: {
text: {
touch: "Hey bro, use two fingers to move the map",
scroll: "Hey bro, use ctrl + scroll to zoom the map",
scrollMac: "Hey bro, use \u2318 + scroll to zoom the map"
},
duration: 5000
}
});
here we go: https://github.com/bushbaby/ember-leaflet-gesture-handling
I like this leaflet family. Any plans to update things?
@basz at the moment there is no way to add arguments to <LeafletMap
through addons. That would be an interesting feature to have. It would certainly involve using the ember-leaflet service, and pulling new arguments from there.
But I think your addon looks fine, you worked around the limitation really well.
I like this leaflet family. Any plans to update things?
What do you mean by "update things"?