android.widget.ZoomControls Java Examples
The following examples show how to use
android.widget.ZoomControls.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MapPickerActivity.java From o2oa with GNU Affero General Public License v3.0 | 5 votes |
private void initMap() { //ricky init baidumap begin mMapView = (MapView) findViewById(R.id.bmapView); mBaiduMap = mMapView.getMap(); mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL); mMapView.showZoomControls(false); MapStatusUpdate msu = MapStatusUpdateFactory.zoomTo(17.0f); mBaiduMap.setMapStatus(msu); mBaiduMap.setOnMapTouchListener(touchListener); // 初始化POI信息列表 mInfoList = new ArrayList<PoiInfo>(); // 初始化当前MapView中心屏幕坐标,初始化当前地理坐标 mCenterPoint = mBaiduMap.getMapStatus().targetScreen; mLoactionLatLng = mBaiduMap.getMapStatus().target; // 定位 mBaiduMap.setMyLocationEnabled(true); // 隐藏百度logo ZoomControl int count = mMapView.getChildCount(); for (int i = 0; i < count; i++) { View child = mMapView.getChildAt(i); if (child instanceof ImageView || child instanceof ZoomControls) { child.setVisibility(View.INVISIBLE); } } // 隐藏比例尺 //mMapView.showScaleControl(false); // 地理编码 mGeoCoder = GeoCoder.newInstance(); mGeoCoder.setOnGetGeoCodeResultListener(GeoListener); list = (ListView) findViewById(R.id.list); list.setOnItemClickListener(this); list.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE); loading = (ProgressBar) findViewById(R.id.loading); status = (TextView) findViewById(R.id.status); mAdapter = new MapPickerAdapter(MapPickerActivity.this, mInfoList); list.setAdapter(mAdapter); }
Example #2
Source File: MapFragment.java From apollo-DuerOS with Apache License 2.0 | 4 votes |
private void initMap() { // set button which can change large or small mMapView.setMapCustomEnable(true); View child = mMapView.getChildAt(1); // remove logo if (child != null && (child instanceof ImageView || child instanceof ZoomControls)) { child.setVisibility(View.INVISIBLE); // ((ImageView)child).setImageDrawable(getResources().getDrawable(R.drawable.app)); } mMapView.showZoomControls(false); mMapView.showScaleControl(false); mBaiduMap = mMapView.getMap(); // enable location layer mBaiduMap.setMyLocationEnabled(true); // unable traffic picture mBaiduMap.setTrafficEnabled(false); mBaiduMap.setBaiduHeatMapEnabled(false); mBaiduMap.setIndoorEnable(false); mBaiduMap.setBuildingsEnabled(false); mCurrentMode = MyLocationConfiguration.LocationMode.FOLLOWING; mBaiduMap.setMyLocationConfiguration(new MyLocationConfiguration(mCurrentMode, true, mCurrentMarker)); // set custom icon、marker mCurrentMarker = BitmapDescriptorFactory .fromResource(R.drawable.car_point); mBaiduMap.setMyLocationConfiguration(new MyLocationConfiguration( mCurrentMode, true, mCurrentMarker, accuracyCircleFillColor, accuracyCircleStrokeColor)); mCurrentLat = MapSdkWrapper.getLatitudeBd09ll(); mCurrentLon = MapSdkWrapper.getLongitudeBd09ll(); // get direction info,clockwise 0-360 locData = new MyLocationData.Builder().accuracy((float) mCurrentAccracy) .direction((float) direction).latitude(mCurrentLat).longitude(mCurrentLon).build(); mBaiduMap.setMyLocationData(locData); LatLng ll = new LatLng(mCurrentLat, mCurrentLon); MapStatus.Builder builder = new MapStatus.Builder(); builder.target(ll); // you can customize the size. level=19,the default scale is 14--100 meter MapStatusUpdate u = MapStatusUpdateFactory.zoomTo(mBaiduMap.getMaxZoomLevel() - 5); mBaiduMap.animateMapStatus(u); mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build())); mBaiduMap.setOnMapRenderCallbadk(onMapRenderCallback); LogUtil.i(TAG, "Map is init"); }
Example #3
Source File: MapFragment.java From apollo-DuerOS with Apache License 2.0 | 4 votes |
private void initMap() { // Set the enlargement and reduction button mMapView.setMapCustomEnable(true); View child = mMapView.getChildAt(1); // delete logo if (child != null && (child instanceof ImageView || child instanceof ZoomControls)) { child.setVisibility(View.INVISIBLE); // ((ImageView)child).setImageDrawable(getResources().getDrawable(R.drawable.app)); } mMapView.showZoomControls(false); mMapView.showScaleControl(false); mBaiduMap = mMapView.getMap(); // Open the location layer mBaiduMap.setMyLocationEnabled(true); // Close the traffic map mBaiduMap.setTrafficEnabled(false); mBaiduMap.setBaiduHeatMapEnabled(false); mBaiduMap.setIndoorEnable(false); mBaiduMap.setBuildingsEnabled(false); mCurrentMode = MyLocationConfiguration.LocationMode.FOLLOWING; mBaiduMap.setMyLocationConfiguration(new MyLocationConfiguration(mCurrentMode, true, mCurrentMarker)); // set custom logo // Modify it to custom marker mCurrentMarker = BitmapDescriptorFactory .fromResource(R.drawable.car_point); mBaiduMap.setMyLocationConfiguration(new MyLocationConfiguration( mCurrentMode, true, mCurrentMarker, accuracyCircleFillColor, accuracyCircleStrokeColor)); mCurrentLat = MapSdkWrapper.getLatitudeBd09ll(); mCurrentLon = MapSdkWrapper.getLongitudeBd09ll(); // set the direction information that developers get,clockwise:0-360 locData = new MyLocationData.Builder().accuracy(mCurrentAccracy) .direction((float) direction).latitude(mCurrentLat).longitude(mCurrentLon).build(); mBaiduMap.setMyLocationData(locData); LatLng ll = new LatLng(mCurrentLat, mCurrentLon); MapStatus.Builder builder = new MapStatus.Builder(); builder.target(ll); MapStatusUpdate u = MapStatusUpdateFactory.zoomTo(mBaiduMap.getMaxZoomLevel() - 5); mBaiduMap.animateMapStatus(u); mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build())); mBaiduMap.setOnMapRenderCallbadk(onMapRenderCallback); LogUtil.i(TAG, "Map is init"); }
Example #4
Source File: DSL.java From anvil with MIT License | 4 votes |
public static BaseDSL.ViewClassResult zoomControls() { return BaseDSL.v(ZoomControls.class); }
Example #5
Source File: DSL.java From anvil with MIT License | 4 votes |
public static Void zoomControls(Anvil.Renderable r) { return BaseDSL.v(ZoomControls.class, r); }
Example #6
Source File: DSL.java From anvil with MIT License | 4 votes |
public static BaseDSL.ViewClassResult zoomControls() { return BaseDSL.v(ZoomControls.class); }
Example #7
Source File: DSL.java From anvil with MIT License | 4 votes |
public static Void zoomControls(Anvil.Renderable r) { return BaseDSL.v(ZoomControls.class, r); }