Showing
1 changed file
with
13 additions
and
9 deletions
... | ... | @@ -20,13 +20,17 @@ import LeafletMap from '../leaflet-map'; |
20 | 20 | import { UnitedMapSettings } from '../map-models'; |
21 | 21 | |
22 | 22 | export class TencentMap extends LeafletMap { |
23 | - constructor($container, options: UnitedMapSettings) { | |
24 | - super($container, options); | |
25 | - const txUrl = 'http://rt{s}.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0'; | |
26 | - const map = L.map($container).setView(options?.defaultCenterPosition, options?.defaultZoomLevel); | |
27 | - const txLayer = L.tileLayer(txUrl, { subdomains: '0123', tms: true }).addTo(map); | |
28 | - txLayer.addTo(map); | |
29 | - super.setMap(map); | |
30 | - super.initSettings(options); | |
31 | - } | |
23 | + constructor($container, options: UnitedMapSettings) { | |
24 | + super($container, options); | |
25 | + const txUrl = 'http://rt{s}.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0'; | |
26 | + const map = L.map($container).setView(options?.defaultCenterPosition, options?.defaultZoomLevel); | |
27 | + const txLayer = L.tileLayer(txUrl, { | |
28 | + subdomains: '0123', | |
29 | + tms: true, | |
30 | + attribution: '©2020 Tencent - GS(2018)2236号- Data© NavInfo' | |
31 | + }).addTo(map); | |
32 | + txLayer.addTo(map); | |
33 | + super.setMap(map); | |
34 | + super.initSettings(options); | |
35 | + } | |
32 | 36 | } | ... | ... |