Android缩放内置onMarkerClick失败

时间:2015-05-10 20:49:39

标签: android google-maps

当我尝试在onMarkerClick内放大时,它似乎只是一个瞬间收听缩放,然后停止,它确实为右拉丁语设置了动画。

public class MapsActivity extends FragmentActivity implements GoogleMap.OnMarkerClickListener, GoogleMap.OnMapClickListener {
GoogleMap mMap;
....
    public boolean onMarkerClick(Marker marker) {
        if(marker.equals(myExampleMarker)) {
            mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(LatLng, zoomLevel));
        }
    }
}

不知何故,这会将相机设置为我所输入的所需LatLng的动画,但不知何故,Zoomlevel在正确的方向上调整了一点但在瞬间停止了。在OnMarkerClick中更改缩放级别是否有问题?如果有,我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

我认为您可以尝试缩放select products.name as Product, steps.description as Description, pictures.filetitle as MyPicture from pictures join steps on steps.id=pictures.stepid join products on products.id=steps.productid where steps.id=@yourvariable interface A{ ... } interface B{ public List<A> fooFunction(); } class C implements B{ @Override public List<(another class which implements interface A)> fooFunction(){ ... } 进行缩放。

示例代码:

Handler