style: 地图样式调整

This commit is contained in:
zhangyu
2022-08-23 13:54:13 +08:00
parent e45ceb34f0
commit e218bdb71e
7 changed files with 21 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@@ -599,9 +599,9 @@
box-shadow: $--chart-shadow;
}
.mapboxgl-control-container{
position: absolute;
bottom: 0;
right: 0;
//position: absolute;
//bottom: 0;
//right: 0;
summary{
display: none;
}

View File

@@ -522,6 +522,7 @@
white-space: nowrap;
}
.overview {
overflow: hidden;
.tooltip--row {
//display: flex;
justify-content: space-between;

View File

@@ -1,3 +1,4 @@
@import './nzIcon.css'; // 自定义图标的字体
@import './common/maplibre-gl.css'; // 地图样式
@import './font.scss'; // 字体
@import './index.scss'; // 主样式

View File

@@ -58,10 +58,7 @@
<script>
import chartMixin from '@/components/chart/chartMixin'
import chartFormat from '@/components/chart/chartFormat'
import * as L from 'leaflet'
import axios from 'axios'
import icon from 'leaflet/dist/images/marker-icon.png'
import iconShadow from 'leaflet/dist/images/marker-shadow.png'
import 'leaflet/dist/leaflet.css'
import maplibregl from 'maplibre-gl'
import mapAllStyle from './mapStyle'
@@ -90,10 +87,6 @@ export default {
},
mounted () {
this.chartInfo.loaded && this.initChart()
// for (let i = 0; i < 65535; i += 1) {
// const url = 'https://api.maptiler.com/fonts/Roboto Medium,Noto Sans Regular/' + i + '-' + (i + 255) + '.pbf?key=rB2y2a2rG8i9SEjOXQXl'
// window.open(url)
// }
},
methods: {
initChart () {
@@ -169,6 +162,9 @@ export default {
})
this.map.on('load', function () {
self.loadDataCenterMapData()
self.map.addControl(new maplibregl.NavigationControl(), 'bottom-right')
const mapboxglInner = document.getElementsByClassName('mapboxgl-ctrl-attrib-inner')
mapboxglInner[0].innerHTML = '<span>&copy; MapTiler</span> <span>&copy; OpenStreetMap contributors</span>'
})
maplibregl.addProtocol('nzMap', (params, callback) => { // 切片显示接口 防止跨域的问题
fetch(`${params.url.split('://')[1]}`)

File diff suppressed because one or more lines are too long

View File

@@ -63,7 +63,7 @@ export default {
this.map = null
}
this.setLatlng()
let mapStyle = mapAllStyle[this.theme]
const mapStyle = mapAllStyle[this.theme]
mapStyle.center = [Number(this.mapParam.longitude), Number(this.mapParam.latitude)]
mapStyle.zoom = Number(this.zoom)
const mapId = document.getElementById('map')
@@ -154,6 +154,9 @@ export default {
'circle-opacity': 1
}
})
self.map.addControl(new maplibregl.NavigationControl(), 'bottom-right')
const mapboxglInner = document.getElementsByClassName('mapboxgl-ctrl-attrib-inner')
mapboxglInner[0].innerHTML = '<span>&copy; MapTiler</span> <span>&copy; OpenStreetMap contributors</span>'
})
// const marker = L.marker([this.mapParam.latitude, this.mapParam.longitude]).addTo(map)
this.map.on('click', function (e) {