Writes a <maplayer> and its layer-tree entry for one or more remote
services - xyz tile basemaps, WMS, ArcGIS FeatureServer - from the shipped
registry (inst/lookups/rfp_qgs_services.csv). The counterpart of
rfp_qgs_raster_add() and rfp_qgs_vector_add() for layers that have no
local file at all.
Usage
rfp_qgs_service_add(
qgs,
services,
group = NULL,
position = c("bottom", "top"),
above = NULL
)Arguments
- qgs
Character. Path to the project
.qgs.- services
Character vector of
layer_keys from the registry.- group
Character. Layer-tree group.
NULL(default) uses each service's owngroupfrom the registry - the six do not share one. The two data services sit inWeb Mapping Services, which is what gq's roster calls them; the four xyz basemaps sit inBase - misc.- position
"bottom"(default) or"top"within the group. A basemap belongs beneath the data it provides context for.- above
Character. Insert directly above this layer id in the ordering lists - see
rfp_qgs_raster_add().
Details
Six services were previously baked into the shipped templates with no way to add a seventh, remove one, or change where it sits without QGIS Desktop.
See rfp_qgs_services() for what is available.
See also
Other qgs:
rfp_qgs_form_add(),
rfp_qgs_layer_rm(),
rfp_qgs_preview_set(),
rfp_qgs_raster_add(),
rfp_qgs_service_rm(),
rfp_qgs_services(),
rfp_qgs_style_export(),
rfp_qgs_style_set(),
rfp_qgs_subset_get(),
rfp_qgs_subset_set(),
rfp_qgs_theme_add(),
rfp_qgs_theme_lookup(),
rfp_qgs_theme_names(),
rfp_qgs_theme_rm(),
rfp_qgs_theme_set(),
rfp_qgs_theme_unbury(),
rfp_qgs_themes(),
rfp_qgs_vector_add(),
rfp_qwc_config_create(),
rfp_raster_style_path(),
rfp_raster_styles()
