Sources state which data the map should display. To show the data on the map you need to bind a source to a layer which contains the styling details like color or width. This makes it possible to style the same source in different ways. The easiest way to create a source from an R data object is to use . Supported structures are sf-objects and data frames that contain longitudes and latitudes:
With the parameter you can pass additional options to the source:
See the Sources API Reference for available options for the used source type. Sources are either passed to the functions or as first parameter to setting it as default source. With you can add a source to the map that you refer to in the layer definition by its ID.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论