Package org.geomajas.gwt.client.spatial

Examples of org.geomajas.gwt.client.spatial.Bbox.translate()


    // this gives the difference between integer positions and floating positions
    dx = dx  - (tile.getCache().getLayerBounds().getX() - panOrigin.getX());
    dy = dy  - (tile.getCache().getLayerBounds().getY() - panOrigin.getY());
    // now apply to our bounds
    Bbox  worldBounds = new Bbox(tile.getBounds());
    worldBounds.translate(-dx, -dy);
    // transform to pan space and round
    Bbox panBounds = mapView.getWorldViewTransformer().worldToPan(worldBounds);
    return new Bbox(Math.round(panBounds.getX()), Math.round(panBounds.getY()), Math.round(panBounds.getWidth()),
        Math.round(panBounds.getHeight()));
  }
View Full Code Here


    // position as before.
    double dX = (rescalePoint.getX() - viewState.getX()) * (1 - 1 / factor);
    double dY = (rescalePoint.getY() - viewState.getY()) * (1 - 1 / factor);

    newBbox.setCenterPoint(new Coordinate(viewState.getX(), viewState.getY()));
    newBbox.translate(dX, dY);
    // and apply...
    doApplyBounds(newBbox, option);
  }

  /**
 
View Full Code Here

    Bbox cacheBounds = null;
    for (org.geomajas.layer.tile.RasterTile image : images) {
      TileCode code = image.getCode().clone();
      if (!tiles.containsKey(code)) {
        Bbox panBounds = new Bbox(image.getBounds());
        panBounds.translate(Math.round(t.getDx()), Math.round(t.getDy()));
        if (cacheBounds == null) {
          cacheBounds = panBounds;
        } else {
          cacheBounds = cacheBounds.union(panBounds);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.