Commit 169114c1 authored by 吕超's avatar 吕超

fix: 修改省名字图层

parent 0d342b95
NODE_ENV=development
VUE_APP_MAP_INIT_STYLE=http://39.104.87.15/api/tileset
VUE_APP_YGYX_URL=http://39.104.87.15/api/rasterviz
VUE_APP_BASE_MAP_URL=http://39.104.87.15/api/basemap/style/
VUE_APP_BASE_URL=http://39.104.87.15
DECIMAL_NUMBER=4
\ No newline at end of file
NODE_ENV=development
VUE_APP_MAP_INIT_STYLE=http://localhost/api/tileset
VUE_APP_YGYX_URL=http://localhost/api/rasterviz
VUE_APP_BASE_MAP_URL=http://localhost/api/basemap/style/
VUE_APP_MAP_INIT_STYLE=http://39.104.87.15/api/tileset
VUE_APP_BASE_URL=http://39.104.87.15
DECIMAL_NUMBER=4
\ No newline at end of file
......@@ -6,6 +6,7 @@
import mapboxgl from "mapbox-gl";
import { register } from "./config/map.js";
import style from "./config/index.js";
import provincePoint from "./config/province_point.json";
export default {
props: {
center: {
......@@ -76,6 +77,7 @@ export default {
map.addLayer(item);
});
await this.addProvinceLayer();
await this.addProvincePoint();
this.$emit("onload", map);
});
},
......@@ -98,24 +100,25 @@ export default {
"fill-color": "rgba(0, 0, 0, 0)",
},
});
},
addProvincePoint() {
this.map.addSource("__province_point", {
type: "geojson",
data: provincePoint,
});
this.map.addLayer({
id: "__province_title",
id: "__province_point",
source: "__province_point",
type: "symbol",
source: "area_title",
"source-layer": "province",
layout: {
"text-font": ["open-sans"],
"text-field": "{PXZQMC}",
"text-size": 16,
"text-max-width": 5,
},
// maxzoom: 7,
// minzoom: 1,
paint: {
"text-color": "#fff",
"text-halo-color": "#000",
"text-halo-width": 1,
},
layout: {
"text-field": ["get", "P_XZQMC"],
"text-size": 15,
},
});
},
},
......
{
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"features": [
{
"type": "Feature",
"id": 1,
"geometry": {
"type": "Point",
"coordinates": [
109.7410285849312,
19.187660660288032
]
},
"properties": {
"OBJECTID_1": 1,
"OBJECTID": 1,
"P_XZQDM": "46",
"P_XZQMC": "海南省",
"ORIG_FID": 1
}
},
{
"type": "Feature",
"id": 2,
"geometry": {
"type": "Point",
"coordinates": [
108.787090619737,
23.833737310403762
]
},
"properties": {
"OBJECTID_1": 2,
"OBJECTID": 2,
"P_XZQDM": "45",
"P_XZQMC": "广西壮族自治区",
"ORIG_FID": 2
}
},
{
"type": "Feature",
"id": 3,
"geometry": {
"type": "Point",
"coordinates": [
114.16135489554995,
22.424174621273153
]
},
"properties": {
"OBJECTID_1": 3,
"OBJECTID": 3,
"P_XZQDM": "81",
"P_XZQMC": "香港特别行政区",
"ORIG_FID": 3
}
},
{
"type": "Feature",
"id": 4,
"geometry": {
"type": "Point",
"coordinates": [
117.97478922235894,
26.084900807925465
]
},
"properties": {
"OBJECTID_1": 4,
"OBJECTID": 4,
"P_XZQDM": "35",
"P_XZQMC": "福建省",
"ORIG_FID": 4
}
},
{
"type": "Feature",
"id": 5,
"geometry": {
"type": "Point",
"coordinates": [
115.72099593943358,
27.613290796560534
]
},
"properties": {
"OBJECTID_1": 5,
"OBJECTID": 5,
"P_XZQDM": "36",
"P_XZQMC": "江西省",
"ORIG_FID": 5
}
},
{
"type": "Feature",
"id": 6,
"geometry": {
"type": "Point",
"coordinates": [
120.97340472940925,
23.751387757871328
]
},
"properties": {
"OBJECTID_1": 6,
"OBJECTID": 6,
"P_XZQDM": "71",
"P_XZQMC": "台湾省",
"ORIG_FID": 6
}
},
{
"type": "Feature",
"id": 7,
"geometry": {
"type": "Point",
"coordinates": [
120.0401730237777,
29.170595348797519
]
},
"properties": {
"OBJECTID_1": 7,
"OBJECTID": 7,
"P_XZQDM": "33",
"P_XZQMC": "浙江省",
"ORIG_FID": 7
}
},
{
"type": "Feature",
"id": 8,
"geometry": {
"type": "Point",
"coordinates": [
111.70953324967991,
27.609775601070453
]
},
"properties": {
"OBJECTID_1": 8,
"OBJECTID": 8,
"P_XZQDM": "43",
"P_XZQMC": "湖南省",
"ORIG_FID": 8
}
},
{
"type": "Feature",
"id": 9,
"geometry": {
"type": "Point",
"coordinates": [
121.38809756941043,
31.091094539111964
]
},
"properties": {
"OBJECTID_1": 9,
"OBJECTID": 9,
"P_XZQDM": "31",
"P_XZQMC": "上海市",
"ORIG_FID": 9
}
},
{
"type": "Feature",
"id": 10,
"geometry": {
"type": "Point",
"coordinates": [
117.22798896622442,
31.824478467934739
]
},
"properties": {
"OBJECTID_1": 10,
"OBJECTID": 10,
"P_XZQDM": "34",
"P_XZQMC": "安徽省",
"ORIG_FID": 10
}
},
{
"type": "Feature",
"id": 11,
"geometry": {
"type": "Point",
"coordinates": [
120.49325541927726,
32.265713393222143
]
},
"properties": {
"OBJECTID_1": 11,
"OBJECTID": 11,
"P_XZQDM": "32",
"P_XZQMC": "江苏省",
"ORIG_FID": 11
}
},
{
"type": "Feature",
"id": 12,
"geometry": {
"type": "Point",
"coordinates": [
118.14069044977805,
36.339428218091825
]
},
"properties": {
"OBJECTID_1": 12,
"OBJECTID": 12,
"P_XZQDM": "37",
"P_XZQMC": "山东省",
"ORIG_FID": 12
}
},
{
"type": "Feature",
"id": 13,
"geometry": {
"type": "Point",
"coordinates": [
96.040254827642514,
35.671418109660067
]
},
"properties": {
"OBJECTID_1": 13,
"OBJECTID": 13,
"P_XZQDM": "63",
"P_XZQMC": "青海省",
"ORIG_FID": 13
}
},
{
"type": "Feature",
"id": 14,
"geometry": {
"type": "Point",
"coordinates": [
108.34669629579759,
33.763230561024216
]
},
"properties": {
"OBJECTID_1": 14,
"OBJECTID": 14,
"P_XZQDM": "61",
"P_XZQMC": "陕西省",
"ORIG_FID": 14
}
},
{
"type": "Feature",
"id": 15,
"geometry": {
"type": "Point",
"coordinates": [
124.02913137373923,
41.563540501738657
]
},
"properties": {
"OBJECTID_1": 15,
"OBJECTID": 15,
"P_XZQDM": "21",
"P_XZQMC": "辽宁省",
"ORIG_FID": 15
}
},
{
"type": "Feature",
"id": 16,
"geometry": {
"type": "Point",
"coordinates": [
115.08293408361612,
38.878273512530541
]
},
"properties": {
"OBJECTID_1": 16,
"OBJECTID": 16,
"P_XZQDM": "13",
"P_XZQMC": "河北省",
"ORIG_FID": 16
}
},
{
"type": "Feature",
"id": 17,
"geometry": {
"type": "Point",
"coordinates": [
112.26546111157256,
30.978509808321064
]
},
"properties": {
"OBJECTID_1": 17,
"OBJECTID": 17,
"P_XZQDM": "42",
"P_XZQMC": "湖北省",
"ORIG_FID": 17
}
},
{
"type": "Feature",
"id": 18,
"geometry": {
"type": "Point",
"coordinates": [
102.69366891428945,
30.628822407394694
]
},
"properties": {
"OBJECTID_1": 18,
"OBJECTID": 18,
"P_XZQDM": "51",
"P_XZQMC": "四川省",
"ORIG_FID": 18
}
},
{
"type": "Feature",
"id": 19,
"geometry": {
"type": "Point",
"coordinates": [
105.88970143182587,
37.123794557065537
]
},
"properties": {
"OBJECTID_1": 19,
"OBJECTID": 19,
"P_XZQDM": "64",
"P_XZQMC": "宁夏回族自治区",
"ORIG_FID": 19
}
},
{
"type": "Feature",
"id": 20,
"geometry": {
"type": "Point",
"coordinates": [
112.29473656716311,
37.579180997242645
]
},
"properties": {
"OBJECTID_1": 20,
"OBJECTID": 20,
"P_XZQDM": "14",
"P_XZQMC": "山西省",
"ORIG_FID": 20
}
},
{
"type": "Feature",
"id": 21,
"geometry": {
"type": "Point",
"coordinates": [
116.41646392027417,
40.184772369762243
]
},
"properties": {
"OBJECTID_1": 21,
"OBJECTID": 21,
"P_XZQDM": "11",
"P_XZQMC": "北京市",
"ORIG_FID": 21
}
},
{
"type": "Feature",
"id": 22,
"geometry": {
"type": "Point",
"coordinates": [
85.189645406872387,
41.11374576406115
]
},
"properties": {
"OBJECTID_1": 22,
"OBJECTID": 22,
"P_XZQDM": "65",
"P_XZQMC": "新疆维吾尔自治区",
"ORIG_FID": 22
}
},
{
"type": "Feature",
"id": 23,
"geometry": {
"type": "Point",
"coordinates": [
128.13092488057885,
46.965847892643524
]
},
"properties": {
"OBJECTID_1": 23,
"OBJECTID": 23,
"P_XZQDM": "23",
"P_XZQMC": "黑龙江省",
"ORIG_FID": 23
}
},
{
"type": "Feature",
"id": 24,
"geometry": {
"type": "Point",
"coordinates": [
107.87557687943485,
30.057744509751672
]
},
"properties": {
"OBJECTID_1": 24,
"OBJECTID": 24,
"P_XZQDM": "50",
"P_XZQMC": "重庆市",
"ORIG_FID": 24
}
},
{
"type": "Feature",
"id": 25,
"geometry": {
"type": "Point",
"coordinates": [
113.6141231079655,
33.884729521695419
]
},
"properties": {
"OBJECTID_1": 25,
"OBJECTID": 25,
"P_XZQDM": "41",
"P_XZQMC": "河南省",
"ORIG_FID": 25
}
},
{
"type": "Feature",
"id": 26,
"geometry": {
"type": "Point",
"coordinates": [
88.442849546199284,
31.491501951604278
]
},
"properties": {
"OBJECTID_1": 26,
"OBJECTID": 26,
"P_XZQDM": "54",
"P_XZQMC": "西藏自治区",
"ORIG_FID": 26
}
},
{
"type": "Feature",
"id": 27,
"geometry": {
"type": "Point",
"coordinates": [
117.32523534292727,
39.298124608243484
]
},
"properties": {
"OBJECTID_1": 27,
"OBJECTID": 27,
"P_XZQDM": "12",
"P_XZQMC": "天津市",
"ORIG_FID": 27
}
},
{
"type": "Feature",
"id": 28,
"geometry": {
"type": "Point",
"coordinates": [
111.60900281947477,
41.578780836456815
]
},
"properties": {
"OBJECTID_1": 28,
"OBJECTID": 28,
"P_XZQDM": "15",
"P_XZQMC": "内蒙古自治区",
"ORIG_FID": 28
}
},
{
"type": "Feature",
"id": 29,
"geometry": {
"type": "Point",
"coordinates": [
106.87489552545838,
26.81561444776645
]
},
"properties": {
"OBJECTID_1": 29,
"OBJECTID": 29,
"P_XZQDM": "52",
"P_XZQMC": "贵州省",
"ORIG_FID": 29
}
},
{
"type": "Feature",
"id": 30,
"geometry": {
"type": "Point",
"coordinates": [
101.85121716429092,
24.27223169743479
]
},
"properties": {
"OBJECTID_1": 30,
"OBJECTID": 30,
"P_XZQDM": "53",
"P_XZQMC": "云南省",
"ORIG_FID": 30
}
},
{
"type": "Feature",
"id": 31,
"geometry": {
"type": "Point",
"coordinates": [
104.60431863859441,
35.049299156460393
]
},
"properties": {
"OBJECTID_1": 31,
"OBJECTID": 31,
"P_XZQDM": "62",
"P_XZQMC": "甘肃省",
"ORIG_FID": 31
}
},
{
"type": "Feature",
"id": 32,
"geometry": {
"type": "Point",
"coordinates": [
126.1940102504891,
43.665778497834197
]
},
"properties": {
"OBJECTID_1": 32,
"OBJECTID": 32,
"P_XZQDM": "22",
"P_XZQMC": "吉林省",
"ORIG_FID": 32
}
},
{
"type": "Feature",
"id": 33,
"geometry": {
"type": "Point",
"coordinates": [
113.5696799999323,
22.125990148311018
]
},
"properties": {
"OBJECTID_1": 33,
"OBJECTID": 33,
"P_XZQDM": "82",
"P_XZQMC": "澳门特别行政区",
"ORIG_FID": 33
}
},
{
"type": "Feature",
"id": 34,
"geometry": {
"type": "Point",
"coordinates": [
113.41846723207721,
23.793458870592019
]
},
"properties": {
"OBJECTID_1": 34,
"OBJECTID": 34,
"P_XZQDM": "44",
"P_XZQMC": "广东省",
"ORIG_FID": 34
}
}
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment