Description Usage Arguments Value See Also Examples
Visualize geojson from a character string or list
| 1 | 
| x | Input, a geojson character string or list | 
| center | (numeric) A length two vector of the form:
 | 
| zoom | (integer) A number between 1 and 18 (1 zoomed out, 18 zoomed in) | 
| fmt | Format string which indicates the number of digits to display after the decimal point when formatting coordinates. Max: 20 | 
Opens a map with the geojson object(s) using leaflet
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run: 
# point
str <- "POINT (-116.4000000000000057 45.2000000000000028)"
wktview(str)
# multipoint
df <- us_cities[1:5,c('long','lat')]
str <- multipoint(df)
wktview(str, center = c(-100,40))
wktview(str, center = c(-100,40), zoom = 3)
# linestring
wktview(linestring(c(100.000, 0.000), c(101.000, 1.000), fmt=2),
  center = c(100, 0))
# polygon
a <- polygon(list(c(100.001, 0.001), c(101.12345, 0.001), c(101.001, 1.001),
  c(100.001, 0.001)))
wktview(a, center = c(100, 0))
wktview(a, center = c(100.5, 0), zoom=9)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.