来自googlemaps/android-maps-utils的类NonHierarchicalViewBasedAlgorithm有一个构造函数:
public NonHierarchicalViewBasedAlgorithm(int screenWidth, int screenHeight) {
mViewWidth = screenWidth;
mViewHeight = screenHeight;
}但是我不确定我应该以像素还是dp为单位发送宽度。
有什么想法吗?
发布于 2019-10-29 07:09:36
发布于 2021-12-22 20:15:11
在NonHierarchicalViewBasedAlgorithm类(https://github.com/googlemaps/android-maps-utils/blob/main/library/src/main/java/com/google/maps/android/clustering/algo/NonHierarchicalViewBasedAlgorithm.java)的源代码中:
/**
* @param screenWidth map width in dp
* @param screenHeight map height in dp
*/
public NonHierarchicalViewBasedAlgorithm(int screenWidth, int screenHeight) {
mViewWidth = screenWidth;
mViewHeight = screenHeight;
}https://stackoverflow.com/questions/58575249
复制相似问题