tiny-vue/examples/sites/demos/pc/app/chart/amap/base-composition-api.vue

33 lines
733 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<tiny-autonavi-map :settings="chartSettings" :series="chartSeries" :tooltip="chartTooltip"></tiny-autonavi-map>
</div>
</template>
<script setup lang="jsx">
import { ref } from 'vue'
import { AutonaviMap as TinyAutonaviMap } from '@opentiny/vue'
const chartSettings = {
key: '4b5f2cf2cba25200cc6b68c398468899',
url: 'https://webapi.amap.com/maps', // 谷歌地图接口的url地址
v: '1.4.3',
amap: {
resizeEnable: true,
center: [120.14322240845, 30.236064370321],
zoom: 10
}
}
const chartTooltip = { show: true }
const chartSeries = ref([
{
type: 'scatter',
coordinateSystem: 'bmap',
data: [
[120, 30, 1] // 经度维度value...
]
}
])
</script>