openlayers--点位、边界样式设置
摘要://创建中心点文字样式createPointStyle(feature) { return new ol.style.Style({ text: new ol.style.Text({ //位置 textAlign: 'center', //基准线 textBaseline: 'middle', /
阅读全文
posted @
2023-01-30 19:39
kaookiee
阅读(1546)
推荐(0) 编辑
openlayers--添加数据源
摘要:调用地图服务接口后,对接口返回值做处理--添加数据源 if(res.features.length) {//获取--根据行政区代码查询对应行政区的中心点 let lons = res.features[0].properties.LON; let lats = res.features[0].pro
阅读全文
posted @
2023-01-30 19:33
kaookiee
阅读(125)
推荐(0) 编辑
openlayers图层创建
摘要:创建图层 addVectorLayers(features,type) { //参数 features==接口获取的点位 let that=this; //实例化一个矢量图层Vector作为绘制层 //vectorSource 普通数据源 this.vectorSource = new ol.sou
阅读全文
posted @
2023-01-30 19:24
kaookiee
阅读(268)
推荐(0) 编辑