Skip to contents

Adds a geocoding search widget to a leaflet map using the leaflet-geosearch plugin. Supports multiple providers such as OpenStreetMap, Esri, Google, HERE, etc.

Usage

addGeosearch(map, provider = geosearchProvider(), options = geosearchOptions())

Arguments

map

a map widget

provider

A provider list object created with e.g. `geosearchProviderOSM()`.

options

A list of control options created with `geosearchOptions()`.

Value

the new map object

See also

Other Geosearch Functions: geosearchOptions(), removeGeosearch()

Examples

library(leaflet)
library(leaflet.extras2)

leaflet() %>%
  addTiles() %>%
  addGeosearch()