dispatch: Extension points for plugins

Description Usage Arguments Value

View source: R/utils.R

Description

Extension points for plugins

Usage

1
2
3
4
5
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, ...)

Arguments

map

a map object, as returned from leaflet or leafletProxy

funcName

the name of the function that the user called that caused this dispatch call; for error message purposes

leaflet

an action to be performed if the map is from leaflet

leaflet_proxy

an action to be performed if the map is from leafletProxy

data

a data object that will be used when evaluating formulas in ...

method

the name of the JavaScript method to invoke

...

unnamed arguments to be passed to the JavaScript method

Value

dispatch returns the value of leaflet or leaflet_proxy, or an error. invokeMethod returns the map object that was passed in, possibly modified.


rstudio/leaflet documentation built on Sept. 10, 2018, 8:29 p.m.