echarts引入百度地图vue3(大屏项目中缩放点偏移到左上角,解决代码在最后)

news2024/12/23 0:43:37

实际开发中的问题,遇到了大屏做了自适应,为非标准文档流之后,在缩放时不是以鼠标当前位置缩放的,而是偏移到左上角。

向百度地图提了工单也没解决,同一套适应方案用cesium地图时缩放没问题:

 先看看效果(用的缩放控件解决的):

 

 index.html  需要先在这个文件中引入百度的ak

<script type="text/javascript"
      src="http://api.map.baidu.com/api?v=2.0&ak=你的ak"
    ></script>

地图组件:

<template>
  <!-- 中国地图 -->
  <div ref="mapChartRef" id="mapChart" class="echarts"></div>
</template>

<script setup lang="ts">
import { ref, watchEffect } from "vue";
import * as echarts from "echarts";
import "echarts/extension/bmap/bmap";

const mapChartRef = ref();
//图表方法
const mapChart = () => {
  //获取id并初始化图表
  var myChart = echarts.init(document.getElementById("mapChart"));
  const option = ref({
    //在echarts中配置百度地图
    bmap: {
      center: [104.114129, 37.550339],
      zoom: 5,
      roam: 'move',
      //mapStyle: mapStyle.value, //这个是地图样式配置,如果需要,贴在最后
    },
    //一些其他echarts配置
})
  myChart.setOption(option.value);
  //获取百度地图实例
  // @ts-ignore
  const bmap = myChart.getModel().getComponent("bmap").getBMap();
  //添加缩放控件
  // @ts-ignore
  bmap.addControl(new BMap.NavigationControl({offset : new BMap.Size(1400,150)}));
};
watchEffect(() => {
  if (mapChartRef.value) {
    mapChart();
  }
});

<style lang="scss" scoped>
.echarts {
  width: 100%;
  height: 100%;
}
</style>

mapStyle的json数据 

