Extension points for plugins
a map object, as returned from leaflet() or leafletProxy()
the name of the function that the user called that caused
this dispatch call; for error message purposes
an action to be performed if the map is from leaflet()
an action to be performed if the map is from leafletProxy().
a data object that will be used when evaluating formulas in ...
the name of the JavaScript method to invoke
unnamed arguments to be passed to the JavaScript method
dispatch() returns the value of leaflet or
leaflet_proxy(), or an error. invokeMethod() returns the
map object that was passed in, possibly modified.