dispatch(map, funcName, leaflet = stop(paste(funcName, "requires a map proxy object")), leaflet_proxy = stop(paste(funcName, "does not support map proxy objects")))
invokeMethod(map, data, method, ...)leaflet or
leafletProxydispatch call; for error message purposesleafletleafletProxy...dispatch returns the value of leaflet or
leaflet_proxy, or an error. invokeMethod returns the
map object that was passed in, possibly modified.