Description Usage Arguments Value Examples
Add a marker search control to the map.
1 2 | addSearchMarker(map, group, position = "topright", propertyName = "label",
initial = FALSE)
|
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 |
modified map
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.