Description Usage Arguments Details Optional graphical parameters Author(s) See Also Examples
Plots a map or satellite image of the met mast location.
1 2 3 4 |
mast |
Met mast object created by |
type |
Type of the map as string. One of |
zoom |
Zoom level as integer from |
label |
Label to be placed next to the location symbol as string. Set to |
... |
Optional graphical parameters, see below for details. |
This function is based on the RgoogleMaps
package by Markus Loecher, which uses the Google Static Maps API.
The following graphical parameters can optionally be added to customize the plot:
cex
: Numeric value, giving the amount by which location symbol should be scaled relative to the default (which is 1.5
).
col
: The colour of the symbol.
pch
: Location symbol, either as integer or as single character. See points
for possible values and their interpretation – default is 8
.
cex.lab
: Numeric value, giving the amount by which the label should be scaled relative to the default (which is 1
).
col.lab
: The colour of the label – default is same as col
.
pos.lab
: Position specifier for the label. One of 1
(below symbol), 2
(left of symbol), 3
(above symbol) or 4
(right of symbol) – default is 4
.
Christian Graul
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
# load and prepare data
data("winddata", package="bReeze")
set1 <- set(height=40, v.avg=winddata[,2])
ts <- timestamp(winddata[,1])
neubuerg <- mast(timestamp=ts, set1, loc=c(49.8909,11.4017))
# plot satellite image
map.plot(neubuerg)
# plot terrain map
map.plot(neubuerg, type="terrain")
# change zoom level
map.plot(neubuerg, zoom=1)
map.plot(neubuerg, zoom=18)
# change symbol (and label)
map.plot(neubuerg, col="white", pch="+", cex=2)
# change label
map.plot(neubuerg, col.lab=3, cex.lab=1.5)
map.plot(neubuerg, pos.lab=1)
map.plot(neubuerg, label="Site #247 - Neubuerg") # custom label
map.plot(neubuerg, label=NA) # no label
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.