This specialises ggmapinset::configure_inset()
to allow the centre
to be specified as a location. The centroid of that location is used as the
inset's centre.
configure_inset(
centre = NULL,
scale = NULL,
translation = NULL,
radius = NULL,
units = "km",
feature_type = NA
)
An inset configuration object.
Coordinates of the inset centre. Can instead be the name of a
geographic feature if feature_type
is also provided.
Zoom scale: values larger than one will make the circle bigger.
Translate (shift) the inset. This can be an
st_point
or simply a vector of length 2 containing the x and y
offsets respectively.
Radius of the inset circle.
Base length unit (e.g. "km"
or "mi"
).
See ggmapinset::configure_inset()
for supported values.
Type of map feature. See feature_types()
for a list of
registered types. If NA
, the type is guessed based on the values in
feature_names
.
ggmapinset::configure_inset
cfg <- configure_inset(
centre = "Yancey",
feature_type = "sf.nc",
scale = 2,
translation = c(70, -180),
radius = 50,
units = "mi"
)
Run the code above in your browser using DataLab