androidgeolocationmapkityandexyandex-maps

Check if location layer was changed. Yandex MapKit 3.0


How to check if i change camera location for disable anchor? I dont see solution in examples or docs.


Solution

  • I found the solution.

    public class WorkFragment extends BaseFragment implements ..., CameraListener {
       @Override
       public void onCreate(){
       ...
       mapView.getMap().addCameraListener(this);
        ....
    }
    
    @Override
    public void onCameraPositionChanged(Map map, CameraPosition cameraPosition, CameraUpdateSource cameraUpdateSource, boolean b) {
      if (cameraUpdateSource == CameraUpdateSource.GESTURES) {
        ...
      }
    }