|
@@ -4,14 +4,14 @@
|
|
|
@register="registerDrawer"
|
|
|
showFooter
|
|
|
:title="getTitle"
|
|
|
- width="50%"
|
|
|
+ width="60%"
|
|
|
@ok="handleSubmit"
|
|
|
>
|
|
|
<div class="entry-x">
|
|
|
<BasicForm @register="registerForm">
|
|
|
<template #map>
|
|
|
<!-- <Card style="width: 300px; height: 300px"> -->
|
|
|
- <div ref="wrapRef" style="width: 300px; height: 300px"></div>
|
|
|
+ <div ref="wrapRef" style="width: 600px; height: 400px"></div>
|
|
|
<!-- </Card> -->
|
|
|
</template>
|
|
|
</BasicForm>
|
|
@@ -32,7 +32,8 @@
|
|
|
|
|
|
import { useScript } from '/@/hooks/web/useScript';
|
|
|
|
|
|
- const A_MAP_URL = 'https://webapi.amap.com/maps?v=2.0&key=d7bb98e7185300250dd5f918c12f484b';
|
|
|
+ const A_MAP_URL = 'https://webapi.amap.com/maps?v=2.0&key=5a2d384532ae531bf99bd8487c4f03d2';
|
|
|
+ // const A_MAP_URL = 'https://webapi.amap.com/maps?v=1.4.10&key=e661b00bdf2c44cccf71ef6070ef41b8';
|
|
|
|
|
|
//webapi.amap.com/maps?v=1.4.10&key=e661b00bdf2c44cccf71ef6070ef41b8
|
|
|
|
|
@@ -175,11 +176,17 @@
|
|
|
if (!wrapEl) return;
|
|
|
const AMap = (window as any).AMap;
|
|
|
console.log('AMap', AMap);
|
|
|
- new AMap.Map(wrapEl, {
|
|
|
- zoom: 11,
|
|
|
- center: [116.397428, 39.90923],
|
|
|
+ // center: [this.longitude || 120.262337, this.latitude || 30.178285],
|
|
|
+ const map = new AMap.Map(wrapEl, {
|
|
|
+ zoom: 30,
|
|
|
+ center: [120.262337, 30.178285],
|
|
|
viewMode: '3D',
|
|
|
});
|
|
|
+ const marker = new AMap.Marker({
|
|
|
+ position: new AMap.LngLat(120.262337, 30.178285), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
|
|
+ title: 'lala',
|
|
|
+ });
|
|
|
+ map.add(marker);
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
initMap();
|