Description Usage Arguments Value
View source: R/mapcomponents.R
This is a helper function to add both north arrow and scalebar to a map.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | mapElements(
x,
y,
scalesize,
scalelabel,
cex.label = 0.75,
font.label = 1,
col.label = "black",
type.north = "simple",
lwd.north = 0.5,
offset.north = height.scale * 1.5,
r.north = scalesize/5,
bkgrd.north = "white",
fill.north = "black",
offset.scale = height.scale,
height.scale = scalesize/8,
border.scale = "black",
col.scale = "white",
lwd.scale = 0.5
)
|
x |
x coordinate for the centre of the added elements (the centre of the text label) |
y |
y coordinate for the centre of the added elements (the centre of the text label) |
scalesize |
width of the scalebar in map units (this function assumes projcted units but will not throw a warning if unprojected units are used. |
scalelabel |
text label for the state width of the scalebar (it requires the user to enter this and is not automatically generated from scalesize) |
a plotted north arrow and scale-bar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.