NumTiles: computes the necessary number of tiles from a bounding box...

NumTilesR Documentation

computes the necessary number of tiles from a bounding box and a zoom level

Description

computes the necessary number of tiles from a bounding box and a zoom level

Usage

NumTiles(lonR, latR, zoom = 13, CheckExistingFiles = TRUE, 


    tileExt = ".png", tileDir = "~/mapTiles/OSM/", 


    verbose = 0)

Arguments

lonR

longitude range

latR

latitude range,

zoom

zoom level

CheckExistingFiles

logical, if TRUE check if files already exist and only download if not!

tileExt

image type of tile

tileDir

map tiles are stored in a local directory, e.g. "~/mapTiles/Google/"

verbose

level of verbosity

Value

tuple with number of tiles for lon and lat extent

Author(s)

Markus Loecher

Examples



if (0){


  #US bounding box:


  for (zoom in 4:15) {


    cat("OSM, zoom =", zoom, "\n")


    NumTiles(lonR=c(-135,-66), latR=c(25,54) , zoom=zoom)


  }


  for (zoom in 4:15) {


    cat("Google, zoom =", zoom, "\n")


    NumTiles(lonR=c(-135,-66), latR=c(25,54) , zoom=zoom, tileDir= "~/mapTiles/Google/")


  }


}



RgoogleMaps documentation built on Nov. 6, 2023, 5:08 p.m.