【问题标题】:how to focus on google marker after clicking item from listview?单击列表视图中的项目后如何专注于谷歌标记?
【发布时间】:2016-03-16 04:11:38
【问题描述】:
This is my marker which is set in -  MainAcitivity 

 googleMap.addMarker(new MarkerOptions()
            .position(new LatLng(26.89209, 75.82759))
            .title("Store"));

而我正在尝试做的是在列表视图中,当用户点击 txtplace 字段时,谷歌标记将专注于我设置的那个标记

 holder.txtPlace.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (holder.txtStore.getText().toString().equals("Store") ) {
                //mMap.animateCamera(CameraUpdateFactory.newCameraPosition(  what to do here ??? ));

            } 

        }
    });

【问题讨论】:

    标签: android google-maps listview google-maps-api-3


    【解决方案1】:

    尝试使用这个函数,例如:

    googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(26.89209, 75.82759)), 14));
    

    【讨论】:

    • 它说不能应用CameraUpdateFactory
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-30
    • 2017-05-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-06
    相关资源
    最近更新 更多