• <small id='hEy4J'></small><noframes id='hEy4J'>

  • <i id='hEy4J'><tr id='hEy4J'><dt id='hEy4J'><q id='hEy4J'><span id='hEy4J'><b id='hEy4J'><form id='hEy4J'><ins id='hEy4J'></ins><ul id='hEy4J'></ul><sub id='hEy4J'></sub></form><legend id='hEy4J'></legend><bdo id='hEy4J'><pre id='hEy4J'><center id='hEy4J'></center></pre></bdo></b><th id='hEy4J'></th></span></q></dt></tr></i><div id='hEy4J'><tfoot id='hEy4J'></tfoot><dl id='hEy4J'><fieldset id='hEy4J'></fieldset></dl></div>
    <tfoot id='hEy4J'></tfoot>
      <bdo id='hEy4J'></bdo><ul id='hEy4J'></ul>

  • <legend id='hEy4J'><style id='hEy4J'><dir id='hEy4J'><q id='hEy4J'></q></dir></style></legend>

        在 Google 地图上制作可点击的多边形(适用于 And

        时间:2023-09-01

            <tbody id='xO4YV'></tbody>

            <i id='xO4YV'><tr id='xO4YV'><dt id='xO4YV'><q id='xO4YV'><span id='xO4YV'><b id='xO4YV'><form id='xO4YV'><ins id='xO4YV'></ins><ul id='xO4YV'></ul><sub id='xO4YV'></sub></form><legend id='xO4YV'></legend><bdo id='xO4YV'><pre id='xO4YV'><center id='xO4YV'></center></pre></bdo></b><th id='xO4YV'></th></span></q></dt></tr></i><div id='xO4YV'><tfoot id='xO4YV'></tfoot><dl id='xO4YV'><fieldset id='xO4YV'></fieldset></dl></div>
            <tfoot id='xO4YV'></tfoot>
              <bdo id='xO4YV'></bdo><ul id='xO4YV'></ul>

                • <legend id='xO4YV'><style id='xO4YV'><dir id='xO4YV'><q id='xO4YV'></q></dir></style></legend>
                • <small id='xO4YV'></small><noframes id='xO4YV'>

                • 本文介绍了在 Google 地图上制作可点击的多边形(适用于 Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个城市各个区域的连续 LatLngs.有什么方法可以用它创建可点击的多边形.曾经的方法是

                  I have continuous LatLngs of various areas in a city. Is there any way I can create clickable polygons with it. Once way to go about would be to

                  • 使用可用的 LatLngs 生成多边形.(我想用颜色编码在地图上直观地显示多边形)
                  • 设置setOnMapClickListener.
                  • 在多边形内做一个点测试.

                  我知道这很幼稚.有哪些替代方法?

                  I understand that this is very naive. What are the alternative approaches?

                  推荐答案

                  我是这样做的.

                      Polygon polygon = getMap().addPolygon(new PolygonOptions()
                                      .add(new LatLng(12.780712, 77.770956), new LatLng(12.912006, 77.229738), new LatLng(12.412006, 77.629738), new LatLng(12.912006, 77.229738))
                                      .strokeColor(0xFF00AA00)
                                      .fillColor(0x2200FFFF)
                                      .strokeWidth(2)
                      );
                  
                  
                      polygon.setClickable(true);
                  
                      getMap().setOnPolygonClickListener(new GoogleMap.OnPolygonClickListener() {
                          public void onPolygonClick(Polygon polygon) {
                  
                              mClusterManager = new ClusterManager<MyItem>(getApplicationContext(), getMap());
                              getMap().setOnCameraChangeListener(mClusterManager);
                              getMap().moveCamera(CameraUpdateFactory.newLatLngZoom(getMap().getCameraPosition().target, getMap().getCameraPosition().zoom));
                  
                              try {
                                  readItems();
                              } catch (JSONException e) {
                                  Toast.makeText(getApplicationContext(), "Problem reading list of markers.", Toast.LENGTH_LONG).show();
                              }
                  
                          }
                      });
                  

                  希望对您有所帮助.

                  这篇关于在 Google 地图上制作可点击的多边形(适用于 Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Android中如何知道定位模式是WIFI还是2G/3G基站? 下一篇:MKMapView MKCircle 渲染一个半径太大的圆

                  相关文章

                  最新文章

                  <legend id='vjo2r'><style id='vjo2r'><dir id='vjo2r'><q id='vjo2r'></q></dir></style></legend>
                    1. <i id='vjo2r'><tr id='vjo2r'><dt id='vjo2r'><q id='vjo2r'><span id='vjo2r'><b id='vjo2r'><form id='vjo2r'><ins id='vjo2r'></ins><ul id='vjo2r'></ul><sub id='vjo2r'></sub></form><legend id='vjo2r'></legend><bdo id='vjo2r'><pre id='vjo2r'><center id='vjo2r'></center></pre></bdo></b><th id='vjo2r'></th></span></q></dt></tr></i><div id='vjo2r'><tfoot id='vjo2r'></tfoot><dl id='vjo2r'><fieldset id='vjo2r'></fieldset></dl></div>

                        <bdo id='vjo2r'></bdo><ul id='vjo2r'></ul>
                    2. <tfoot id='vjo2r'></tfoot>

                    3. <small id='vjo2r'></small><noframes id='vjo2r'>