Skip to content

label formula fails when using crosstalk #402

@kent37

Description

@kent37

Labels can't be specified as formulas when the map data is a crosstalk SharedData. Simple example:

library(crosstalk)
library(leaflet)

shared_quakes <- SharedData$new(quakes[sample(nrow(quakes), 100),])
map = leaflet(shared_quakes,) %>% addTiles() %>% 
  addMarkers(label=~as.character(depth))

gives error

Error in UseMethod("metaData") : 
  no applicable method for 'metaData' applied to an object of class "c('SharedData', 'R6')"

The problem is a simple mis-spelling at line 2 of normalize-SharedData.R. metaData.sharedData should be metaData.SharedData.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions