Compare commits
2 Commits
44407a0944
...
2f1d4e4cc7
| Author | SHA1 | Date |
|---|---|---|
|
|
2f1d4e4cc7 | |
|
|
65145ae8a4 |
|
|
@ -274,7 +274,7 @@
|
|||
watch,
|
||||
inject,
|
||||
} from 'vue';
|
||||
import * as turf from '@turf/turf';
|
||||
// import * as turf from '@turf/turf';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import {
|
||||
CloseOutlined,
|
||||
|
|
@ -330,6 +330,7 @@
|
|||
import { customDrawStyles } from './Styles/Styles';
|
||||
import Drawtool from '@/views/datamaintenance/components/drawtool.vue';
|
||||
import { WktToGeojson, GeojsonToWkt,wktCollectionToGeoJson } from './src/WktGeojsonTransform';
|
||||
// GeojsonToWkt(1232);
|
||||
import { features } from 'process';
|
||||
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
|
|
@ -469,7 +470,6 @@
|
|||
if(wktArray.length>0){
|
||||
|
||||
wktArray?.forEach((item,index)=>{
|
||||
console.log("item",item);
|
||||
let feature = {
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -10,13 +10,11 @@ const wktCollectionToGeoJson = (wktStr) => {
|
|||
|
||||
const WktToGeojson = (wktData)=> {
|
||||
// return WKT.parse(wktData)
|
||||
console.log("wktData",wktData);
|
||||
return wktToGeoJSON(wktData);
|
||||
}
|
||||
|
||||
const GeojsonToWkt = (geojsonData)=> {
|
||||
// return WKT.convert(geojsonData)
|
||||
console.log("geojsonData",geojsonData)
|
||||
|
||||
return geojsonToWKT(geojsonData)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,58 +9,36 @@ export const MapboxDefaultStyle = {
|
|||
glyphs: 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf',
|
||||
version: 8,
|
||||
sources: {
|
||||
dianzi: {
|
||||
'raster-tiles': {
|
||||
type: 'raster',
|
||||
tiles: [
|
||||
`https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=${MapboxConfig.TDT_TOKEN}`,
|
||||
`http://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=${MapboxConfig.TDT_TOKEN}`,
|
||||
],
|
||||
tileSize: 256,
|
||||
minzoom: 18,
|
||||
maxzoom: 24,
|
||||
minzoom: 1,
|
||||
maxzoom: 17,
|
||||
},
|
||||
'dianzi-biaozhu': {
|
||||
'raster-tiles-font': {
|
||||
type: 'raster',
|
||||
tiles: [
|
||||
`https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=${MapboxConfig.TDT_TOKEN}`,
|
||||
],
|
||||
tileSize: 256,
|
||||
},
|
||||
'raster-tiles': {
|
||||
type: 'raster',
|
||||
tiles: [
|
||||
`https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=${MapboxConfig.TDT_TOKEN}`,
|
||||
],
|
||||
tileSize: 256,
|
||||
minzoom: 0,
|
||||
maxzoom: 18,
|
||||
},
|
||||
}
|
||||
},
|
||||
layers: [
|
||||
{
|
||||
id: 'dianzi-biaozhu',
|
||||
id: 'tdt-vec-tiles',
|
||||
type: 'raster',
|
||||
source: 'dianzi-biaozhu',
|
||||
layout: {
|
||||
visibility: 'visible',
|
||||
},
|
||||
source: 'raster-tiles-font',
|
||||
maxZoom: 32,
|
||||
},
|
||||
{
|
||||
id: 'tdt-img-tiles',
|
||||
type: 'raster',
|
||||
source: 'raster-tiles',
|
||||
minzoom: 0,
|
||||
maxzoom: 18,
|
||||
},
|
||||
{
|
||||
id: 'dianzi',
|
||||
type: 'raster',
|
||||
source: 'dianzi',
|
||||
layout: {
|
||||
visibility: 'visible',
|
||||
},
|
||||
minzoom: 18,
|
||||
maxzoom: 24,
|
||||
},
|
||||
maxZoom: 32,
|
||||
}
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue