addSearchMarker: Add a marker search control to the map.

Description Usage Arguments Value Examples

Description

Add a marker search control to the map.

Usage

1
2
addSearchMarker(map, group, position = "topright", propertyName = "label",
  initial = FALSE)

Arguments

map

a map widget object

group

a searchable group

position

standard Leaflet control position options.

propertyName

property in marker.options(or feature.properties for vector layer) trough filter elements in layer

initial

search elements only by initial text

Value

modified map

Examples

1
2
3
4
5
6
data(quakes)
leaflet(data = quakes) %>%
    addTiles() %>%
    addMarkers(~long, ~lat, popup = ~as.character(mag),
               group = 'marker', label = ~as.character(mag)) %>%
    addSearchMarker('marker', position = 'topleft', propertyName = 'popup')

asmith26/leafletplugins documentation built on May 5, 2019, 8:01 p.m.