mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
show provider of exchange rates data and map in about page
This commit is contained in:
@@ -11,6 +11,10 @@ const amapHolder = {
|
||||
AMap: null
|
||||
};
|
||||
|
||||
export function getAmapWebsite() {
|
||||
return 'https://www.amap.com';
|
||||
}
|
||||
|
||||
export function loadAmapAssets() {
|
||||
if (amapHolder.AMap) {
|
||||
return;
|
||||
|
||||
@@ -10,6 +10,10 @@ const baiduMapHolder = {
|
||||
COORDINATES_BD09: window.COORDINATES_BD09 || 5
|
||||
};
|
||||
|
||||
export function getBaiduMapWebsite() {
|
||||
return 'https://map.baidu.com';
|
||||
}
|
||||
|
||||
export function loadBaiduMapAssets() {
|
||||
if (baiduMapHolder.BMap) {
|
||||
return;
|
||||
|
||||
@@ -8,6 +8,10 @@ const googleMapHolder = {
|
||||
}
|
||||
};
|
||||
|
||||
export function getGoogleMapWebsite() {
|
||||
return 'https://maps.google.com';
|
||||
}
|
||||
|
||||
export function loadGoogleMapAssets(language) {
|
||||
if (googleMapHolder.googleMap) {
|
||||
return;
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
} from './leaflet.js';
|
||||
|
||||
import {
|
||||
getGoogleMapWebsite,
|
||||
loadGoogleMapAssets,
|
||||
createGoogleMapHolder,
|
||||
createGoogleMapInstance,
|
||||
@@ -22,6 +23,7 @@ import {
|
||||
} from './googlemap.js';
|
||||
|
||||
import {
|
||||
getBaiduMapWebsite,
|
||||
loadBaiduMapAssets,
|
||||
createBaiduMapHolder,
|
||||
createBaiduMapInstance,
|
||||
@@ -31,6 +33,7 @@ import {
|
||||
} from './baidumap.js';
|
||||
|
||||
import {
|
||||
getAmapWebsite,
|
||||
loadAmapAssets,
|
||||
createAmapHolder,
|
||||
createAmapInstance,
|
||||
@@ -39,6 +42,20 @@ import {
|
||||
removeAmapCenterMaker
|
||||
} from './amap.js';
|
||||
|
||||
export function getMapWebsite() {
|
||||
if (getMapProvider() === 'custom') {
|
||||
return '';
|
||||
} else if (mapConstants.leafletTileSources[getMapProvider()]) {
|
||||
return mapConstants.leafletTileSources[getMapProvider()].website;
|
||||
} else if (getMapProvider() === 'googlemap') {
|
||||
return getGoogleMapWebsite();
|
||||
} else if (getMapProvider() === 'baidumap') {
|
||||
return getBaiduMapWebsite();
|
||||
} else if (getMapProvider() === 'amap') {
|
||||
return getAmapWebsite();
|
||||
}
|
||||
}
|
||||
|
||||
export function loadMapAssets(language) {
|
||||
if (mapConstants.leafletTileSources[getMapProvider()] || getMapProvider() === 'custom') {
|
||||
return loadLeafletMapAssets(language);
|
||||
|
||||
Reference in New Issue
Block a user