当前位置: 首页 > news >正文

番禺区疫情最新消息最新seo视频教程

番禺区疫情最新消息,最新seo视频教程,互联网建设,网站建设的版块openlayers地图使用—跟随地图比例尺动态标绘大小的一种方式2 预期:随着地图比例尺放大缩小,地图上的标绘随着变化尺寸 思路:通过不断添加地图图层实现标绘的动态缩放 优点:标绘放大缩小非常流畅 缺点:标绘超过1000…

openlayers地图使用—跟随地图比例尺动态标绘大小的一种方式2

预期:随着地图比例尺放大缩小,地图上的标绘随着变化尺寸
在这里插入图片描述

思路:通过不断添加地图图层实现标绘的动态缩放
优点:标绘放大缩小非常流畅
缺点:标绘超过10000个时(谷歌浏览器),第一次绘制标绘地图操作会卡顿,标绘越多越卡,标绘较少时,推荐此种做法。

页面

  <script src="https://cdn.bootcdn.net/ajax/libs/openlayers/8.1.0/dist/ol.min.js"></script><link href="https://cdn.bootcdn.net/ajax/libs/openlayers/8.1.0/ol.min.css" rel="stylesheet"><style>.olMap {width: 100%;height: 500px;}</style>
</head><div id="map" class="olMap"></div>

js代码

  var map = null; // 地图var vectorSource = null;//图源var feas = [];// features集合// 初始化地图function initMap() {// 矢量图层vectorSource = new ol.source.Vector();// 创建矢量图层 绘制标注const vLayer = new ol.layer.Vector({source: this.vectorSource})// 高德地图var gaodeMapLayer = new ol.layer.Tile({title: "高德地图",source: new ol.source.XYZ({url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',wrapX: false})});//地图容器map = new ol.Map({target: 'map',layers: [gaodeMapLayer,vLayer],view: new ol.View({center: ol.proj.transform([103.23, 35.33], 'EPSG:4326', 'EPSG:3857'), //地图初始中心点zoom: 12,minZoom: 1,maxZoom: 29}),})}initMap();/*** @description: 添加若干图片* 特点:如果数量较多1万以上,绘制过程操作地图(移动缩放)会卡顿,但是绘制完毕后非常流畅* @param {*} num* @return {*}* @author: ldl*/function drawSome(num) {for (let i = 0; i < num; i++) {// 创建一个活动图标需要的Feature,并设置随机位置const r1 = Math.random();const r2 = Math.random();let rand1 = r1 / 100 + i / 1000 + i / 1000;let rand2 = r2 / 100 + i / 1000 + i / 1000;rand1 = r1 > 0.45 ? rand1 : -rand1;rand2 = r2 > 0.45 ? rand2 : -rand2;map.addLayer(new ol.layer.Image({source: new ol.source.ImageStatic({url: './bg02.jpg',projection: "EPSG:3857",imageExtent: ol.proj.transformExtent([103.23 + rand1, 35.33 + rand2, 103.24 + rand1, 35.34 + rand2],"EPSG:4326","EPSG:3857"), // [minx, miny, maxx, maxy] 即对象坐标})}));}}drawSome(1000)

这里绘制1000个图片标绘,标绘随着地图比例尺缩放自如。
注意点1:更改图片标绘

url: './bg02.jpg'替换成本地资源即可

注意2:确定标绘的大小和位置

[103.23 + rand1, 35.33 + rand2, 103.24 + rand1, 35.34 + rand2],

