Skip to content

Error when running mb_geocode() with permanent = TRUE #60

@etiennebacher

Description

@etiennebacher

Hello, specifying permanent = TRUE fails because of this line:

mapboxapi/R/search.R

Lines 53 to 58 in adf13b3

if (permanent) {
rlang::warn(c("You have requested permanent geocoding.",
"i" = "You are allowed to store these geocoded results per Mapbox's Terms of Service",
"i" = "However, permanent geocoding may incur significant charges to your Mapbox account."),
.frequency = "once")
}

Reprex:

library(mapboxapi)
#> Usage of the Mapbox APIs is governed by the Mapbox Terms of Service.
#> Please visit https://www.mapbox.com/legal/tos/ for more information.

mb_geocode(
  structured_input = list(
    address_line1 = NA,
    place = NA,
    postcode = NA,
    country = NA
  ),
  permanent = TRUE
)
#> Error in `rlang::warn()`:
#> ! `.frequency_id` must be supplied with `.frequency`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions