企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 一、MapView 1、中心坐标 ``` // 获取 console.log(mapView.center.longitude, mapView.center.latitude) // 设置 var centerCoord = { longitude: 102.91835013921454, latitude: 24.07329419928656 }; mapView.center = $.extend(mapView.center, coord); ``` 2、可视范围 ![](https://box.kancloud.cn/80f75ac8b0463caf1fc24984b728f83d_969x580.jpg) ``` var extentJSON = mapView.extent.toJSON(); var ptMin = new Point({ x: extentJSON.xmin, y: extentJSON.ymin, spatialReference: extentJSON.spatialReference }); var ptMax = new Point({ x: extentJSON.xmax, y: extentJSON.ymax, spatialReference: extentJSON.spatialReference }); console.log(ptMin, ptMax); ```