文章分类 -  openlayers

摘要:addPoints(coordinates) { const that = this; that.featuresArr.length = 0; // 设置图层 var vectorSource = new ol.source.Vector({});//Source that.pointLayer 阅读全文
posted @ 2022-09-28 10:24 小林222 阅读(35) 评论(0) 推荐(0)
摘要:.setZindex() 阅读全文
posted @ 2022-09-16 16:10 小林222 阅读(14) 评论(0) 推荐(0)
摘要:BasinDb.setVisible(false);//图层隐藏 阅读全文
posted @ 2022-08-23 11:23 小林222 阅读(26) 评论(0) 推荐(0)
摘要://删除图层function del_layer(id) { map.getLayers().forEach(function (lyr) { if (id == lyr.get('id')) { map.removeLayer(lyr) } });} 阅读全文
posted @ 2022-08-23 11:04 小林222 阅读(72) 评论(0) 推荐(0)
摘要:1、 function init_ActualSituation() { var dians=static_DataBrowsing; console.info(dians) var vectorSource = new ol.source.Vector({}); //画点(画等值面点) for(v 阅读全文
posted @ 2022-08-23 11:03 小林222 阅读(39) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/pangqiuchou/p/12867203.html 阅读全文
posted @ 2022-08-19 16:25 小林222 阅读(22) 评论(0) 推荐(0)
摘要:https://home.cnblogs.com/u/pangqiuchou/ 阅读全文
posted @ 2022-08-19 16:14 小林222 阅读(10) 评论(0) 推荐(0)
摘要:var feature = new ol.Feature({ geometry: new ol.geom.Polygon([brr]), data: _data[i], name: _name,});feature.setStyle(color)source.addFeature(feature) 阅读全文
posted @ 2022-08-18 16:57 小林222 阅读(402) 评论(0) 推荐(0)
摘要:that.StaticMap.NewMap.removeLayer(that.BasinDb) 阅读全文
posted @ 2022-07-26 23:36 小林222 阅读(40) 评论(0) 推荐(0)
摘要:function SetLayerIndex(layer,index,type) { var that=this; //中间数据 let middle=null; let middle_index=null; /*调试代码 * 1、添加灰度图层的时候记得加一句灰度图.setZIndex(that.G 阅读全文
posted @ 2022-07-26 23:32 小林222 阅读(116) 评论(0) 推荐(0)
摘要:<template> <div id="PlanMap"> <!-- 这里是计划里面的地图页面 --> <div id="map" class="openLayer"></div> <!-- 右侧图标 --> <div class="control-div"> <div><i class="icon 阅读全文
posted @ 2022-07-26 15:26 小林222 阅读(40) 评论(0) 推荐(0)
摘要:layer.getSource().addFeature(feature);// 阅读全文
posted @ 2022-07-15 11:29 小林222 阅读(104) 评论(0) 推荐(0)
摘要://画集雨区function painting_CatchmentAreaDb() { var arr = [] shapefile.open(lin_url+static_SysSettings.CatchmentAreaDb) .then(source => source.read() .the 阅读全文
posted @ 2022-07-15 11:01 小林222 阅读(125) 评论(0) 推荐(0)
摘要:map.on('click', function (evt) { var pixel5 = map.getEventPixel(evt.originalEvent); is_pixel=pixel5; var f= map.forEachFeatureAtPixel(pixel5,function( 阅读全文
posted @ 2022-07-15 10:37 小林222 阅读(657) 评论(0) 推荐(0)
摘要:map.on('pointermove', function (evt) { var pixel5 = map.getEventPixel(evt.originalEvent); // //console.info(pixel5) is_pixel=pixel5; var f= map.forEac 阅读全文
posted @ 2022-07-15 10:25 小林222 阅读(204) 评论(0) 推荐(0)
摘要:var line_source = new ol.source.Vector({ features: []});for (var i = 0; i < _data.length; i++) { var _line = new ol.Feature({ geometry: new ol.geom.Li 阅读全文
posted @ 2022-07-15 00:18 小林222 阅读(28) 评论(0) 推荐(0)
摘要:var imgstatic = new ol.source.ImageStatic({ url: _url, projection: 'EPSG:3857', crossOrigin: '', imageExtent: ol.proj.transformExtent([_scope[0], _sco 阅读全文
posted @ 2022-07-15 00:11 小林222 阅读(90) 评论(0) 推荐(0)
摘要:var source = new ol.source.Vector({ features: []});var Layer = [];Layer = new ol.layer.Vector( { id: _id, source: source, });_map.addLayer(Layer);var 阅读全文
posted @ 2022-07-15 00:10 小林222 阅读(201) 评论(0) 推荐(0)
摘要://新建一个图层var source = new ol.source.Vector({ features: []});var Layer=[];Layer = new ol.layer.Vector( { id:data[0].id, source: source, });that.mymap.ma 阅读全文
posted @ 2022-07-15 00:07 小林222 阅读(31) 评论(0) 推荐(0)
摘要:/** 图层插队* 参数1:要插队的图层layer* 参数2:插队在谁之后图层的id* 用法:that.StaticMap.LayerJump(layer,'id')* */function LayerJump(layer,fatherid) { var that=this; that.NewMap 阅读全文
posted @ 2022-07-15 00:05 小林222 阅读(21) 评论(0) 推荐(0)