| | |
| | | <!-- <el-button plain @click="reset">重新绘制</el-button> --> |
| | | <!-- <el-button plain type="danger" @click="deleteObj">删除</el-button> --> |
| | | </div> |
| | | <div id="container" style="width: 100%; height: 100%"></div> |
| | | <div id="containera" style="width: 100%; height: 100%"></div> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | |
| | | }, |
| | | methods: { |
| | | initMap() { |
| | | map = new TMap.Map("container", { |
| | | zoom: 15, // 设置地图缩放级别 |
| | | // navigator.geolocation.getCurrentPosition( |
| | | // (position) => { |
| | | // const { latitude, longitude } = position.coords |
| | | // console.log(`当前定位: 纬度 ${latitude}, 经度 ${longitude}`) |
| | | // }, |
| | | // (error) => { |
| | | // console.error("定位失败:", error.message) |
| | | // }, |
| | | // { |
| | | // enableHighAccuracy: true, // 提高定位精度 |
| | | // timeout: 5000, // 超时时间 |
| | | // maximumAge: 0 // 禁用缓存 |
| | | // } |
| | | // ) |
| | | console.log('-----') |
| | | |
| | | map = new TMap.Map("containera", { |
| | | zoom: 16, // 设置地图缩放级别 |
| | | center: new TMap.LatLng(31.722763, 117.385480) // 设置地图中心点坐标 |
| | | }) |
| | | var tempList = [] |