Add copirated for tencent
This commit is contained in:
parent
8f880da13d
commit
d3dc4f73e1
@ -20,13 +20,17 @@ import LeafletMap from '../leaflet-map';
|
|||||||
import { UnitedMapSettings } from '../map-models';
|
import { UnitedMapSettings } from '../map-models';
|
||||||
|
|
||||||
export class TencentMap extends LeafletMap {
|
export class TencentMap extends LeafletMap {
|
||||||
constructor($container, options: UnitedMapSettings) {
|
constructor($container, options: UnitedMapSettings) {
|
||||||
super($container, options);
|
super($container, options);
|
||||||
const txUrl = 'http://rt{s}.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0';
|
const txUrl = 'http://rt{s}.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0';
|
||||||
const map = L.map($container).setView(options?.defaultCenterPosition, options?.defaultZoomLevel);
|
const map = L.map($container).setView(options?.defaultCenterPosition, options?.defaultZoomLevel);
|
||||||
const txLayer = L.tileLayer(txUrl, { subdomains: '0123', tms: true }).addTo(map);
|
const txLayer = L.tileLayer(txUrl, {
|
||||||
txLayer.addTo(map);
|
subdomains: '0123',
|
||||||
super.setMap(map);
|
tms: true,
|
||||||
super.initSettings(options);
|
attribution: '©2020 Tencent - GS(2018)2236号- Data© NavInfo'
|
||||||
}
|
}).addTo(map);
|
||||||
|
txLayer.addTo(map);
|
||||||
|
super.setMap(map);
|
||||||
|
super.initSettings(options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user