NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
## 一、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); ```