getGaoDeMap: Get static map from GaoDe API

Description Usage Arguments Value Examples

View source: R/getGaoDeMap.R

Description

Take in location and return a ggmap object.

Usage

1
2
3
getGaoDeMap(location, city = NULL, width = 400, height = 400,
  zoom = 10, scale = 2, color = "color", messaging = TRUE,
  map_ak = "", zoomplus = 0)

Arguments

location

a vector a or matrix contains longtitude and latitude of the center of the map, or a character refers to the address

city

city of location

width

width of the map

height

height of the map

zoom

map zoom, an integer from 1 (continent) to 17 (building), default value 10 (city)

scale

multiplicative factor for the number of pixels returned. possible values are 2 or anything else.

color

"color" or "bw", color or black-and-white

messaging

logical. whether to print the download messages.

zoomplus

map zoom plus, a real number for fine turning zoom in further ggplot commands

coordtype

coordiantion type.

Value

A ggmap object. a map image as a 2d-array of colors as hexadecimal strings representing pixel fill values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
library(ggmap)  
## Beijing
p <- getGaoDeMap(c(116.39565, 39.92999))
ggmap(p)

p <- getGaoDeMap('beijing') # the same
ggmap(p)

## black-and-white
p <- getGaoDeMap(color='bw')
ggmap(p)

## do not print messages
p <- getGaoDeMap(messaging = F)

## End(Not run)

icejean/gaodemap documentation built on Nov. 4, 2019, 1:53 p.m.