You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method return class, not instance.
I could be wrong, but I can make the only use case: add same handler to several maps at once, like myHandler.addTo(map1,'someHandler').addTo(map2,'someHandler').addTo(map3,'someHandler');
Not very useful, IMHO.
Describe the solution you'd like
I suppose that more useful would be to return instance here, to be able to call later it's methods:
var handlerInstance = `myHandler.addTo(map,'someHandler');
Describe alternatives you've considered
map.addHandler('someHandler', myHandler);
var handlerInstance = map.someHandler;
This works, but a bit ugly.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
This method return class, not instance.
I could be wrong, but I can make the only use case: add same handler to several maps at once, like
myHandler.addTo(map1,'someHandler').addTo(map2,'someHandler').addTo(map3,'someHandler');
Not very useful, IMHO.
Describe the solution you'd like
I suppose that more useful would be to return instance here, to be able to call later it's methods:
Describe alternatives you've considered
This works, but a bit ugly.
The text was updated successfully, but these errors were encountered: