set reference libraries in google map js query

This commit is contained in:
MaysWind
2023-06-18 15:58:02 +08:00
parent d164cafd33
commit 812bfc7cf5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { asyncLoadAssets } from "@/lib/misc.js";
import services from "@/lib/services.js";
import { asyncLoadAssets } from '@/lib/misc.js';
import services from '@/lib/services.js';
const googleMapHolder = {
googleMap: null,
+2 -2
View File
@@ -413,9 +413,9 @@ export default {
},
generateGoogleMapJavascriptUrl: (language, callbackFnName) => {
if (language) {
return `${api.googleMapJavascriptUrl}?key=${settings.getGoogleMapAPIKey()}&language=${language}&callback=${callbackFnName}`;
return `${api.googleMapJavascriptUrl}?key=${settings.getGoogleMapAPIKey()}&libraries=core,marker&language=${language}&callback=${callbackFnName}`;
} else {
return `${api.googleMapJavascriptUrl}?key=${settings.getGoogleMapAPIKey()}&callback=${callbackFnName}`;
return `${api.googleMapJavascriptUrl}?key=${settings.getGoogleMapAPIKey()}&libraries=core,marker&callback=${callbackFnName}`;
}
},
generateBaiduMapJavascriptUrl: (callbackFnName) => {