Ejemplo n.º 1
0
 /** 对marker标注点点击响应事件 */
 @Override
 public boolean onMarkerClick(Marker marker) {
   // TODO Auto-generated method stub
   /// 如果点击当前点,则不响应.
   /// 如果是其他的点,则跳转到该点的详细界面
   if (marker.getId().equals(marker_id)) {
     ToastUtil.show(this, "你点击的是主marker " + marker.getId());
     onMarkerClick();
   } else {
     ToastUtil.show(this, "你点击的是辅marker " + marker.getId());
     onAssistMarkerClick(marker.getId());
   }
   return false;
 }
Ejemplo n.º 2
0
 /** 监听点击infowindow窗口事件回调 */
 @Override
 public void onInfoWindowClick(Marker marker) {
   // TODO Auto-generated method stub
   /// 此处跳转到列表框界面///
   ToastUtil.show(this, "你点击了infoWindow窗口" + marker.getTitle());
   // 调用列表Activity
 }
Ejemplo n.º 3
0
  /** 逆地理编码回调 */
  @Override
  public void onRegeocodeSearched(RegeocodeResult result, int rCode) {
    // TODO Auto-generated method stub
    // 进度条

    if (rCode == 0) {
      String POIName = null;
      String addressName = null;
      Bundle b = new Bundle();

      if (result != null && result.getRegeocodeAddress() != null) {
        if (result.getRegeocodeAddress().getFormatAddress() != null) {
          // 获得地理位置
          addressName = result.getRegeocodeAddress().getFormatAddress();
        }
        if (result.getRegeocodeAddress().getPois() != null) {
          // 获得POI
          if (!result.getRegeocodeAddress().getPois().isEmpty()) {
            POIName = result.getRegeocodeAddress().getPois().get(0).toString();
          }
        }
        if (addressName != null) b.putString("address", addressName);
        else b.putString("address", getString(R.string.error_search));

        if (POIName != null) b.putString("POI", POIName);
        else b.putString("POI", getString(R.string.error_search));

        Message msg = Message.obtain(callback_handler, msg_type.CLB_REFRESH_MainMarkers.ordinal());
        msg.setData(b);
        msg.sendToTarget();
      }
    } else if (rCode == 27) {
      ToastUtil.show(this, R.string.error_network);
    } else {
      ToastUtil.show(this, getString(R.string.error_other) + rCode);
    }
  }