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