Closed HFY-aa closed 9 months ago
hi @HFY-aa, welcome!
Hi @HFY-aa, Please star this repo if you find it useful! Thanks :star:! 你好 @HFY-aa。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!
Vue组合式API+TypeScript示例
const scene = shallowRef<Scene>()
onMounted(() => {
scene.value = new L7.Scene({
id: 'map',
map: new GaodeMap({
pitch: 0,
zoom: 14,
token: '[Key]', // 这
}),
})
})
useMapSecurityConfig()
declare const window: {
_AMapSecurityConfig?: {
serviceHost?: string // 代理服务器转发
securityJsCode?: string // 明文方式
}
} & Window
function useMapSecurityConfig() {
window._AMapSecurityConfig = {
securityJsCode: '[安全密钥]', // 和这
} as const
onScopeDispose(() => delete window._AMapSecurityConfig)
}