0%

vue3 gis 常用库

turf topojson three lodash

1
2
3
4
5
6
7
8
9
10
11
import { onMounted, onUnmounted, nextTick, ref } from "vue";
import * as turf from "@turf/turf";
import mymap from "./../../views/dmap/components/sgmap/index.vue";
// import mymap from "./components/mapbox/index.vue";
// import mapboxgl from "mapbox-gl";
// import * as THREE from "three";
// import { debounce } from "lodash";
// import _ from 'lodash';

import * as d3 from "d3";
import * as topojson from "topojson";

d3

1
npm install --save d3

if TypeScript

1
npm install --save-dev @types/d3
1
import * as d3 from "d3";

map style

Mapbox-owned style:

  • mapbox://styles/mapbox/standard
  • mapbox://styles/mapbox/streets-v12
  • mapbox://styles/mapbox/outdoors-v12
  • mapbox://styles/mapbox/light-v11
  • mapbox://styles/mapbox/dark-v11
  • mapbox://styles/mapbox/satellite-v9
  • mapbox://styles/mapbox/satellite-streets-v12
  • mapbox://styles/mapbox/navigation-day-v1
  • mapbox://styles/mapbox/navigation-night-v1.