当前位置:   article > 正文

【vue baidu-map】实现百度地图展示基地,鼠标悬浮标注点展示详细信息

【vue baidu-map】实现百度地图展示基地,鼠标悬浮标注点展示详细信息

实现效果如下:

自用代码记录

  1. <template>
  2. <div class="map" style="position: relative;">
  3. <baidu-map
  4. id="bjmap"
  5. :scroll-wheel-zoom="true"
  6. :auto-resize="true"
  7. @ready="handler"
  8. >
  9. <bm-marker
  10. v-for="(item, index) in markerList"
  11. :key="index"
  12. :position="item.position"
  13. :icon="item.icon"
  14. @click="handlerinfoWindowOpen(index)"
  15. >
  16. <bm-info-window
  17. :position="item"
  18. :show="item.show"
  19. @close="infoWindowClose(index)"
  20. @open="infoWindowOpen(index, item)"
  21. :auto-pan="true"
  22. :close-on-click="false"
  23. >
  24. <div>视频箭头</div>
  25. <!-- <div>
  26. <a
  27. href="#/internet"
  28. style="
  29. font-size: 15px;
  30. border-bottom: 1px #0464a4 solid;
  31. color: #0464a4;
  32. "
  33. >视频监控名称:{{ item.name }}</a
  34. > -->
  35. <!-- <video-player
  36. style="width: 200px; height: 100px"
  37. :ref="videoId"
  38. class="myPlayer"
  39. muted="true"
  40. :options="videoOptions"
  41. /> -->
  42. <!-- <span>企业名称:</span><span>{{current }}testt</span> -->
  43. <!-- </div> -->
  44. </bm-info-window>
  45. </bm-marker>
  46. <bm-polygon v-for="(markers, index) in planBaseMassifs" :key="index" :path="markers" :stroke-color="drawColor" :stroke-opacity="1" :stroke-weight="4" :fillColor="drawColors" :fillOpacity="1" />
  47. <div class="equipmentBox" v-if="equipmentType">
  48. <div
  49. :class="current == key ? 'item current' : 'item'"
  50. v-for="(value, key) in equipmentType"
  51. :key="key"
  52. @click="changeType(key)"
  53. >
  54. <div>{{ key }}</div>
  55. <div>({{ value }})</div>
  56. </div>
  57. </div>
  58. <div v-show="current == '视频监控'" class="equipmentBox1">
  59. <video-player
  60. style="width: 100%; height: 100%;position:absolute;"
  61. :ref="videoId"
  62. class="myPlayer"
  63. muted="true"
  64. :options="videoOptions"
  65. />
  66. </div>
  67. </baidu-map>
  68. </div>
  69. </template>
  70. <script>
  71. // var echarts = require('echarts')
  72. import { getPlantBases } from '@/api/table'
  73. import { getUserEquipments ,getPageList} from '@/api/equipment'
  74. // import { setServers } from 'dns';
  75. // import { sumRpt } from '@/api/equipment'
  76. import { staticResourceLocation } from '@/settings'
  77. import defaultSettings from '@/settings'
  78. import initData from '../../../mixins/initData'
  79. import VideoPlayer from '@/views/components/videoPlayer.vue'
  80. import { log } from 'video.js'
  81. export default {
  82. props: {
  83. childrenData: {
  84. type: Object,
  85. default: function () {
  86. return {}
  87. },
  88. },
  89. },
  90. data() {
  91. return {
  92. staticResourceLocation,
  93. plantBaseList: [],
  94. screenHeight: window.innerHeight - 84, // 屏幕高度
  95. screenWidth: window.innerWidth,
  96. systitle: '',
  97. map: null,
  98. BMap: null,
  99. NavigationControl: null,
  100. MapTypeControl: null,
  101. // 设备列表
  102. equipmentList: [],
  103. planBaseMassifs:[],
  104. equipmentType: [],
  105. current: 'LED',
  106. markerList: [],
  107. videoOptions: {
  108. autoplay: false,
  109. controls: true,
  110. },
  111. videoId: '',
  112. drawColors: '#e9d99b',
  113. videoList: [],
  114. markers:[],
  115. drawColor: "#ff0000",
  116. }
  117. },
  118. components: { VideoPlayer },
  119. mounted() {
  120. var _this = this
  121. window.onresize = function () {
  122. // 定义窗口大小变更通知事件
  123. _this.screenHeight = document.documentElement.clientHeight - 84 // 窗口高度
  124. _this.screenWidth = document.documentElement.clientWidth // 窗口宽度
  125. //map.removeControl(NavigationControl) //删除比例尺控件
  126. _this.map.removeControl(_this.NavigationControl)
  127. _this.map.removeControl(_this.MapTypeControl)
  128. _this.NavigationControl = new BMap.NavigationControl({
  129. // 地图平移缩放控件
  130. anchor: BMAP_ANCHOR_TOP_LEFT,
  131. type: BMAP_NAVIGATION_CONTROL_LARGE,
  132. offset: new BMap.Size(_this.screenWidth / 4 + 5, 10),
  133. })
  134. _this.MapTypeControl = new BMap.MapTypeControl({
  135. mapTypes: [BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP],
  136. offset: new BMap.Size(_this.screenWidth / 4 + 5, 10),
  137. })
  138. _this.map.addControl(_this.NavigationControl)
  139. _this.map.addControl(_this.MapTypeControl)
  140. }
  141. console.log(this.childrenData, 'childrenData--->statistics')
  142. this.equipmentType = this.childrenData.withCategory
  143. // sumRpt().then((res) => {
  144. // if (res.body) {
  145. // let { withCategory } = res.body
  146. // this.equipmentType = withCategory
  147. // }
  148. // })
  149. getUserEquipments().then((res) => {
  150. console.log('百度地图传的接口',res)
  151. this.equipmentList = res.body
  152. this.equipmentList.forEach((item) => {
  153. if (item.category === 1 && item.point) {
  154. var obj = {
  155. position: {
  156. lng: item.point.split(',')[0],
  157. lat: item.point.split(',')[1],
  158. },
  159. icon: {
  160. url: this.staticResourceLocation + 'static/LED.png',
  161. size: { width: 33, height: 33 },
  162. opts: {
  163. imageSize: { width: 33, height: 33 },
  164. },
  165. },
  166. }
  167. this.markerList.push(obj)
  168. } else if (item.category === 2) {
  169. var obj1 = {
  170. hdAddress: item.videoUrl,
  171. id: item.videoId,
  172. }
  173. this.videoList.push(obj1)
  174. let indexId = 0
  175. this.videoId = this.videoList[indexId].id
  176. this.$nextTick(function () {
  177. var _thisVideoRefs = this.$refs[this.videoList[indexId].id]
  178. if (_thisVideoRefs) {
  179. var player = _thisVideoRefs.player
  180. player.src(this.videoList[indexId].hdAddress)
  181. //player.play();
  182. }
  183. })
  184. }
  185. })
  186. })
  187. },
  188. beforeDestroy() {
  189. if (this.timer) {
  190. clearInterval(this.timer) // 在Vue实例销毁前,清除我们的定时器
  191. }
  192. },
  193. created() {},
  194. mixins: [initData],
  195. methods: {
  196. changeType(key) {
  197. this.markerList = []
  198. this.current = key
  199. var index =
  200. key == 'LED'
  201. ? 1
  202. : key == '视频监控'
  203. ? 2
  204. : key == '环境监测'
  205. ? 3
  206. : key == '水肥机'
  207. ? 4
  208. : key == '虫情测报灯'
  209. ? 5
  210. : key == '杀虫灯'
  211. ? 6
  212. : key == '智能控制柜'
  213. ? 7
  214. : 0
  215. // console.log(index)
  216. var iconPath = ''
  217. if (index == 1) {
  218. iconPath = this.staticResourceLocation + 'static/led.png'
  219. } else if (index == 2) {
  220. iconPath = this.staticResourceLocation + 'static/video.png'
  221. } else if (index == 3) {
  222. iconPath = this.staticResourceLocation + 'static/qxjc.png'
  223. } else if (index == 4) {
  224. iconPath = this.staticResourceLocation + 'static/jsgg.png'
  225. } else if (index == 5) {
  226. iconPath = this.staticResourceLocation + 'static/Insecticidal.png'
  227. } else if (index == 6) {
  228. iconPath = this.staticResourceLocation + 'static/scd.png'
  229. } else if (index == 7) {
  230. iconPath = this.staticResourceLocation + 'static/znkzk.png'
  231. }
  232. this.equipmentList.forEach((item) => {
  233. if (item.category === index && item.point) {
  234. var obj = {
  235. position: {
  236. lng: item.point.split(',')[0],
  237. lat: item.point.split(',')[1],
  238. },
  239. show: false,
  240. name: item.name,
  241. icon: {
  242. url: iconPath,
  243. size: { width: 33, height: 33 },
  244. opts: {
  245. imageSize: { width: 33, height: 33 },
  246. },
  247. },
  248. }
  249. this.markerList.push(obj)
  250. }
  251. })
  252. // console.log(this.markerList, 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk')
  253. },
  254. // gohome() {
  255. // console.log('666')
  256. // var user = this.$store.state.user.user
  257. // if (user.homeUrl && user.homeUrl != '') {
  258. // this.$router.push(user.homeUrl)
  259. // } else {
  260. // this.$router.push('/')
  261. // }
  262. // },
  263. // redirectMonitor: function () {
  264. // this.$router.push('/monitor/tine')
  265. // },
  266. handler({ BMap, map }) {
  267. this.map = map
  268. this.BMap = BMap
  269. getPlantBases().then((res) => {
  270. console.log(res.body, '百度地图')
  271. this.plantBaseList = res.body
  272. var point = ''
  273. this.plantBaseList.forEach((item) => {
  274. if (item.position) {
  275. point = new BMap.Point(
  276. item.position.split(',')[0],
  277. item.position.split(',')[1]
  278. )
  279. }
  280. })
  281. if (point === '') {
  282. point = new BMap.Point(107.034026, 33.073558)
  283. }
  284. map.centerAndZoom(point, 8) // 初始化地图,设置中心点坐标和地图级别
  285. map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
  286. var myIcon = new BMap.Icon(
  287. 'http://lyds.fengyuniot.com/content/upload/mappoint.png',
  288. new BMap.Size(40, 52),
  289. {
  290. anchor: new BMap.Size(10, 10),
  291. }
  292. )
  293. // var marker = new BMap.Marker(point) // 创建标注
  294. // map.addOverlay(marker) // 将标注添加到地图中
  295. var NavigationControl = new BMap.NavigationControl({
  296. // 地图平移缩放控件
  297. anchor: BMAP_ANCHOR_TOP_LEFT,
  298. type: BMAP_NAVIGATION_CONTROL_LARGE,
  299. offset: new BMap.Size(this.screenWidth / 4 + 5, 10),
  300. })
  301. this.NavigationControl = NavigationControl
  302. // 添加地图类型控件
  303. var MapTypeControl = new BMap.MapTypeControl({
  304. mapTypes: [BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP],
  305. offset: new BMap.Size(this.screenWidth / 4 + 5, 10),
  306. })
  307. this.MapTypeControl = MapTypeControl
  308. map.addControl(NavigationControl)
  309. map.setMapType(BMAP_HYBRID_MAP) // 调取地图类型混合型
  310. map.addControl(MapTypeControl)
  311. var markerArr = this.plantBaseList
  312. // console.log(this.plantBaseList, 'this.plantBaseList11111')
  313. markerArr.forEach((e, i) => {
  314. var positionArr = e.position.split(',')
  315. // console.log(e, 'errrrr')
  316. // console.log(e.plantBasePictures[0].pictureUrl, 'rrrrr')
  317. var background = ''
  318. if (e.plantBasePictures != null && e.plantBasePictures.length > 0) {
  319. background =
  320. defaultSettings.staticResourceLocation +
  321. e.plantBasePictures[0].pictureUrl
  322. }
  323. // console.log(background, 'background')
  324. let opts = {
  325. width: 200,
  326. height: 100,
  327. }
  328. // 创建point, 将x,y值传入
  329. const pointNumber = new BMap.Point(positionArr[0], positionArr[1])
  330. const infoWindow = new window.BMap.InfoWindow(
  331. "<div class='maptipsinfo'style='color:white;' ><a href='#/nutrientManagement' style='font-size:15px;border-bottom:1px #0464A4 solid;color:#00fe8f;'><span>" +
  332. e.baseName +
  333. '</span></a>' +
  334. "<p style='font-size:14px;'><span>地址:</span>" +
  335. e.address +
  336. '</p>' +
  337. '<img style="width:100%;height:80%;" src="' +
  338. background +
  339. '"/>' +
  340. '</div>',
  341. opts
  342. )
  343. // infoWindow.setStyle({
  344. // color: '#fff', // 字体颜色为白色
  345. // background: '#000', // 背景颜色为黑色
  346. // border: 'none', // 去掉边框
  347. // borderRadius: '5px', // 圆角半径
  348. // padding: '10px', // 内边距
  349. // fontSize: '14px', // 字体大小
  350. // lineHeight: '20px', // 行高
  351. // })
  352. var label = new BMap.Label(e.baseName, {
  353. offset: new BMap.Size(25, 5),
  354. })
  355. this.markerFun(map, pointNumber, infoWindow, label, myIcon)
  356. })
  357. })
  358. const params = {
  359. pageIndex: this.pageIndex,
  360. pageSize: this.pageSize,
  361. enterPriseId: this.enterPriseId,
  362. }
  363. getPageList(params).then((res)=>{
  364. console.log(res,'你好555555555555');
  365. // planBaseMassifs
  366. if(res.errorCode == 20000){
  367. const array = res.body.list
  368. const innerObjects = [];
  369. for (let i = 0; i < array .length; i++) {
  370. const innerObject = array [i].planBaseMassifs;
  371. innerObjects.push(innerObject)
  372. }
  373. this.planBaseMassifs = innerObjects
  374. console.log(this.planBaseMassifs,'this.planBaseMassifs');
  375. // 使用map()方法遍历嵌套数组
  376. let modifiedArray = innerObjects.map((subArray) => {
  377. // 检查子数组是否为null
  378. if (subArray === null) {
  379. return [];
  380. }
  381. // 使用map()方法遍历子数组中的每个对象
  382. return subArray.map((obj) => {
  383. // 替换属性名
  384. obj.lat = obj.latitude;
  385. obj.lng = obj.longitude;
  386. delete obj.latitude;
  387. delete obj.longitude;
  388. // 处理null值
  389. if (obj === null) {
  390. return {};
  391. } else {
  392. return obj;
  393. }
  394. });
  395. }).filter((subArray) => subArray.length > 0);
  396. for (let i = 0; i < modifiedArray.length; i++) {
  397. // 获取每个子数组的第一行内容
  398. let firstRow = modifiedArray[i][0];
  399. // modifiedArray
  400. modifiedArray[i].push(firstRow);
  401. }
  402. this.planBaseMassifs = modifiedArray
  403. }
  404. })
  405. },
  406. markerFun: function (map, points, infoWindows, label, myIcon) {
  407. console.log('1111a',map,points, infoWindows, label, myIcon,)
  408. const markers = new BMap.Marker(points, { icon: myIcon })
  409. map.addOverlay(markers) // 将标注添加到地图中
  410. // markers.setLabel(label); // 将data中的name添加到地图中
  411. // 标注的点击事件
  412. markers.addEventListener('mouseover', function (event) {
  413. map.openInfoWindow(infoWindows, points) // 参数:窗口、点 根据点击的点出现对应的窗口
  414. })
  415. // console.log('1a')
  416. },
  417. infoWindowOpen(index, item) {
  418. if (this.current == '视频监控') {
  419. this.markerList[index].show = true
  420. let indexId = index
  421. this.videoId = this.videoList[indexId].id
  422. this.$nextTick(function () {
  423. var _thisVideoRefs = this.$refs[this.videoList[indexId].id]
  424. // console.log(this.videos,_thisVideoRefs,'_thisVideoRefs_thisVideoRefs')
  425. if (_thisVideoRefs) {
  426. var player = _thisVideoRefs.player
  427. // console.log(player.src,'_thisVideoRefs11')
  428. player.src(this.videoList[indexId].hdAddress)
  429. //player.play();
  430. }
  431. })
  432. }
  433. },
  434. infoWindowClose(index) {
  435. this.markerList[index].show = false
  436. },
  437. handlerinfoWindowOpen(index) {
  438. this.markerList[index].show = true
  439. console.log('点击标记点',index)
  440. this.show = true
  441. if (this.current == '视频监控') {
  442. this.markerList[index].show = true
  443. let indexId = index
  444. this.videoId = this.videoList[indexId].id
  445. this.$nextTick(function () {
  446. var _thisVideoRefs = this.$refs[this.videoList[indexId].id]
  447. if (_thisVideoRefs) {
  448. var player = _thisVideoRefs.player
  449. player.src(this.videoList[indexId].hdAddress)
  450. //player.play();
  451. }
  452. })
  453. }
  454. },
  455. // handlerinfoWindowOpen(index) {
  456. // this.markerList[index].show = true
  457. // console.log('点击标记点',this.markerList[index].show)
  458. // this.show = true
  459. // if (this.current == '视频监控') {
  460. // this.markerList[index].show = true
  461. // let indexId = index
  462. // this.videoId = this.videoList[indexId].id
  463. // this.$nextTick(function () {
  464. // var _thisVideoRefs = this.$refs[this.videoList[indexId].id]
  465. // if (_thisVideoRefs) {
  466. // var player = _thisVideoRefs.player
  467. // player.src(this.videoList[indexId].hdAddress)
  468. // //player.play();
  469. // }
  470. // })
  471. // }
  472. // },
  473. // 异步调用百度js
  474. map_load() {
  475. var load = document.createElement('script')
  476. load.src = 'http://api.map.baidu.com/api?v=1.4&callback=map_init'
  477. document.body.appendChild(load)
  478. },
  479. },
  480. }
  481. </script>
  482. <style scoped lang="scss">
  483. /*地图提示*/
  484. .equipmentBox {
  485. /* width: 240px; */
  486. // position: absolute;
  487. // top: 70px;
  488. // right: calc(25vw + 5px);
  489. position: absolute;
  490. top: 70px;
  491. right: 5px;
  492. }
  493. .equipmentBox1 {
  494. width: 260px;
  495. position: absolute;
  496. bottom: 35%;
  497. right: calc(25vw + 5px);
  498. }
  499. .equipmentBox .item {
  500. display: flex;
  501. justify-content: space-around;
  502. align-items: center;
  503. width: 108px;
  504. height: 27px;
  505. border-radius: 14px;
  506. background-color: #fff;
  507. color: #010101;
  508. font-size: 12px;
  509. font-weight: bold;
  510. cursor: pointer;
  511. margin-bottom: 5px;
  512. text-align: right;
  513. }
  514. .equipmentBox .current {
  515. background-color: #00b065;
  516. color: #fff;
  517. }
  518. // 地图
  519. .map{
  520. width:100%;
  521. height: 100%;
  522. }
  523. .map .maptipsinfo p {
  524. font-size: 14px;
  525. line-height: 14px;
  526. height: 14px;
  527. color: #777;
  528. }
  529. .maptipsinfo a:hover {
  530. color: #0696f9;
  531. border-color: #0696f9;
  532. }
  533. .maptipsinfo span {
  534. color: #333;
  535. }
  536. .maptipsinfo {
  537. background: url();
  538. }
  539. .map #bjmap {
  540. width: 100%;
  541. height: 100%;
  542. display: inline-block;
  543. vertical-align: baseline;
  544. /* position: fixed; */
  545. div:first-of-type{
  546. border-radius: 15px !important;
  547. }
  548. }
  549. .map #bjmap>div:first-of-type{
  550. border-radius: 15px !important;
  551. }
  552. .map .nowdatatime {
  553. border: 1px solid #00c7dd;
  554. background: rgba(0, 0, 0, 0.6);
  555. box-shadow: 0 0 10px rgba(1, 129, 143, 0.8);
  556. position: relative;
  557. top: -97%;
  558. padding: 10px;
  559. width: 240px;
  560. margin: 0 auto;
  561. text-align: center;
  562. border-radius: 5px;
  563. font-size: 1.5rem;
  564. }
  565. .imgss {
  566. height: 30px;
  567. width: 30px;
  568. }
  569. /*.map .el-loading-spinner .circular{
  570. width: 80px;
  571. height: 80px;
  572. animation: loading-rotate 2s linear infinite;
  573. } */
  574. /*.map .el-loading-spinner{
  575. background: url(../../assets/img/default_img.gif) no-repeat;
  576. background-size: 80px 80px;
  577. width: 100%;
  578. height: 100%;
  579. position: relative;
  580. top: 45%;
  581. left: calc(50% - 40px);
  582. } */
  583. // /deep/.BMap_pop img,
  584. // /deep/.BMap_top,
  585. // /deep/.BMap_center,
  586. // /deep/.BMap_bottom,
  587. // /deep/.BMap_pop > div {
  588. // &:not(:nth-child(9)) {
  589. // display: none;
  590. // }
  591. // }
  592. // /deep/.BMap_pop div:nth-child(9) {
  593. // // top: 30px !important;
  594. // }
  595. // /deep/.BMap_bubble_content {
  596. // // border-top: 3px solid #377abd;
  597. // border-top: 3px solid rgba(44, 55, 47, 0.3);
  598. // // border-bottom: 3px solid #377abd;
  599. // border-bottom: 3px solid rgba(44, 55, 47, 0.3);
  600. // border-radius: 8px;
  601. // // background-color: rgba(36, 105, 137, 0.8);
  602. // background-color: rgba(44, 55, 47, 0.4);
  603. // overflow: hidden;
  604. // color: #ffffff;
  605. // padding: 8px 5px;
  606. // font-size: 14;
  607. // }
  608. .baidu-map-con {
  609. background-color: #043f31;
  610. // width: 100%;
  611. // height: 100%;
  612. }
  613. ::v-deep #bjmap .BMap_stdMpCtrl{
  614. inset: 30px auto auto 10px !important;
  615. }
  616. // ::v-deep #bjmap .BMap_noprint {
  617. // inset: 10px 90% auto auto !important;
  618. // }
  619. ::v-deep #bjmap .anchorTR{
  620. inset: 5px 91% auto auto !important;
  621. }
  622. ::v-deep #bjmap .BMap_stdMpCtrl{
  623. //inset: 40px auto auto 30px !important;
  624. }
  625. // marker颜色
  626. ::v-deep .BMap_bubble_title{
  627. color:#fff;
  628. font-size:18px;
  629. /*font-weight: bold;*/
  630. text-align:left;
  631. background:transparent !important;
  632. }
  633. ::v-deep .BMap_pop .BMap_top{
  634. background:#043f31 !important;
  635. border:0 !important;
  636. }
  637. ::v-deep .BMap_pop .BMap_center{
  638. width:251px !important;
  639. // height: 300px !important;
  640. border:0 !important;
  641. background:#043f31 !important;
  642. }
  643. ::v-deep .BMap_pop .BMap_bottom{
  644. border:0 !important;
  645. background:#043f31 !important;
  646. }
  647. ::v-deep .BMap_pop div:nth-child(3){
  648. background:transparent !important;
  649. }
  650. ::v-deep .BMap_pop div:nth-child(3) div{
  651. border-radius:7px;
  652. background:#043f31 !important;
  653. border:0 !important;
  654. }
  655. ::v-deep .BMap_pop div:nth-child(1){
  656. border-radius:7px 0 0 0;
  657. background:transparent !important;
  658. border:0 !important;
  659. }
  660. ::v-deep .BMap_pop div:nth-child(1) div{
  661. background:#043f31 !important;
  662. }
  663. ::v-deep .BMap_pop div:nth-child(5){
  664. border-radius:0 0 0 7px;
  665. background:transparent !important;
  666. border:0 !important;
  667. }
  668. ::v-deep .BMap_pop div:nth-child(5) div{
  669. border-radius:7px;
  670. background:#043f31 !important;
  671. }
  672. ::v-deep .BMap_pop div:nth-child(7){
  673. background:transparent !important;
  674. }
  675. ::v-deep .BMap_pop div:nth-child(7) div{
  676. border-radius:7px;
  677. background:#043f31 !important;
  678. }
  679. ::v-deep .BMap_pop div:nth-child(8) div{
  680. /*border-radius:7px;*/
  681. background:#043f31 !important;
  682. }
  683. /*窗体阴影*/
  684. ::v-deep .BMap_shadow div:nth-child(5) img{
  685. margin-left: -1100px !important;
  686. }
  687. ::v-deep .BMap_shadow div:nth-child(4){
  688. width: 262px !important;
  689. }
  690. ::v-deep img[src="http://api0.map.bdimg.com/images/iw3.png"] {
  691. content: url('../../../assets/mapMarker.png');
  692. }
  693. ::v-deep img[src="https://api.map.baidu.com/images/iw3.png"] {
  694. margin-top: -692px !important;
  695. filter: alpha(opacity=70);
  696. content: url('../../../assets/mapMarker.png');
  697. }
  698. </style>
  699. <style>
  700. #bjmap>div:first-of-type{
  701. /* border-radius: 15px; */
  702. }
  703. </style>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/248124
推荐阅读
相关标签
  

闽ICP备14008679号