fix(boundry): fix 数据精度配置问题

This commit is contained in:
thinkinggis 2020-05-28 16:50:29 +08:00
parent 0e1645f809
commit 42fd2eca1c
3 changed files with 9 additions and 7 deletions

View File

@ -2,7 +2,7 @@
import merge from 'lodash/merge'; import merge from 'lodash/merge';
let DataLevel = 2; let DataLevel = 2;
const dataLevel1: { [key: string]: any } = { const dataLevel2: { [key: string]: any } = {
world: { world: {
fill: { fill: {
type: 'pbf', type: 'pbf',
@ -122,7 +122,7 @@ const dataLevel1: { [key: string]: any } = {
110000: '', 110000: '',
}, },
}; };
const dataLevel2: { [key: string]: any } = { const dataLevel1: { [key: string]: any } = {
world: { world: {
fill: { fill: {
type: 'pbf', type: 'pbf',
@ -181,12 +181,12 @@ const dataLevel2: { [key: string]: any } = {
line: { line: {
type: 'pbf', type: 'pbf',
url: url:
'//gw.alipayobjects.com/os/bmw-prod/8bfbfe7e-bd0e-4bbe-84d8-629f4dc7abc4.bin', '//gw.alipayobjects.com/os/bmw-prod/561e2cfe-9460-42d1-a2f8-3fd2e1274c52.bin',
}, },
cityLine: { cityLine: {
type: 'pbf', type: 'pbf',
url: url:
'//gw.alipayobjects.com/os/bmw-prod/8bfbfe7e-bd0e-4bbe-84d8-629f4dc7abc4.bin', '//gw.alipayobjects.com/os/bmw-prod/561e2cfe-9460-42d1-a2f8-3fd2e1274c52.bin',
}, },
provinceLine: { provinceLine: {
type: 'pbf', type: 'pbf',

View File

@ -312,7 +312,9 @@ export default class BaseLayer extends EventEmitter {
}); });
popupLayer.on(popup.closeTriggerEvent as string, (e) => { popupLayer.on(popup.closeTriggerEvent as string, (e) => {
this.popup.remove(); if (this.popup) {
this.popup.remove();
}
}); });
} }

View File

@ -16,10 +16,10 @@ export default class CountryLayer extends BaseLayer {
this.addProvinceLine(countryConfig.provinceLine); this.addProvinceLine(countryConfig.provinceLine);
if (depth === 2 * 1) { if (depth === 2 * 1) {
this.addCityBorder(countryConfig.cityLine); this.addCityBorder(countryConfig.fill);
} }
if (depth === 3 * 1) { if (depth === 3 * 1) {
this.addCountyBorder(countryConfig.countryLine); this.addCountyBorder(countryConfig.fill);
} }
} }
protected async addProvinceFill() { protected async addProvinceFill() {