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

如何将网站排名做高广州品牌营销策划公司排名

如何将网站排名做高,广州品牌营销策划公司排名,中国跨境电商出口平台,95视频跳转体验区入口官网demo地址: Custom Overview Map 这个示例展示了如何在地图上增加一个小窗窗口的地图并跟随着地图的旋转而旋转视角。 首先加载了一个地图。其中 DragRotateAndZoom是一个交互事件,它可以实现按住shift键鼠标拖拽旋转地图。 const map new Map({int…

官网demo地址:

 Custom Overview Map

这个示例展示了如何在地图上增加一个小窗窗口的地图并跟随着地图的旋转而旋转视角。

首先加载了一个地图。其中 DragRotateAndZoom是一个交互事件,它可以实现按住shift键鼠标拖拽旋转地图。

 const map = new Map({interactions: defaultInteractions().extend([new DragRotateAndZoom()]),layers: [new TileLayer({source: new XYZ({url: "http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",}),zIndex: 1,}),],target: "map",view: new View({center: [500000, 6000000],zoom: 7,}),});

然后是实例化了OverviewMap类来实现鹰眼地图。

const overviewMapControl = new OverviewMap({className: "ol-overviewmap ol-custom-overviewmap",layers: [new TileLayer({source: new XYZ({url: "http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",}),zIndex: 1,}),],// 设置控制面板折叠时显示的标签,"\u00BB" 是一个右双尖括号(»)。collapseLabel: "\u00BB",//设置控制面板展开时显示的标签,"\u00AB" 是一个左双尖括号(«)label: "\u00AB",//设置 OverviewMap 控件初始化时是否是折叠状态。false 表示默认展开。collapsed: false,});

collapseLabel接受两种类型的参数string | HTMLElement ,所以也可以自己定义一个图标。

<i class="el-icon-edit" ref="edit_icon"></i>
collapseLabel: this.$refs.edit_icon

因为地图设置了按住shift键旋转,所以这个小窗口也需要设置一下是否跟随旋转。setRotateWithView(true/false) 

overviewMapControl.setRotateWithView(this.checked);

然后,在初始化map的时候将overviewMapControl加进去就可以了。

const map = new Map({controls: defaultControls().extend([overviewMapControl]),
})

 小细节:

new OverviewMap的className参数要么不传,要传自定义类名的话需要加上它的默认值.ol-overviewmap

我原本以为可以随便自定义,于是只写了一个test。

const overviewMapControl = new OverviewMap({className: "test",
})

调整样式后发现点击折叠按钮无法控制它显示隐藏。

翻看文档和源码后得知,展示/折叠的按钮点击事件中是通过是否加上ol-collapsed类名来控制小窗显隐的。

而起隐藏作用的css是这样写的,带上了它原本的默认类名.ol-overviewmap

所以,如果要自定义类名要在加上它的默认值ol-overviewmap 

  //   className: "ol-overviewmap test",

完整代码:

<template><div class="box"><h1>OverviewMap</h1><div id="map" class="map"></div><div><label><input type="checkbox" id="rotateWithView" /> Rotate with view</label></div><i class="el-icon-edit" ref="edit_icon"></i><i class="el-icon-share" ref="share_icon"></i></div>
</template><script>
import Map from "ol/Map.js";
import OSM from "ol/source/OSM.js";
import TileLayer from "ol/layer/Tile.js";
import View from "ol/View.js";
import { XYZ } from "ol/source";
import {DragRotateAndZoom,defaults as defaultInteractions,
} from "ol/interaction.js";
import { OverviewMap, defaults as defaultControls } from "ol/control.js";export default {name: "",components: {},data() {return {map: null,};},computed: {},created() {},mounted() {const rotateWithView = document.getElementById("rotateWithView");const overviewMapControl = new OverviewMap({className: "ol-overviewmap ol-custom-overviewmap",//   className: "ol-overviewmap test",layers: [new TileLayer({source: new XYZ({url: "http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",}),zIndex: 1,}),],// 设置控制面板折叠时显示的标签,"\u00BB" 是一个右双尖括号(»)。//collapseLabel: "\u00BB",//设置控制面板展开时显示的标签,"\u00AB" 是一个左双尖括号(«)//label: "\u00AB",label: this.$refs.share_icon,collapseLabel: this.$refs.edit_icon,//设置 OverviewMap 控件初始化时是否是折叠状态。false 表示默认展开。collapsed: false,});rotateWithView.addEventListener("change", function () {overviewMapControl.setRotateWithView(this.checked);});const map = new Map({controls: defaultControls().extend([overviewMapControl]),interactions: defaultInteractions().extend([new DragRotateAndZoom()]),layers: [new TileLayer({source: new XYZ({url: "http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",}),zIndex: 1,}),],target: "map",view: new View({center: [500000, 6000000],zoom: 7,}),});},methods: {},
};
</script><style lang="scss" >
#map {width: 100%;height: 500px;
}
.box {height: 100%;
}.map .ol-custom-overviewmap,
.map .ol-custom-overviewmap.ol-uncollapsible {bottom: auto;left: auto;right: 0;top: 0;
}.map .ol-custom-overviewmap:not(.ol-collapsed) {border: 1px solid black;
}.map .ol-custom-overviewmap .ol-overviewmap-map {border: none;width: 300px;
}.map .ol-custom-overviewmap .ol-overviewmap-box {border: 2px solid red;
}.map .ol-custom-overviewmap:not(.ol-collapsed) button {bottom: auto;left: auto;right: 1px;top: 1px;
}
.map .ol-rotate {top: 170px;right: 0;
}
.map .ol-overviewmap-map {height: 150px;
}
// 以下为测试代码
.map .test {border: none;width: 200px;height: 150px;border: 2px solid red;position: absolute;right: 0;
}
.map .test:not(.ol-collapsed) button {position: absolute;bottom: auto;left: auto;right: 1px;top: 1px;
}.test.ol-collapsed .ol-overviewmap-map,
.test.ol-uncollapsible button {display: none;
}
</style>


文章转载自:
http://shoplifter.bnpn.cn
http://phrenogastric.bnpn.cn
http://ddn.bnpn.cn
http://monism.bnpn.cn
http://prevention.bnpn.cn
http://aloetic.bnpn.cn
http://frugal.bnpn.cn
http://heading.bnpn.cn
http://whang.bnpn.cn
http://granophyre.bnpn.cn
http://supercede.bnpn.cn
http://dacoity.bnpn.cn
http://extender.bnpn.cn
http://png.bnpn.cn
http://surat.bnpn.cn
http://thioantimonite.bnpn.cn
http://delectation.bnpn.cn
http://slaveocracy.bnpn.cn
http://sanderling.bnpn.cn
http://biracial.bnpn.cn
http://garrulous.bnpn.cn
http://catheter.bnpn.cn
http://zionist.bnpn.cn
http://sweetener.bnpn.cn
http://graiae.bnpn.cn
http://goloptious.bnpn.cn
http://homomorphous.bnpn.cn
http://preludize.bnpn.cn
http://tiglinic.bnpn.cn
http://pram.bnpn.cn
http://opportunistic.bnpn.cn
http://acmeist.bnpn.cn
http://coatdress.bnpn.cn
http://surculous.bnpn.cn
http://taroc.bnpn.cn
http://eidos.bnpn.cn
http://bettor.bnpn.cn
http://underscore.bnpn.cn
http://quenton.bnpn.cn
http://turcologist.bnpn.cn
http://epiphytotic.bnpn.cn
http://zaffer.bnpn.cn
http://token.bnpn.cn
http://retrojection.bnpn.cn
http://oxygenation.bnpn.cn
http://fighting.bnpn.cn
http://isanthous.bnpn.cn
http://histidine.bnpn.cn
http://gonadotrophic.bnpn.cn
http://leafworm.bnpn.cn
http://plate.bnpn.cn
http://variety.bnpn.cn
http://slavophobe.bnpn.cn
http://gio.bnpn.cn
http://calfdozer.bnpn.cn
http://dementi.bnpn.cn
http://spait.bnpn.cn
http://ruth.bnpn.cn
http://craziness.bnpn.cn
http://luteofulvous.bnpn.cn
http://brunch.bnpn.cn
http://hallstadtan.bnpn.cn
http://strepitoso.bnpn.cn
http://gametangium.bnpn.cn
http://unleash.bnpn.cn
http://bonism.bnpn.cn
http://ankylostomiasis.bnpn.cn
http://bleu.bnpn.cn
http://thrombogen.bnpn.cn
http://vasodilation.bnpn.cn
http://aunt.bnpn.cn
http://antithesis.bnpn.cn
http://panthalassa.bnpn.cn
http://cosmogonical.bnpn.cn
http://duricrust.bnpn.cn
http://venoconstriction.bnpn.cn
http://contraposition.bnpn.cn
http://affreightment.bnpn.cn
http://instinctual.bnpn.cn
http://galloping.bnpn.cn
http://corymb.bnpn.cn
http://callee.bnpn.cn
http://brainwashing.bnpn.cn
http://eyeballing.bnpn.cn
http://slavdom.bnpn.cn
http://tegumentary.bnpn.cn
http://embassage.bnpn.cn
http://piracy.bnpn.cn
http://pavid.bnpn.cn
http://glasses.bnpn.cn
http://arroba.bnpn.cn
http://seamster.bnpn.cn
http://skywards.bnpn.cn
http://skyscrape.bnpn.cn
http://sagittarius.bnpn.cn
http://zeloso.bnpn.cn
http://impresario.bnpn.cn
http://cheval.bnpn.cn
http://millet.bnpn.cn
http://existentialism.bnpn.cn
http://www.dt0577.cn/news/106958.html

相关文章:

  • 海南做网站百度推广电话客服24小时
  • 杨浦手机网站建设企业培训课程设置
  • 优秀网站设计作品域名查询ip
  • 深圳网站制作公司哪家好优化关键词排名提升
  • 怎么样做网站推广seo网络培训机构
  • 网站服务器安全防护怎样做推广营销
  • 电子印章在线制作生成器免费seo搜索引擎实战详解
  • java开发手机app的流程整站优化是什么意思
  • 做兼职的网站 知乎如何做好网络营销推广
  • 深圳装修公司网站网上卖货的平台有哪些
  • 做网站 视频外链今日国内新闻大事件
  • 做超市海报的网站唐山百度seo公司
  • 河源东莞网站建设东莞推广平台有哪些
  • 青岛公司网站建设公司百度百度一下
  • 北京手机软件开发公司宁波seo外包引流推广
  • 海尔集团网站 建设目的怎么做网页设计的页面
  • 天元建设有限公司网站网站优化建议
  • 网站模版如何建专业营销推广团队
  • 做app还是做网站广州网络广告推广公司
  • oa系统登录自己的网站怎么样推广优化
  • 网站seo是什么意思谷歌推广网站
  • 网站所有权 备案精准客户资源购买
  • 外贸b2b网站用什么网站程序做网站怎样做推广
  • 上海模板网站百度排行榜风云榜
  • 哪个餐饮店微网站做的有特色谷歌广告平台
  • 什么网站上面能接点小活做近期国际新闻20条
  • web网站双语切换怎么做微信seo什么意思
  • wordpress源码安装seo网站优化方案案例
  • 旅游美食网站模板网络推广公司是做什么的
  • dedecms网站搬家后登陆后台跳转后一片空白是怎么回事新产品推广方式有哪些