From 546b5e01fb55b6a5a4c48fbae6ab04401a3f9dd2 Mon Sep 17 00:00:00 2001 From: deanchen Date: Wed, 14 Apr 2021 14:34:22 +0800 Subject: [PATCH] fix: restore village name --- src/models/Map.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/models/Map.js b/src/models/Map.js index 22b63fc1a..f97e9f0ba 100644 --- a/src/models/Map.js +++ b/src/models/Map.js @@ -155,12 +155,14 @@ export default class Map{ async loadGoogleSatellite(){ log.warn("load google satellite map"); - this.layerGoogle = this.L.gridLayer.googleMutant({ - maxZoom: this.maxZoom, - type: 'satellite' - }); + this.layerGoogle = this.L.tileLayer( + 'http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}',{ + maxZoom: this.maxZoom, + //attribution: 'Map data © OpenStreetMap contributors, ' + + //'Imagery © Mapbox', + subdomains:['mt0','mt1','mt2','mt3'] + }); this.layerGoogle.addTo(this.map); - //wait loaded await new Promise((res, _rej) => { this.layerGoogle.once("load", async () => { log.warn("google layer loaded");