Search code examples
androidhuawei-mobile-serviceshuawei-developers

Huawei Map Kit onCameraIdle method is not triggered


I am trying to implement Huawei Map Kit and using clustering feature. I called setOnCameraIdleListener right before setMarkersClustering and still onCameraIdle method is not triggers even though everything stays idle. What might be the problem?


Solution

  • In the Map SDK, the OnCameraIdleListener listening callback code of the map is in the setMarkersClustering method. Therefore, set MarkersClustering(true) and then setOnCameraIdleListener(this). Like this:

    map.setMarkersClustering(true);
    map.setOnCameraIdleListener(this);
    

    Currently, only this invoking sequence is supported.