bounds: Get bounds for a list or geo_list

Description Usage Arguments Value Examples

View source: R/bounds.R

Description

Get bounds for a list or geo_list

Usage

1
bounds(x, ...)

Arguments

x

An object of class list or geo_list

...

Ignored

Value

A vector of the form min longitude, min latitude, max longitude, max latitude

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# numeric 
vec <- c(-99.74,32.45)
x <- geojson_list(vec)
bounds(x)

# list
mylist <- list(list(latitude=30, longitude=120, marker="red"),
               list(latitude=30, longitude=130, marker="blue"))
x <- geojson_list(mylist)
bounds(x)

# data.frame
x <- geojson_list(states[1:20,])
bounds(x)

geojsonio documentation built on May 19, 2017, 4:37 p.m.

Search within the geojsonio package
Search all R packages, documentation and source code