Ejemplo n.º 1
0
 /** 监听点击infowindow窗口事件回调 */
 @Override
 public void onInfoWindowClick(Marker marker) {
   // TODO Auto-generated method stub
   /// 此处跳转到列表框界面///
   ToastUtil.show(this, "你点击了infoWindow窗口" + marker.getTitle());
   // 调用列表Activity
 }
Ejemplo n.º 2
0
 /** 自定义infowinfow窗口, 设置title 和 snippet 的内容 */
 public void render(Marker marker, View view) {
   if (!marker.getId().equals(marker_id)) return;
   String title = marker.getTitle();
   TextView titleUi = ((TextView) view.findViewById(R.id.main_infowindow_textview_title_id));
   if (title != null) {
     SpannableString titleText = new SpannableString(title);
     titleUi.setText(titleText);
     Log.e("title", titleText.toString());
   } else {
     titleUi.setText("");
   }
   if (marker.getId().equals(marker_id)) {
     String snippet = marker.getSnippet();
     TextView snippetUi = ((TextView) view.findViewById(R.id.main_infowindow_textview_snippet_id));
     if (snippet != null) {
       SpannableString snippetText = new SpannableString(snippet);
       snippetUi.setText(snippetText);
       Log.e("snippet", snippetText.toString());
     } else {
       titleUi.setText("");
     }
   }
 }