/** * Set the area of interest. This triggers a MapBoundsEvent to be published. * * @param areaOfInterest the new area of interest * @param coordinateReferenceSystem the CRS for the new area of interest * @throws IllegalArgumentException if either argument is {@code null} */ public void setAreaOfInterest(Envelope areaOfInterest, CoordinateReferenceSystem crs) throws IllegalArgumentException { getViewport().setBounds(new ReferencedEnvelope(areaOfInterest, crs)); }
/** * Set the area of interest. This triggers a MapBoundsEvent to be published. * * @param bounds the new area of interest * @throws IllegalArgumentException if the provided areaOfInterest is {@code null} or does not * have a coordinate reference system */ public void setAreaOfInterest(ReferencedEnvelope bounds) throws IllegalArgumentException { if (bounds == null) { throw new NullPointerException("bounds must not be null"); } getViewport().setBounds(bounds); }
/** * Set or change the coordinate reference system for this context. This will trigger a * MapBoundsEvent to be published to listeners. * * @param crs * @throws FactoryException * @throws TransformException */ public void setCoordinateReferenceSystem(final CoordinateReferenceSystem crs) { getViewport().setCoordinateReferenceSystem(crs); }
/** * Gets the current area of interest provided by {@link #getViewport()#getBounds()}. * * <p>If the viewport has not been created, it will be filled in by default based on the layer * bounds provided by {@link #getMaxBounds()}. * * @return Current area of interest */ public ReferencedEnvelope getAreaOfInterest() { return getViewport().getBounds(); }
/** * Gets the current area of interest provided by {@link #getViewport()#getBounds()}. * * If the viewport has not been created, it will be filled in by default * based on the layer bounds provided by {@link #getMaxBounds()}. * * @return Current area of interest */ public ReferencedEnvelope getAreaOfInterest() { return getViewport().getBounds(); }
/** * Set or change the coordinate reference system for this context. This will trigger a * MapBoundsEvent to be published to listeners. * * @param crs * @throws FactoryException * @throws TransformException */ public void setCoordinateReferenceSystem(final CoordinateReferenceSystem crs) { getViewport().setCoordinateReferenceSystem(crs); }
/** * Set the area of interest. This triggers a MapBoundsEvent to be published. * * @param areaOfInterest * the new area of interest * @param coordinateReferenceSystem * the CRS for the new area of interest * * @throws IllegalArgumentException * if either argument is {@code null} */ public void setAreaOfInterest(Envelope areaOfInterest, CoordinateReferenceSystem crs) throws IllegalArgumentException { getViewport().setBounds(new ReferencedEnvelope(areaOfInterest, crs)); }
/** * Set the area of interest. This triggers a MapBoundsEvent to be published. * * @param bounds * the new area of interest * * @throws IllegalArgumentException * if the provided areaOfInterest is {@code null} or does not have a coordinate * reference system */ public void setAreaOfInterest(ReferencedEnvelope bounds) throws IllegalArgumentException { if (bounds == null) { throw new NullPointerException("bounds must not be null"); } getViewport().setBounds(bounds); }