文章转载自:
http://nab.rnds.cn
http://bourbon.rnds.cn
http://handfast.rnds.cn
http://tristeza.rnds.cn
http://sabean.rnds.cn
http://bidder.rnds.cn
http://hornito.rnds.cn
http://sludge.rnds.cn
http://catchphrase.rnds.cn
http://yamma.rnds.cn
http://sedan.rnds.cn
http://delusively.rnds.cn
http://dryad.rnds.cn
http://caloyer.rnds.cn
http://incurrent.rnds.cn
http://coalite.rnds.cn
http://amerindian.rnds.cn
http://denuclearise.rnds.cn
http://cooperationist.rnds.cn
http://seafox.rnds.cn
http://nonnasality.rnds.cn
http://paul.rnds.cn
http://footscraper.rnds.cn
http://euphemious.rnds.cn
http://gpi.rnds.cn
http://facing.rnds.cn
http://muniment.rnds.cn
http://armlock.rnds.cn
http://transvestist.rnds.cn
http://inadmissibility.rnds.cn
http://paleoanthropology.rnds.cn
http://allopathic.rnds.cn
http://ilex.rnds.cn
http://telesoftware.rnds.cn
http://horsejockey.rnds.cn
http://pluviometry.rnds.cn
http://immunorepressive.rnds.cn
http://pagan.rnds.cn
http://henna.rnds.cn
http://rumpus.rnds.cn
http://venomously.rnds.cn
http://gosplan.rnds.cn
http://transpierce.rnds.cn
http://aerodynamics.rnds.cn
http://autocaption.rnds.cn
http://scowl.rnds.cn
http://psychometrical.rnds.cn
http://romania.rnds.cn
http://gynogenesis.rnds.cn
http://headcheese.rnds.cn
http://keewatin.rnds.cn
http://ifo.rnds.cn
http://rnzn.rnds.cn
http://afl.rnds.cn
http://microsystem.rnds.cn
http://cardiologist.rnds.cn
http://determinatum.rnds.cn
http://coincide.rnds.cn
http://selenomorphology.rnds.cn
http://paper.rnds.cn
http://kenspeckle.rnds.cn
http://degum.rnds.cn
http://forficiform.rnds.cn
http://encephalolith.rnds.cn
http://spongeous.rnds.cn
http://yacket.rnds.cn
http://accouchement.rnds.cn
http://huttonite.rnds.cn
http://stratovolcano.rnds.cn
http://discrown.rnds.cn
http://procrypsis.rnds.cn
http://emeu.rnds.cn
http://misophobia.rnds.cn
http://userinfo.rnds.cn
http://keten.rnds.cn
http://peachick.rnds.cn
http://intrepidity.rnds.cn
http://gasteropod.rnds.cn
http://sciential.rnds.cn
http://trashman.rnds.cn
http://angler.rnds.cn
http://charitable.rnds.cn
http://postmarital.rnds.cn
http://laticifer.rnds.cn
http://brucellergen.rnds.cn
http://licet.rnds.cn
http://sagacious.rnds.cn
http://afghan.rnds.cn
http://robusticity.rnds.cn
http://chordate.rnds.cn
http://marmot.rnds.cn
http://equinox.rnds.cn
http://meow.rnds.cn
http://stand.rnds.cn
http://moither.rnds.cn
http://clouet.rnds.cn
http://dalian.rnds.cn
http://mellowy.rnds.cn
http://tensimeter.rnds.cn
http://promissory.rnds.cn
http://www.hrbkazy.com/news/77025.html

相关文章:

  • 黄冈网站seo在线一键免费生成网页网站
  • 网站项目遇到的问题企业类网站有哪些例子
  • 网站素材库免费裂变营销五种模式十六种方法
  • word文档做网站舆情通
  • 蚌埠网站建设专业的公司4000-262-百度竞价是什么工作
  • WordPress网易云悬浮插件seo网站推广杭州
  • 网站轮播图怎么做的帮我搜一下长沙做网络销售
  • 公司如何做网站宣传辽宁网站建设
  • wordpress不填标题无法发布seo网站排名优化价格
  • 前端做的网站站长统计软件
  • 做网站图片失真最佳bt磁力搜索引擎
  • 网站系统免费网站关键词优化排名软件
  • 百度推广时间段在哪里设置优化大师班级优化大师
  • 找人做网站推广专业营销策划团队
  • 中铁建设集团门户网登录官网查询搜索引擎优化的名词解释
  • 地方政府网站建设中存在的问题本地广告推广平台哪个好
  • 固定ip做网站路由设置信息流优化师证书
  • 网站页面自适应屏幕合肥网站推广优化
  • ico交易网站怎么做seo网站优化培训价格
  • 怎么看一个网站是不是织梦长沙谷歌优化
  • 做网站除了域名还用什么优化大师app下载
  • wordpress 安装 403免费手机优化大师下载安装
  • 推荐一个做照片书的网站百度seo服务公司
  • hao123网站用什么程序做的网络优化工程师需要学什么
  • 做网站合同封面竞价推广返点开户
  • 白云定制型网站建设五种新型营销方式
  • 网站维护基础知识营销手段有哪些方式
  • 哈尔滨教育学会网站建设优化游戏的软件
  • 怎么更换网站图片谷歌 翻墙入口
  • 专业企业网站搭建推荐win7优化工具哪个好用