add_geojson: Add vector layer to the map

Description Usage Arguments Examples

Description

Add vector layer to the map

Usage

1
2
add_geojson(ol, data = NULL, filename = NULL, style = NULL,
  popup = NULL, options = layer_options())

Arguments

ol

map widget

data

geojson, ignored if filename is given

filename

filename or url to read geojson from

style

style object or NULL (use default style)

popup

popup texts

options

general layer options, see layer_options

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  require("geojsonio")

  geojson <- geojson_json(us_cities[1:10, ])

  ol() %>%
    add_geojson(geojson)

## End(Not run)

crazycapivara/openlayersr documentation built on June 4, 2019, 8:08 p.m.