Add a FeatureService source to the map
Usage
add_feature_server_source(
map,
source_url,
source_id,
append_query_url = "/0/query?where=1=1&outFields=*&f=geojson"
)Note
By default the function appends a query URL to the provided source_url to retrieve all
features in GeoJSON format. If you need more control over the query parameters, you can
provide the full query URL directly in the source_url argument and set append_query_url
to an empty string to prevent appending the default query parameters.
Examples
# \donttest{
service_url <- paste0(
"https://services1.arcgis.com/VwarAUbcaX64Jhub/arcgis/rest/services/",
"World_Exclusive_Economic_Zones_Boundaries/FeatureServer"
)
map() |>
add_feature_server_source(service_url, "eez") |>
add_line_layer(id = "eez_lines", source = "eez")
# }
