addSearchMarker: Add a marker search control to the map.

View source: R/plugin-search.R

addSearchMarkerR Documentation

Add a marker search control to the map.

Description

Add a marker search control to the map.

Usage

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

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 June 2, 2025, 5:02 a.m.