Openlayers简单要素的添加(Openlayers simple feature addition)

1. geojson数据:https://blog.csdn.net/weixin_38307752/article/details/84112566

2. 简单要素的添加:https://blog.csdn.net/xcymorningsun/article/details/83409568

二、简单要素点线面的添加

1、创建feature

2、创建style,添加source、style到layer

3、添加layer到map

通过WFS服务获取geojson数据,然后将整个geojson数据加载到vectorlayer图层中去,不过这种方法有个缺点就是不能实现自定义加载各种数据。如果需要对geojson数据中的属性进行修改添加的时候不容易控制(这在以后为每个feature在地图上同时添加气泡框功能有帮助),然后有了这篇文章。

1、创建feature

>>参考:esri-leaflet:

————————

1. geojson数据:https://blog.csdn.net/weixin_38307752/article/details/84112566

2. 简单要素的添加:https://blog.csdn.net/xcymorningsun/article/details/83409568

2、 Addition of simple feature points, lines and faces

1. Create feature

2. Create a style and add source and style to layer

3. Add layer to map

Get the geojson data through WFS service, and then load the whole geojson data into the vectorlayer layer layer. However, this method has a disadvantage that it can not load all kinds of data customized. If you need to modify the attributes in the geojson data, it is not easy to control the addition (which is helpful to add bubble boxes on the map for each feature in the future), and then this article is available.

1. Create feature

>& gt; Reference: ESRI leaflet: