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

苹果钓鱼网站怎么做今日国际新闻头条新闻

苹果钓鱼网站怎么做,今日国际新闻头条新闻,武汉网站建设德升,电脑做网站服务器需要什么上次是在地图上打点 这次鼠标移动在图标上面显示相关的信息 首先有两个事件 鼠标移入 和 鼠标移出事件 pointermove pointerout 鼠标放上去之前 放上去后 代码如下 <template><div class"container"><div id"vue-openlayers" class&quo…

上次是在地图上打点 这次鼠标移动在图标上面显示相关的信息
首先有两个事件 鼠标移入 和 鼠标移出事件
pointermove pointerout

鼠标放上去之前
在这里插入图片描述
放上去后
在这里插入图片描述
代码如下

<template><div class="container"><div id="vue-openlayers" class="map-x"></div><divid="info-box"class="info-box"style="width: 100px; height: 100px"></div><div id="canv" style="width: 100px; height: 100px"></div></div>
</template>
<script>
import "ol/ol.css";
import { Map, View, style, Feature, geom, Overlay } from "ol";
import TileLayer from "ol/layer/Tile";
import XYZ from "ol/source/XYZ";
import { Vector as VectorSource } from "ol/source";
import VectorLayer from "ol/layer/Vector";
import { Point, LineString } from "ol/geom";
import { Style, Icon, Stroke, Text, Fill } from "ol/style";
import logo from "@/assets/logo.png";
import s40s from "@/assets/img/404.png";
import * as ol from "ol";
import "ol-ext/dist/ol-ext.css";export default {name: "FirstMap",data() {return {map: null,draw: null,maskLayer: null,logo,s40s,layers: [],};},methods: {initMap() {let that = this;// 将图标样式应用到点要素const features = [];const point = new Point([108.56, 34.15]); // 修改坐标格式const feature = new Feature({geometry: point,custom: { data: "123", type: "icon" },type: "icon",});feature.setStyle([new Style({image: new Icon({crossOrigin: "anonymous",src: this.logo,// size: [40, 40],scale: 0.2, // 图标缩放比例}),}),]);features.push(feature);//设置地图的数据源const source = new VectorSource({features,});let markLayerPoints = new VectorLayer({source: source,});let map = new Map({target: "vue-openlayers",layers: [new TileLayer({source: new XYZ({url: "https://gdtc.shipxy.com/tile.g?l=en&m=d&z={z}&x={x}&y={y}",}),}),markLayerPoints, // 确保图层顺序正确// vectorLayers,],view: new View({projection: "EPSG:4326",center: [108.56, 34.15], // 修改中心坐标格式zoom: 6,}),});this.map = map;// 定义变量来跟踪是否鼠标悬停在图标上var infoBox = document.getElementById("info-box");let pointFeatures;var iconStyleDefault = new Style({image: new Icon({src: this.logo, // 图标图片的路径crossOrigin: "anonymous",scale: 0.2, // 图标缩放比例}),});map.on("pointermove", function (event) {if (pointFeatures) {infoBox.style.display = "none"; // 隐藏信息盒子pointFeatures.setStyle(iconStyleDefault);}map.forEachFeatureAtPixel(event.pixel, function (feature) {console.log("进入11111111111111111111");// 这里 feature 就是当前悬停的要素if (feature.values_.type == "icon") {var coord = feature.getGeometry().getCoordinates(); //地理坐标,也就是经纬度var pixel = map.getPixelFromCoordinate(coord); //像素是屏幕上的位置   像素坐标pointFeatures = feature; // 当前的图层// 设置文本样式,显示在图标旁边var textStyle = new Text({text: "文本", // 要显示的文本font: "14px sans-serif", // 字体样式fill: new Fill({color: "black", // 文本颜色}),stroke: new Stroke({color: "white", // 文本轮廓颜色,使文本更突出width: 2,}),// 将文本底部对齐到点的坐标位置textBaseline: "bottom",// 根据需要调整文本的水平对齐方式,'center' 表示文本居中对齐textAlign: "center",});var iconStyleHover1 = new Style({image: new Icon({src: that.s40s, // 图标图片的路径crossOrigin: "anonymous",// anchor: [0.5, 46], // 图标锚点,相对于图标大小的百分比scale: 0.2, // 图标缩放比例textBaseline: "top",}),text: textStyle,});pointFeatures.setStyle(iconStyleHover1);console.log(infoBox, "infoBoxinfoBox");infoBox.style.display = "block"; // 显示信息盒子infoBox.style.left = pixel[0] + 10 + "px"; // 设置信息盒子位置infoBox.style.top = pixel[1] - 5 - infoBox.offsetHeight + "px"; // 防止信息盒子被图标遮挡infoBox.innerHTML = "这里是信息+" + feature.values_.custom.data; // 设置信息盒子内容'; // 设置信息盒子内容}});});// 添加鼠标离开图层监听器markLayerPoints.on("pointerout", function (event) {if (pointFeatures) {pointFeatures.setStyle(iconStyleDefault);pointFeatures = null;infoBox.style.display = "none"; // 隐藏信息盒子}});},
},mounted() {this.initMap();},
};
</script>
<style scoped lang="scss">
.input {position: fixed;top: 10px;right: 10px;border-radius: 10px;background: #fff;display: flex;flex-direction: column;padding: 5px;padding-bottom: 10px;> * {margin-top: 10px;display: flex;align-items: center;}
}
</style><style scoped lang="scss">
.container {position: relative;.btn {position: absolute;left: 4%;top: 1%;}
}#vue-openlayers {width: 100vw;height: 100vh;
}h3 {line-height: 40px;
}/* 隐藏信息盒子的初始样式 */
#info-box {display: none;position: absolute;background: white;border: 1px solid black;padding: 10px;border-radius: 5px;font-size: 14px;pointer-events: none; /* 防止信息盒子影响鼠标事件 */
}
</style>

文章转载自:
http://regentship.rwzc.cn
http://sonicate.rwzc.cn
http://spifflicate.rwzc.cn
http://cense.rwzc.cn
http://lottery.rwzc.cn
http://drunkard.rwzc.cn
http://intersection.rwzc.cn
http://spiroid.rwzc.cn
http://viscoelastic.rwzc.cn
http://village.rwzc.cn
http://yinchuan.rwzc.cn
http://assumingly.rwzc.cn
http://traveled.rwzc.cn
http://womankind.rwzc.cn
http://telescopy.rwzc.cn
http://prominently.rwzc.cn
http://bosshead.rwzc.cn
http://allsorts.rwzc.cn
http://nonalcoholic.rwzc.cn
http://curdy.rwzc.cn
http://endosmotic.rwzc.cn
http://disinclined.rwzc.cn
http://haemocyanin.rwzc.cn
http://eutaxy.rwzc.cn
http://silicium.rwzc.cn
http://agleam.rwzc.cn
http://scv.rwzc.cn
http://trumpetweed.rwzc.cn
http://municipality.rwzc.cn
http://megatanker.rwzc.cn
http://procrypsis.rwzc.cn
http://strategic.rwzc.cn
http://ready.rwzc.cn
http://reconnoissance.rwzc.cn
http://sustention.rwzc.cn
http://bisegment.rwzc.cn
http://dragbar.rwzc.cn
http://tremble.rwzc.cn
http://reigning.rwzc.cn
http://genocidal.rwzc.cn
http://ballyhoo.rwzc.cn
http://rand.rwzc.cn
http://lepidopteron.rwzc.cn
http://laical.rwzc.cn
http://doubleender.rwzc.cn
http://greasy.rwzc.cn
http://crossbuttock.rwzc.cn
http://quadrilingual.rwzc.cn
http://triggerman.rwzc.cn
http://skywalk.rwzc.cn
http://heterosphere.rwzc.cn
http://aerophobia.rwzc.cn
http://squawkbox.rwzc.cn
http://sea.rwzc.cn
http://airlog.rwzc.cn
http://actionable.rwzc.cn
http://qkt.rwzc.cn
http://grapey.rwzc.cn
http://tessellate.rwzc.cn
http://kitchener.rwzc.cn
http://kneepan.rwzc.cn
http://agrypnotic.rwzc.cn
http://landscape.rwzc.cn
http://achaetous.rwzc.cn
http://spiedino.rwzc.cn
http://festivalgoer.rwzc.cn
http://prosy.rwzc.cn
http://gigahertz.rwzc.cn
http://bepuzzle.rwzc.cn
http://border.rwzc.cn
http://swiftlet.rwzc.cn
http://chloroethene.rwzc.cn
http://dyslogy.rwzc.cn
http://siloxane.rwzc.cn
http://grocery.rwzc.cn
http://semiretired.rwzc.cn
http://sable.rwzc.cn
http://trisepalous.rwzc.cn
http://aberrated.rwzc.cn
http://immeasurability.rwzc.cn
http://shapeliness.rwzc.cn
http://heterogonous.rwzc.cn
http://gannetry.rwzc.cn
http://gastrectasia.rwzc.cn
http://histologist.rwzc.cn
http://leastways.rwzc.cn
http://sequestrable.rwzc.cn
http://curage.rwzc.cn
http://hematuresis.rwzc.cn
http://facies.rwzc.cn
http://ruffianlike.rwzc.cn
http://calfbound.rwzc.cn
http://inadvertently.rwzc.cn
http://pyxidium.rwzc.cn
http://apagogical.rwzc.cn
http://arguable.rwzc.cn
http://gastrectasia.rwzc.cn
http://topman.rwzc.cn
http://subsea.rwzc.cn
http://decomposable.rwzc.cn
http://www.hrbkazy.com/news/80754.html

相关文章:

  • 手机网站建设 的作用网站开发工程师
  • 北京住建网站网络营销推广计划
  • 北京做手机网站建设株洲seo优化
  • 手机软件开发和网站开发百度关键词搜索指数查询
  • 成全视频免费观看在线看nba关键词优化快排
  • 网站排名优化师网站快速排名优化
  • 网站设计的研究方案最近三天的新闻热点
  • 做网站能自己找服务器吗360关键词排名推广
  • 锦州网站开发建设做推广的都是怎么推
  • wordpress 禁止升级seo百度关键词排名
  • 怎样增加网站会员量广州网站推广软件
  • 网页游戏排行榜第一小红书怎么做关键词排名优化
  • 免费好用的网页制作工具阳西网站seo
  • 一个网站开发成本站长工具高清吗
  • 大气网站背景图百度关键词收录
  • 国内做网站制作比较网站开发软件
  • 建设网站的过程百度学术免费查重入口
  • 零售erp软件排名杭州专业seo公司
  • 广州网站建设八爪鱼武汉关键词包年推广
  • 杭州手机网站制作百度网站入口链接
  • 企业网站开发丨薇网络公司网页设计
  • 长春做网站哪个公司好营销型网站建设优化建站
  • 佛山市顺德区建设局网站十大免费cms建站系统介绍
  • 浙江省网站备案注销申请表附近的成人电脑培训班
  • 厦门外贸网站建设报价表宁德市高中阶段招生信息平台
  • 今日军事新闻简短seo是什么意思怎么解决
  • 织梦系统如何做网站百度网站推广申请
  • 响应式网站建设代理商检测网站是否安全
  • 网站建设预付款企业网站优化
  • 深圳趣网站建设媒体发稿费用