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

项目:eDao    文件:Utity.java   
public static MBound getExtendedBounds(BaiduMap map, MBound bound, Integer gridSize) {
    // Log.d("getExtendBounds", "size:"+gridSize);
    MBound tbounds = cutBoundsInRange(bound);
    System.out.println("getExtendedBounds---" + tbounds.getRightTop() + tbounds.getLeftBottom());

    Projection projection = map.getProjection();
    Point pixelNE = new Point();
    Point pixelSW = new Point();

    pixelNE = projection.toScreenLocation(tbounds.getRightTop());
    pixelSW = projection.toScreenLocation(tbounds.getLeftBottom());
    System.out.println("前pixelNE:" + pixelNE + "pixelSW:" + pixelSW);

    pixelNE.x += gridSize;
    pixelNE.y += gridSize;
    pixelSW.x -= gridSize;
    pixelSW.y -= gridSize;
    System.out.println("后pixelNE:" + pixelNE + "pixelSW:" + pixelSW);
    LatLng rightTop = projection.fromScreenLocation(pixelNE);
    LatLng leftBottom = projection.fromScreenLocation(pixelSW);
    System.out.println("getExtendedBounds---" + "rightTop:" + rightTop + "leftBottom:" + leftBottom);

    return new MBound(rightTop, leftBottom);
}
项目:Tower-develop    文件:BaiduMapFragment.java   
@Override
public List<LatLong> projectPathIntoMap(List<LatLong> path) {
    List<LatLong> coords = new ArrayList<LatLong>();
    Projection projection = getBaiduMap().getProjection();

    for (LatLong point : path) {
        LatLng coord = projection.fromScreenLocation(new Point((int) point
                .getLatitude(), (int) point.getLongitude()));
        coords.add(MapUtils.baiduLatLngToCoord(coord));
    }

    return coords;
}
项目:droidplanner-master    文件:BaiduMapFragment.java   
@Override
public List<LatLong> projectPathIntoMap(List<LatLong> path) {
    List<LatLong> coords = new ArrayList<LatLong>();
    Projection projection = getBaiduMap().getProjection();

    for (LatLong point : path) {
        LatLng coord = projection.fromScreenLocation(new Point((int) point
                .getLatitude(), (int) point.getLongitude()));
        coords.add(DroneHelper.BaiduLatLngToCoord(coord));
    }

    return coords;
}
项目:nongfei-missionplane    文件:BaiduMapFragment.java   
@Override
public List<LatLong> projectPathIntoMap(List<LatLong> path) {
    List<LatLong> coords = new ArrayList<LatLong>();
    Projection projection = getBaiduMap().getProjection();

    for (LatLong point : path) {
        LatLng coord = projection.fromScreenLocation(new Point((int) point
                .getLatitude(), (int) point.getLongitude()));
        coords.add(DroneHelper.BaiduLatLngToCoord(coord));
    }

    return coords;
}
项目:Gprs_droidplanner    文件:BaiduMapFragment.java   
@Override
public List<LatLong> projectPathIntoMap(List<LatLong> path) {
    List<LatLong> coords = new ArrayList<LatLong>();
    Projection projection = getBaiduMap().getProjection();

    for (LatLong point : path) {
        LatLng coord = projection.fromScreenLocation(new Point((int) point
                .getLatitude(), (int) point.getLongitude()));
        coords.add(DroneHelper.BaiduLatLngToCoord(coord));
    }

    return coords;
}
项目:Tribe    文件:DefaultClusterRenderer.java   
public void setProjection(Projection projection) {
    this.mProjection = projection;
}
项目:FindYou    文件:DefaultClusterRenderer.java   
public void setProjection(Projection projection) {
    this.mProjection = projection;
}