com.amap.api.maps2d.model.CameraPosition Java Examples
The following examples show how to use
com.amap.api.maps2d.model.CameraPosition.
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: AMAPLocationActivity.java From sealtalk-android with MIT License | 6 votes |
private void show(CameraPosition location) { AMapOptions aOptions = new AMapOptions(); aOptions.zoomGesturesEnabled(true); aOptions.scrollGesturesEnabled(false); aOptions.camera(location); if (aMapFragment == null) { aMapFragment = SupportMapFragment.newInstance(aOptions); FragmentTransaction fragmentTransaction = getSupportFragmentManager() .beginTransaction(); fragmentTransaction.add(android.R.id.content, aMapFragment, MAP_FRAGMENT_TAG); fragmentTransaction.commit(); } }
Example #2
Source File: MapActivity.java From xposed-rimet with Apache License 2.0 | 5 votes |
@Override public void onCameraChangeFinish(CameraPosition cameraPosition) { mSearchLatLonPoint = MapUtil.newLocation(cameraPosition.target); if (!isItemClickAction) { moveLocationMarker(); geocodeAddress(); } isItemClickAction = false; }
Example #3
Source File: AMAPLocationActivity.java From sealtalk-android with MIT License | 5 votes |
private void initAmap() { if (aMap == null) { aMap = mapView.getMap(); } if (getIntent().hasExtra("location")) { isPerview = true; mMsg = getIntent().getParcelableExtra("location"); tvCurLocation.setVisibility(View.GONE); returns.setVisibility(View.GONE); if (model) { CameraPosition location = new CameraPosition.Builder() .target(new LatLng(mMsg.getLat(), mMsg.getLng())).zoom(18).bearing(0).tilt(30).build(); show(location); } else { aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f) .position(new LatLng(mMsg.getLat(), mMsg.getLng())).title(mMsg.getPoi()) .snippet(mMsg.getLat() + "," + mMsg.getLng()).draggable(false)); } return; } aMap.setLocationSource(this);// 设置定位监听 aMap.setMyLocationEnabled(true); aMap.getUiSettings().setZoomControlsEnabled(false); aMap.getUiSettings().setMyLocationButtonEnabled(false); CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(15);//设置缩放监听 aMap.moveCamera(cameraUpdate); successDescripter = BitmapDescriptorFactory.fromResource(R.drawable.icon_usecarnow_position_succeed); geocodeSearch = new GeocodeSearch(this); geocodeSearch.setOnGeocodeSearchListener(this); }
Example #4
Source File: AMAPLocationActivity.java From sealtalk-android with MIT License | 5 votes |
@Override public void onCameraChangeFinish(CameraPosition cameraPosition) { LatLonPoint point = new LatLonPoint(cameraPosition.target.latitude, cameraPosition.target.longitude); RegeocodeQuery query = new RegeocodeQuery(point, 50, GeocodeSearch.AMAP); geocodeSearch.getFromLocationAsyn(query); if (centerMarker != null) { animMarker(); } showLocationView(); }
Example #5
Source File: AmapActivity.java From sealtalk-android with MIT License | 5 votes |
@Override public void onCameraChangeFinish(CameraPosition cameraPosition) { LatLonPoint point = new LatLonPoint(cameraPosition.target.latitude, cameraPosition.target.longitude); RegeocodeQuery query = new RegeocodeQuery(point, 50, GeocodeSearch.AMAP); geocodeSearch.getFromLocationAsyn(query); if (centerMarker != null) { animMarker(); } showLocationView(); }
Example #6
Source File: AMapLiteActivity.java From XposedRimetHelper with GNU General Public License v2.0 | 4 votes |
private void cameraUpdate(LatLng latLng) { CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition( new CameraPosition(latLng, 18, 0, 0)); mAMap.moveCamera(cameraSigma); }
Example #7
Source File: AMAPLocationActivity.java From sealtalk-android with MIT License | 4 votes |
@Override public void onCameraChange(CameraPosition cameraPosition) { if (centerMarker != null) { setMovingMarker(); } }
Example #8
Source File: AmapActivity.java From sealtalk-android with MIT License | 4 votes |
@Override public void onCameraChange(CameraPosition cameraPosition) { if (centerMarker != null) { setMovingMarker(); } }
Example #9
Source File: MapActivity.java From xposed-rimet with Apache License 2.0 | 2 votes |
@Override public void onCameraChange(CameraPosition cameraPosition) { }