Java 类com.baidu.mapapi.map.Overlay 实例源码

项目:GitHub    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:GCSApp    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:Mobike    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:AndroidOpen    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:Swap    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:SmartTransXA    文件:OverlayManager.java   
/**
 * ���ŵ�ͼ��ʹ����Overlay���ں��ʵ���Ұ��
 * <p>
 * ע�� �÷���ֻ��Marker���͵�overlay��Ч
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
             // polyline �еĵ����̫�ֻ࣬��marker ����
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:MyCar    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:MyStudyHelper    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 *
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:FindYou    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:AndPlug    文件:OverlayManager.java   
/**
 * 缩放地图,使所有Overlay都在合适的视野内
 * <p>
 * 注: 该方法只对Marker类型的overlay有效
 * </p>
 * 
 */
public void zoomToSpan() {
    if (mBaiduMap == null) {
        return;
    }
    if (mOverlayList.size() > 0) {
        LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Overlay overlay : mOverlayList) {
            // polyline 中的点可能太多,只按marker 缩放
            if (overlay instanceof Marker) {
                builder.include(((Marker) overlay).getPosition());
            }
        }
        mBaiduMap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));
    }
}
项目:GitHub    文件:WalkingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GitHub    文件:OverlayManager.java   
/**
 * 通过一个BaiduMap 对象构造
 * 
 * @param baiduMap
 */
public OverlayManager(BaiduMap baiduMap) {
    mBaiduMap = baiduMap;
    // mBaiduMap.setOnMarkerClickListener(this);
    if (mOverlayOptionList == null) {
        mOverlayOptionList = new ArrayList<OverlayOptions>();
    }
    if (mOverlayList == null) {
        mOverlayList = new ArrayList<Overlay>();
    }
}
项目:GitHub    文件:OverlayManager.java   
/**
 * 将所有Overlay 从 地图上消除
 */
public final void removeFromMap() {
    if (mBaiduMap == null) {
        return;
    }
    for (Overlay marker : mOverlayList) {
        marker.remove();
    }
    mOverlayOptionList.clear();
    mOverlayList.clear();

}
项目:GitHub    文件:TransitRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GitHub    文件:DrivingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GitHub    文件:DrivingRouteOverlay.java   
@Override
public boolean onPolylineClick(Polyline polyline) {
    boolean flag = false;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline && mPolyline.equals(polyline)) {
            // 选中
            flag = true;
            break;
        }
    }
    setFocus(flag);
    return true;
}
项目:GitHub    文件:DrivingRouteOverlay.java   
public void setFocus(boolean flag) {
    focus = flag;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline) {
            // 选中
            ((Polyline) mPolyline).setFocus(flag);

            break;
        }
    }

}
项目:GitHub    文件:BikingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GCSApp    文件:WalkingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GCSApp    文件:OverlayManager.java   
/**
 * 通过一个BaiduMap 对象构造
 * 
 * @param baiduMap
 */
public OverlayManager(BaiduMap baiduMap) {
    mBaiduMap = baiduMap;
    // mBaiduMap.setOnMarkerClickListener(this);
    if (mOverlayOptionList == null) {
        mOverlayOptionList = new ArrayList<OverlayOptions>();
    }
    if (mOverlayList == null) {
        mOverlayList = new ArrayList<Overlay>();
    }
}
项目:GCSApp    文件:OverlayManager.java   
/**
 * 将所有Overlay 从 地图上消除
 */
public final void removeFromMap() {
    if (mBaiduMap == null) {
        return;
    }
    for (Overlay marker : mOverlayList) {
        marker.remove();
    }
    mOverlayOptionList.clear();
    mOverlayList.clear();

}
项目:GCSApp    文件:TransitRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GCSApp    文件:DrivingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:GCSApp    文件:DrivingRouteOverlay.java   
@Override
public boolean onPolylineClick(Polyline polyline) {
    boolean flag = false;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline && mPolyline.equals(polyline)) {
            // 选中
            flag = true;
            break;
        }
    }
    setFocus(flag);
    return true;
}
项目:GCSApp    文件:DrivingRouteOverlay.java   
public void setFocus(boolean flag) {
    focus = flag;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline) {
            // 选中
            ((Polyline) mPolyline).setFocus(flag);

            break;
        }
    }

}
项目:GCSApp    文件:BikingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:Mobike    文件:WalkingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:Mobike    文件:OverlayManager.java   
/**
 * 通过一个BaiduMap 对象构造
 * 
 * @param baiduMap
 */
public OverlayManager(BaiduMap baiduMap) {
    mBaiduMap = baiduMap;
    // mBaiduMap.setOnMarkerClickListener(this);
    if (mOverlayOptionList == null) {
        mOverlayOptionList = new ArrayList<OverlayOptions>();
    }
    if (mOverlayList == null) {
        mOverlayList = new ArrayList<Overlay>();
    }
}
项目:Mobike    文件:OverlayManager.java   
/**
 * 将所有Overlay 从 地图上消除
 */
public final void removeFromMap() {
    if (mBaiduMap == null) {
        return;
    }
    for (Overlay marker : mOverlayList) {
        marker.remove();
    }
    mOverlayOptionList.clear();
    mOverlayList.clear();

}
项目:Mobike    文件:TransitRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:Mobike    文件:DrivingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:Mobike    文件:DrivingRouteOverlay.java   
@Override
public boolean onPolylineClick(Polyline polyline) {
    boolean flag = false;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline && mPolyline.equals(polyline)) {
            // 选中
            flag = true;
            break;
        }
    }
    setFocus(flag);
    return true;
}
项目:Mobike    文件:DrivingRouteOverlay.java   
public void setFocus(boolean flag) {
    focus = flag;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline) {
            // 选中
            ((Polyline) mPolyline).setFocus(flag);

            break;
        }
    }

}
项目:Mobike    文件:BikingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:AndroidOpen    文件:WalkingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:AndroidOpen    文件:OverlayManager.java   
/**
 * 通过一个BaiduMap 对象构造
 *
 * @param baiduMap
 */
public OverlayManager(BaiduMap baiduMap) {
    mBaiduMap = baiduMap;
    // mBaiduMap.setOnMarkerClickListener(this);
    if (mOverlayOptionList == null) {
        mOverlayOptionList = new ArrayList<OverlayOptions>();
    }
    if (mOverlayList == null) {
        mOverlayList = new ArrayList<Overlay>();
    }
}
项目:AndroidOpen    文件:OverlayManager.java   
/**
 * 将所有Overlay 从 地图上消除
 */
public final void removeFromMap() {
    if (mBaiduMap == null) {
        return;
    }
    for (Overlay marker : mOverlayList) {
        marker.remove();
    }
    mOverlayOptionList.clear();
    mOverlayList.clear();

}
项目:AndroidOpen    文件:TransitRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:AndroidOpen    文件:DrivingRouteOverlay.java   
@Override
public final boolean onMarkerClick(Marker marker) {
    for (Overlay mMarker : mOverlayList) {
        if (mMarker instanceof Marker && mMarker.equals(marker)) {
            if (marker.getExtraInfo() != null) {
                onRouteNodeClick(marker.getExtraInfo().getInt("index"));
            }
        }
    }
    return true;
}
项目:AndroidOpen    文件:DrivingRouteOverlay.java   
@Override
public boolean onPolylineClick(Polyline polyline) {
    boolean flag = false;
    for (Overlay mPolyline : mOverlayList) {
        if (mPolyline instanceof Polyline && mPolyline.equals(polyline)) {
            // 选中
            flag = true;
            break;
        }
    }
    setFocus(flag);
    return true;
}