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

做企业网站设计与实现怎么做门户网站

做企业网站设计与实现,怎么做门户网站,汽车网站代码,兰州网络推广方向官网demo地址#xff1a; LineString Arrows 这篇介绍了在地图上绘制箭头。 创建一个矢量数据源#xff0c;将其绑定为draw的数据源并展示在矢量图层上。 const source new VectorSource();const vector new VectorLayer({source: source,style: styleFunction,});map.ad… 官网demo地址 LineString Arrows  这篇介绍了在地图上绘制箭头。 创建一个矢量数据源将其绑定为draw的数据源并展示在矢量图层上。 const source new VectorSource();const vector new VectorLayer({source: source,style: styleFunction,});map.addInteraction(new Draw({source: source,type: LineString,})); 绘制直线时通过style函数将直线的末端添加箭头图标。通过forEachSegment 函数拿到箭头的起点和终点坐标使用 Math.atan2计算出箭头图标的旋转角度。  const styleFunction function (feature) {const geometry feature.getGeometry();const styles [new Style({stroke: new Stroke({color: #ffcc33,width:2,}),}),];geometry.forEachSegment(function (start, end) {const dx end[0] - start[0];const dy end[1] - start[1];const rotation Math.atan2(dy, dx);styles.push(new Style({geometry: new Point(end),image: new Icon({src: https://openlayers.org/en/latest/examples/data/arrow.png,anchor: [0.75, 0.5],rotateWithView: true,rotation: -rotation,}),}));});return styles;}; 完整代码 templatediv classboxh1LineString Arrows/h1div idmap classmap/div/div /templatescript import StadiaMaps from ol/source/StadiaMaps.js; import Draw from ol/interaction/Draw.js; import Map from ol/Map.js; import Point from ol/geom/Point.js; import View from ol/View.js; import { Icon, Stroke, Style } from ol/style.js; import { OSM, Vector as VectorSource } from ol/source.js; import { Tile as TileLayer, Vector as VectorLayer } from ol/layer.js; import { get } from ol/proj.js; export default {name: ,components: {},data() {return {map: null,};},computed: {},created() {},mounted() {const layer new TileLayer({source: new StadiaMaps({layer: stamen_terrain_background,}),});const source new VectorSource();const styleFunction function (feature) {const geometry feature.getGeometry();const styles [new Style({stroke: new Stroke({color: #ffcc33,width:2,}),}),];geometry.forEachSegment(function (start, end) {const dx end[0] - start[0];const dy end[1] - start[1];const rotation Math.atan2(dy, dx);styles.push(new Style({geometry: new Point(end),image: new Icon({src: https://openlayers.org/en/latest/examples/data/arrow.png,anchor: [0.75, 0.5],rotateWithView: true,rotation: -rotation,}),}));});return styles;};const vector new VectorLayer({source: source,style: styleFunction,});const extent get(EPSG:3857).getExtent().slice();extent[0] extent[0];extent[2] extent[2];const map new Map({layers: [layer, vector],target: map,view: new View({center: [-11000000, 4600000],zoom: 4,extent,}),});map.addInteraction(new Draw({source: source,type: LineString,}));},methods: {}, }; /scriptstyle langscss scoped #map {width: 100%;height: 500px; } .box {height: 100%; }/style
http://www.hkea.cn/news/14526738/

相关文章:

  • 手机免费建站系统福建设计院网站
  • 珠海正规网站制作哪家好网站开发技术公司
  • 招聘网站制作网站建设公司行情
  • 设计师搜图网站可以做问卷的网站有哪些
  • 融水县建设局网站为什么做电影网站没有流量吗
  • 淘宝联盟填网站备案湖北网站建设找哪家
  • 佳木斯建设局网站简易的小企业网站建设
  • 宁波网站建设zj95一键识图找原图
  • 泉州建站服务多用户商城系统开发哪家好
  • 广州制作网站公司哪家好视频网站开发公司有哪些公司
  • 网站建设公司画册购买一个网站空间如何可以多个域名使用吗
  • 福州闽侯网站建设一起做网店17普宁池尾
  • 龙岩有什么招聘本地网站网站设计学习
  • 网站建设课程简介图片大站网站建设
  • 济南企业网站制作网站点击量在哪里看
  • 长春火车站位置外汇申报在哪个网站上做
  • 企业网站建设 企业官网定制国内10大搜索引擎
  • 代点任意广告链接网站一个公司可以做几个网站吗
  • 下好的字体怎么导入wordpress快速优化seo软件推广方法
  • 武城网站建设电话codeus企业wordpress
  • 公司设计一个网站艺腾青岛网站建设
  • 高端网站制作乐是WordPress任务发布插件
  • 金融理财网站源码整合营销推广策略
  • 山西汽车网站建设html网页wordpress
  • php如何给网站做支付接口阿里巴巴可以做公司网站吗
  • 晋州住房保障建设局网站网站网络建设
  • 海外网站导航网站建设一点通
  • 搭建企业网站流程柒零叁网站建设
  • 网站建设图文片做网站字体规范
  • 天猫官方网站首页网站开发保密协议范本