How to layout zoom Control with setBuiltInZoomControls(true)?

前端 未结 6 1185
迷失自我
迷失自我 2020-12-09 23:16

would like to add a zoom control to the map. I also want to layout the position of the zoom Control instead of the default middle bottom position. I can do this by getZoomCo

6条回答
  •  孤街浪徒
    2020-12-09 23:57

    LinearLayout zoomLayout = (LinearLayout) findViewById(R.id.layout_zoom);
    View mapController = mapView.getZoomButtonsController().getZoomControls();
    zoomLayout.addView(mapController, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    

提交回复
热议问题