标注更新
Showing
1 changed file
with
8 additions
and
4 deletions
| ... | @@ -57,19 +57,23 @@ GeoQ地图层 | ... | @@ -57,19 +57,23 @@ GeoQ地图层 |
| 57 | ## 基本用法 | 57 | ## 基本用法 |
| 58 | 58 | ||
| 59 | 天地图2000 | 59 | 天地图2000 |
| 60 | ``` | 60 | ```java |
| 61 | t_vec = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.VEC_C); | 61 | t_vec = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.VEC_C); |
| 62 | mapView.addLayer(t_vec); | 62 | mapView.addLayer(t_vec); |
| 63 | Point initPoint = new Point(121.56, 29.862149); | 63 | Point initPoint = new Point(121.56, 29.862149); |
| 64 | mapView.zoomToResolution(initPoint, t_vec.getRes()[16]); | 64 | mapView.zoomToResolution(initPoint, t_vec.getRes()[16]); |
| 65 | ``` | 65 | ``` |
| 66 | 百度地图 | ||
| 67 | ```java | ||
| 66 | 68 | ||
| 67 | 其它(以Tencent图层为例) | ||
| 68 | ``` | 69 | ``` |
| 70 | |||
| 71 | 其它(以Tencent图层为例) | ||
| 72 | ```java | ||
| 69 | TencentMapsTiledServiceLayer tencentMapsTiledServiceLayer = new TencentMapsTiledServiceLayer(TencentMapLayerTypes.TENCENT_MAP_VECTOR); | 73 | TencentMapsTiledServiceLayer tencentMapsTiledServiceLayer = new TencentMapsTiledServiceLayer(TencentMapLayerTypes.TENCENT_MAP_VECTOR); |
| 70 | mapView.addLayer(tencentMapsTiledServiceLayer); | 74 | mapView.addLayer(tencentMapsTiledServiceLayer); |
| 71 | // 经纬度坐标要换成web墨卡托 | 75 | // 经纬度坐标要转换为GCJ02后,再换成web墨卡托 |
| 72 | Point initPoint = new Point(121.56, 29.862149); | 76 | Point initPoint = JZLocationConverter.wgs84ToGcj02(new Point(121.56, 29.862149)); |
| 73 | Point pt = GISHelper.lonLat2Mercator(initPoint); | 77 | Point pt = GISHelper.lonLat2Mercator(initPoint); |
| 74 | mapView.zoomToResolution(pt, tencentMapsTiledServiceLayer.getRes()[16]); | 78 | mapView.zoomToResolution(pt, tencentMapsTiledServiceLayer.getRes()[16]); |
| 75 | 79 | ... | ... |
-
Please register or sign in to post a comment