{"id":748,"date":"2023-02-26T15:55:02","date_gmt":"2023-02-26T07:55:02","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=748"},"modified":"2023-02-26T15:57:16","modified_gmt":"2023-02-26T07:57:16","slug":"android-access-amap","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/26\/android-access-amap\/","title":{"rendered":"Android\u63a5\u5165\u9ad8\u5fb7\u5730\u56fe\u603b\u7ed3"},"content":{"rendered":"<h2>\u5e38\u7528\u8bbe\u7f6e<\/h2>\n<pre><code class=\"language-java\">final AMap aMap = mMapView.getMap();\n\naMap.setTrafficEnabled(false); \/\/\u663e\u793a\u5b9e\u65f6\u4ea4\u901a\u72b6\u51b5\n\/\/\u5730\u56fe\u6a21\u5f0f\u53ef\u9009\u7c7b\u578b\uff1aMAP_TYPE_NORMAL,MAP_TYPE_SATELLITE,MAP_TYPE_NIGHT\naMap.setMapType(AMap.MAP_TYPE_NORMAL); \/\/\u536b\u661f\u5730\u56fe\u6a21\u5f0f<\/code><\/pre>\n<p><!-- more --><\/p>\n<h2>\u8bbe\u7f6e\u9ed8\u8ba4\u663e\u793a\u4f4d\u7f6e\u53ca\u6bd4\u4f8b<\/h2>\n<pre><code class=\"language-java\">LatLng latLng = new LatLng(32.044052, 118.797218); \/\/\u6784\u9020\u4e00\u4e2a\u4f4d\u7f6e\naMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 18));<\/code><\/pre>\n<p>\u6570\u5b57\u201c16\u201d\u4e3a\u7f29\u653e\u7684\u6bd4\u4f8b<\/p>\n<h2>\u83b7\u53d6\u4f4d\u7f6e\u7684\u7ecf\u7eac\u5ea6<\/h2>\n<p>\u60f3\u77e5\u9053\u67d0\u4e2a\u4f4d\u7f6e\u7684\u7ecf\u7eac\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u7528\u9ad8\u5fb7\u5728\u7ebf\u5750\u6807\u62fe\u53d6\u5de5\u5177\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/lbs.amap.com\/console\/show\/picker\">https:\/\/lbs.amap.com\/console\/show\/picker<\/a><\/p>\n<h2>\u7f29\u653e\u548c\u4f4d\u79fb\u76d1\u542c<\/h2>\n<pre><code class=\"language-java\">aMap.setOnCameraChangeListener(new AMap.OnCameraChangeListener() {\n    @Override\n    public void onCameraChange(CameraPosition cameraPosition) {\n        \/\/cameraPosition.zoom\n\n    }\n\n    @Override\n    public void onCameraChangeFinish(CameraPosition cameraPosition) {\n\n    }\n});<\/code><\/pre>\n<h2>\u5b9a\u4f4dSDK<\/h2>\n<p>Android \u5b9a\u4f4dSDK\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/lbs.amap.com\/api\/android-location-sdk\/locationsummary\">https:\/\/lbs.amap.com\/api\/android-location-sdk\/locationsummary<\/a><br \/>\n\u83b7\u53d6\u5b9a\u4f4d\u6570\u636e\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/lbs.amap.com\/api\/android-location-sdk\/guide\/android-location\/getlocation\/\">https:\/\/lbs.amap.com\/api\/android-location-sdk\/guide\/android-location\/getlocation\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5e38\u7528\u8bbe\u7f6e final AMap aMap = mMapView.getMap(); aMap.setTraff [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[220],"class_list":["post-748","post","type-post","status-publish","format-standard","hentry","category-android-basic","tag-220"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=748"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/748\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}