· 6 years ago · Sep 10, 2019, 05:58 AM
1bound <- qbbox(lat = temp[1 , c(3:5)], lon = temp[1 , c(6:8)]);
2num_lat <- round((abs(temp[1, 4])), digits = 4)
3num_lon <- round((abs(temp[1, 7])), digits = 4)
4if(num_lon%/%100 == 0){
5 str_lon <- paste0('0', as.factor(num_lon))
6} else{
7 str_lon <- as.factor(num_lon)
8}
9
10if(num_lat%/%100 == 0){
11 str_lat <- paste0('0', as.factor(num_lat))
12} else{
13 str_lat <- as.factor(num_lat)
14}
15
16zoom <- '18'
17ext <- '.png'
18name <- paste0('sat', '_', str_lat, '_', str_lon, '_', zoom, ext)
19MyMap <- GetMap.bbox(bound$lonR, bound$latR, destfile = name, maptype = "satellite", GRAYSCALE = FALSE, zoom = 18, API_console_key = 'API Key')