const mapStyle = ref({
  styleJson: [
    {
      featureType: "land",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#031e55ff",
      },
    },
    {
      featureType: "water",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#113549ff",
      },
    },
    {
      featureType: "green",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#0e1b30ff",
      },
    },
    {
      featureType: "building",
      elementType: "geometry",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "building",
      elementType: "geometry.topfill",
      stylers: {
        color: "#113549ff",
      },
    },
    {
      featureType: "building",
      elementType: "geometry.sidefill",
      stylers: {
        color: "#143e56ff",
      },
    },
    {
      featureType: "building",
      elementType: "geometry.stroke",
      stylers: {
        color: "#dadada00",
      },
    },
    {
      featureType: "subwaystation",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#feffffB2",
      },
    },
    {
      featureType: "education",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#12223dff",
      },
    },
    {
      featureType: "medical",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#12223dff",
      },
    },
    {
      featureType: "scenicspots",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        color: "#12223dff",
      },
    },
    {
      featureType: "highway",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        weight: "4",
      },
    },
    {
      featureType: "highway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "highway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#fed66900",
      },
    },
    {
      featureType: "highway",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "highway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "highway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "highway",
      elementType: "labels.icon",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "arterial",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        weight: "2",
      },
    },
    {
      featureType: "arterial",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "arterial",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffeebb00",
      },
    },
    {
      featureType: "arterial",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "arterial",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "arterial",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "local",
      elementType: "geometry",
      stylers: {
        visibility: "on",
        weight: "1",
      },
    },
    {
      featureType: "local",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "local",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "local",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "local",
      elementType: "labels.text.fill",
      stylers: {
        color: "#979c9aff",
      },
    },
    {
      featureType: "local",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffffff",
      },
    },
    {
      featureType: "railway",
      elementType: "geometry",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "subway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        weight: "1",
      },
    },
    {
      featureType: "subway",
      elementType: "geometry.fill",
      stylers: {
        color: "#d8d8d8ff",
      },
    },
    {
      featureType: "subway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "subway",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "subway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#979c9aff",
      },
    },
    {
      featureType: "subway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffffff",
      },
    },
    {
      featureType: "continent",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "continent",
      elementType: "labels.icon",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "continent",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "continent",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "city",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "city",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "city",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "city",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "town",
      elementType: "labels.icon",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "town",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "town",
      elementType: "labels.text.fill",
      stylers: {
        color: "#454d50ff",
      },
    },
    {
      featureType: "town",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffffff",
      },
    },
    {
      featureType: "road",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "poilabel",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "districtlabel",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "road",
      elementType: "geometry",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "road",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "road",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "district",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "poilabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "poilabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "poilabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "manmade",
      elementType: "geometry",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "districtlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffffff",
      },
    },
    {
      featureType: "entertainment",
      elementType: "geometry",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "shopping",
      elementType: "geometry",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "nationalway",
      stylers: {
        level: "6",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      stylers: {
        level: "7",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      stylers: {
        level: "8",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      stylers: {
        level: "9",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      stylers: {
        level: "10",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "6",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "7",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "8",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "9",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "10",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "6",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "7",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "8",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "9",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "10",
        curZoomRegionId: "0",
        curZoomRegion: "6-10",
      },
    },
    {
      featureType: "cityhighway",
      stylers: {
        level: "6",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      stylers: {
        level: "7",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      stylers: {
        level: "8",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      stylers: {
        level: "9",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "6",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "7",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "8",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "geometry",
      stylers: {
        visibility: "off",
        level: "9",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "6",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "7",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "8",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels",
      stylers: {
        visibility: "off",
        level: "9",
        curZoomRegionId: "0",
        curZoomRegion: "6-9",
      },
    },
    {
      featureType: "subwaylabel",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "subwaylabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "tertiarywaysign",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "tertiarywaysign",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "provincialwaysign",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "provincialwaysign",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "nationalwaysign",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "nationalwaysign",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "highwaysign",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "highwaysign",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "village",
      elementType: "labels",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "district",
      elementType: "labels.text",
      stylers: {
        fontsize: "20",
      },
    },
    {
      featureType: "district",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "district",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "country",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "country",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "water",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "water",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "tertiaryway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "tertiaryway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff10",
      },
    },
    {
      featureType: "provincialway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "provincialway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "nationalway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "highway",
      elementType: "labels.text",
      stylers: {
        fontsize: "20",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "nationalway",
      elementType: "labels.text",
      stylers: {
        fontsize: "20",
      },
    },
    {
      featureType: "provincialway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "provincialway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "provincialway",
      elementType: "labels.text",
      stylers: {
        fontsize: "20",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels.text",
      stylers: {
        fontsize: "20",
      },
    },
    {
      featureType: "cityhighway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "estate",
      elementType: "geometry",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "tertiaryway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "tertiaryway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "fourlevelway",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "fourlevelway",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "scenicspotsway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "scenicspotsway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "universityway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "universityway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "vacationway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "vacationway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "fourlevelway",
      elementType: "geometry",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "fourlevelway",
      elementType: "geometry.fill",
      stylers: {
        color: "#12223dff",
      },
    },
    {
      featureType: "fourlevelway",
      elementType: "geometry.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "transportationlabel",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "transportationlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "transportationlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "transportationlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "educationlabel",
      elementType: "labels",
      stylers: {
        visibility: "on",
      },
    },
    {
      featureType: "educationlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "educationlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "educationlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "transportation",
      elementType: "geometry",
      stylers: {
        color: "#113549ff",
      },
    },
    {
      featureType: "airportlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "airportlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "scenicspotslabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "scenicspotslabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "medicallabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "medicallabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "medicallabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "scenicspotslabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "airportlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "entertainmentlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "entertainmentlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "entertainmentlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "estatelabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "estatelabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "estatelabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "businesstowerlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "businesstowerlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "businesstowerlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "companylabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "companylabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "companylabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "governmentlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "governmentlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "governmentlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "restaurantlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "restaurantlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "restaurantlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "hotellabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "hotellabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "hotellabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "shoppinglabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "shoppinglabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "shoppinglabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "lifeservicelabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "lifeservicelabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "lifeservicelabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "carservicelabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "carservicelabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "carservicelabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "financelabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "financelabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "financelabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "otherlabel",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "otherlabel",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "otherlabel",
      elementType: "labels.icon",
      stylers: {
        visibility: "off",
      },
    },
    {
      featureType: "manmade",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "manmade",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "transportation",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "transportation",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "education",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "education",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "medical",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "medical",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
    {
      featureType: "scenicspots",
      elementType: "labels.text.fill",
      stylers: {
        color: "#2dc4bbff",
      },
    },
    {
      featureType: "scenicspots",
      elementType: "labels.text.stroke",
      stylers: {
        color: "#ffffff00",
      },
    },
  ],
});

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1843414.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

动态规划——达拉崩吧

1、题目链接 174. 地下城游戏 2、题目分析 假如说我们正向推状态转移方程&#xff0c;很难推出来&#xff0c;因为这道题有“加血”的说法&#xff0c;只能依靠后面的值判断前面所需要的血量&#xff0c;也就是说&#xff0c;如果正向的dp表示从起点出发&#xff0c;到达&…

CSS新手入门笔记【导入方法、选择器介绍、选择器优先级、属性详细介绍、盒子模型】

目录 一、目的与优势二、CSS导入方式三、语法结构四、选择器类型基本选择器组合选择器伪类与伪元素属性选择器 六、选择器优先级总结 六、CSS属性1. 字体与文本属性2. 背景属性3. 尺寸与盒模型属性4. 布局与定位5. 列表样式6. 边框与轮廓7. 文本装饰与效果8. 动画与过渡9. 伪类…

多模块存储器

随着计算机技术的发展&#xff0c;处理的信息量越来越多&#xff0c;对存储器的速度和容量要求也越来越高&#xff1b;而且随着CPU性能的不断提高、IO设备数量不断增加&#xff0c;导致主存的存取速度已经称为了整个计算机系统的性能瓶颈。这就要求我们必须提高主存的访问速度。…

Linux基础命令大全(详解版)

Linux基础命令&#xff08;详解版&#xff09; 文章目录 Linux基础命令&#xff08;详解版&#xff09;1.Linux的目录结构**2.Linux路径的描述方式**3.Linux命令基础格式4.ls命令 隐藏文件、文件夹5.pwd命令6.cd命令 特殊路径符7.mkdir命令 文件操作命令8.touch命令9.cat命令10…

package.json简介

1、package.json简介 通过 npm init 初始化一个项目&#xff0c;会生成3个目录/文件&#xff0c; node_modules, package.json和 package.lock.json。其中package-lock.json文件是为了锁版本。 2、package.json常用属性 1&#xff09;name name是项目的名称&#xff0c;命名…

远程桌面无法连接,远程桌面连接登录没有成功

在信息技术领域&#xff0c;远程桌面连接作为一种便捷的管理和操作工具&#xff0c;对于企业和个人用户而言都具有极其重要的价值。然而&#xff0c;在实际使用过程中&#xff0c;远程桌面无法连接的问题时常出现&#xff0c;这不仅影响了工作效率&#xff0c;还可能对数据安全…

javascript--类型检测 type of 和 instanceof

类型判断 1、typeof2、instanceof**instanceof 的原理** 3、constructor 1、typeof typeof在检测null、object、array、data的结果中都是object&#xff0c;所以无法用来区分这几个类型的区别。 <script>let a ["123",123,false,true,Symbol(1),new Date(),n…

小兔鲜02

elementplus自动按需引入 elementplus主题色定制 安装sass npm install sass -D要替换的主题色内容&#xff1a; /* 只需要重写你需要的即可 */ forward element-plus/theme-chalk/src/common/var.scss with ($colors: (primary: (// 主色base: #27ba9b,),success: (// 成功…

lock-锁的概念

锁的简介 锁是计算机协调多个进程或线程并发访问某一资源的机制&#xff08;避免发生资源争抢&#xff09; 在并发环境下&#xff0c;多个线程会对同一个资源进行争抢&#xff0c;可能会导致数据不一致的问题。为了解决这一问题&#xff0c;需要通过一种抽象的锁来对资源进行…

第 402 场 LeetCode 周赛题解

A 构成整天的下标对数目 I 计数&#xff1a;遍历 h o u r s hours hours &#xff0c;记录 h o u r s [ i ] % 24 hours[i]\%24 hours[i]%24 的出现次数 class Solution {public:long long countCompleteDayPairs(vector<int>& hours) {vector<int> cnt(24);…

【内含优惠码】重磅发售!《2023年度中国量化投资白皮书》(纸质版)

这是可以公开了解量化行业图景的&#xff0c;为数不多资料。 简介 《2023年度中国量化投资白皮书》由宽邦科技、华泰证券、金融阶、华锐技术、AMD、阿里云、英迈中国等多家机构联合发起编写&#xff0c;并于2024年6月15日正式发布&#xff0c;全书公17万字6大章节勾勒最新量化…

【Unity | Editor强化工具】项目备忘录工具

经常会被美术和策划同事反复询问某几个问题&#xff0c;每次都要翻Wiki链接给他们&#xff0c;非常折磨人&#xff0c;所以做了个可以在Unity内部显示备忘录的小工具&#xff0c;能够减少一些查找成本&#xff08;另外我觉得&#xff0c;让他们养成查看Unity内触手可及的信息的…

thread model线程模型

Concurrency并发 vs. Parallelism执行 Many-to-One GNU Portable Threads 多对一即多个用户线程映射到单个内核线程 该模式用的少 一个线程阻塞会导致所有线程阻塞 多线程可能无法在多核系统上并行运行&#xff0c;因为同一时间内核中可能只有一个线程 Concurrent executio…

关于圆的方程

关于圆的方程 flyfish 几何定义 圆是平面上所有到一个固定点&#xff08;圆心&#xff09;距离相等的点的集合。 解析几何描述 设圆心位于点 ( h , k ) (h, k) (h,k)&#xff0c;半径为 r r r&#xff0c;那么对于圆上的任意一点 ( x , y ) (x, y) (x,y)&#xff0c;它…

如何把模糊的图片修复变清晰,怎么做?有那些方法?

模糊照片怎么修复清晰&#xff1f;有些照片可能会因为保存不当或其他原因而变得模糊&#xff0c;这些照片删掉又觉得可惜&#xff0c;那么如何让这些照片焕然一新呢&#xff1f;今天就给大家分享几种可以将这些珍贵的模糊照片修复为高清照片的方法。接下来&#xff0c;给大家演…

【算法专题--链表】删除排序链表中的重复元素 -- 高频面试题(图文详解,小白一看就懂!!)

目录 一、前言 二、题目描述 三、解题方法 ⭐双指针 四、总结与提炼 五、共勉 一、前言 删除排序链表中的重复元素这道题&#xff0c;可以说是--链表专题--&#xff0c;最经典的一道题&#xff0c;也是在面试中频率最高的一道题目&#xff0c;通常在面试中&#xff0…

【Linux】I/O多路复用模型 select、poll、epoll

创作不易&#xff0c;本篇文章如果帮助到了你&#xff0c;还请点赞 关注支持一下♡>&#x16966;<)!! 主页专栏有更多知识&#xff0c;如有疑问欢迎大家指正讨论&#xff0c;共同进步&#xff01; &#x1f525;Linux系列专栏&#xff1a;Linux基础 &#x1f525; 给大家…

怎么将几段音频合并在一起,试试这几个音频拼接小妙招

怎么将多个音频合并在一起呢&#xff1f;音频是我们日常工作生活中常见的文件&#xff0c;音频与我们息息相关&#xff0c;无论你是音乐爱好者&#xff0c;还是喜欢记录生活中的声音&#xff0c;都离不开音频。因此我们会遇到关于很多音频剪辑的难题&#xff0c;就像今天小编给…

SpringBoot复习

第一章 SpringBoot开发入门 1.Springboot的优点。 ① 可快速构建独立的Spring应用。 ② 直接嵌入Tomcat、Jetty和Undertow服务器&#xff08;无须部署WAR文件&#xff09; ③ 通过依赖启动器简化构建配置 ④ 自动化配置Spring和第三方库 ⑤ 提供生产就绪功能 ⑥ 极少的代码生成…

Redis变慢了?之三

Redis变慢了&#xff1f;之三 Redis变慢了fork耗时优化方案 AOFAOF策略对性能影响 最后 Redis变慢了 Redis变慢上一篇文章地址&#xff1a;Redis变慢了&#xff1f;之二 这篇文章继续Redis变慢情况的分析。 fork耗时 在 Redis 中&#xff0c;fork 是一个非常重要的操作&…