diff --git a/src/packages/components/Charts/Maps/MapAmap/config.ts b/src/packages/components/Charts/Maps/MapAmap/config.ts
index 5fdbd21c..18c56c23 100644
--- a/src/packages/components/Charts/Maps/MapAmap/config.ts
+++ b/src/packages/components/Charts/Maps/MapAmap/config.ts
@@ -12,6 +12,9 @@ export const option = {
amapLon: 116.39,
amapLat: 40.91,
amapZindex: 10,
+ viewMode: '2D',
+ pitch: 60,
+ skyColor: '#53A9DE',
lang: 'zh_cn',
features: ['bg', 'point', 'road', 'building']
}
diff --git a/src/packages/components/Charts/Maps/MapAmap/config.vue b/src/packages/components/Charts/Maps/MapAmap/config.vue
index 76f419d6..cb984ec7 100644
--- a/src/packages/components/Charts/Maps/MapAmap/config.vue
+++ b/src/packages/components/Charts/Maps/MapAmap/config.vue
@@ -44,6 +44,29 @@
+
+
+
+
+
+ {{ song.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -71,6 +94,16 @@ const langOptions = ref([
label: '中英文对照'
}
])
+const viewModeOptions = ref([
+ {
+ value: '2D',
+ label: '2D'
+ },
+ {
+ value: '3D',
+ label: '3D'
+ }
+])
const featuresOptions = ref([
{
value: 'bg',
diff --git a/src/packages/components/Charts/Maps/MapAmap/index.vue b/src/packages/components/Charts/Maps/MapAmap/index.vue
index 9d947309..b9d84973 100644
--- a/src/packages/components/Charts/Maps/MapAmap/index.vue
+++ b/src/packages/components/Charts/Maps/MapAmap/index.vue
@@ -14,16 +14,26 @@ const props = defineProps({
required: true
}
})
-let { amapKey, amapStyleKey, amapLon, amapLat, amapZindex, lang, amapStyleKeyCustom, features } = toRefs(
- props.chartConfig.option
-)
+let {
+ amapKey,
+ amapStyleKey,
+ amapLon,
+ amapLat,
+ amapZindex,
+ lang,
+ amapStyleKeyCustom,
+ features,
+ viewMode,
+ pitch,
+ skyColor
+} = toRefs(props.chartConfig.option)
let map = shallowRef(null)
const ininMap = () => {
AMapLoader.load({
key: amapKey.value, //api服务key--另外需要在public中使用安全密钥!!!
- version: '1.4.4', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+ version: '1.4.8', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins: ['AMap.PlaceSearch', 'AMap.AutoComplete'] // 需要使用的的插件列表
})
.then(AMap => {
@@ -33,7 +43,10 @@ const ininMap = () => {
center: [amapLon.value, amapLat.value],
mapStyle: `amap://styles/${amapStyleKeyCustom.value !== '' ? amapStyleKeyCustom.value : amapStyleKey.value}`, //自定义地图的显示样式
lang: lang.value,
- features: features.value
+ features: features.value,
+ pitch: pitch.value, // 地图俯仰角度,有效范围 0 度- 83 度
+ skyColor: skyColor.value,
+ viewMode: viewMode.value, // 地图模式
})
})
.catch(e => {})