org.deegree.services.wms.utils
Class MapController
java.lang.Object
org.deegree.services.wms.utils.MapController
public class MapController
- extends java.lang.Object
- Version:
- $Revision: 27098 $, $Date: 2010-09-30 13:59:00 +0200 (Do, 30. Sep 2010) $
- Author:
- Andreas Schmitz, last edited by: $Author: aschmitz $
|
Method Summary |
void |
endPanning()
|
org.deegree.cs.CRS |
getCRS()
|
java.awt.image.BufferedImage |
getCurrentImage()
|
double |
getCurrentScale()
|
org.deegree.feature.FeatureCollection |
getFeatures(int radius,
int x,
int y)
|
Layer |
getQueryLayer()
|
boolean |
isRepainting()
|
boolean |
isResizing()
|
boolean |
needsRepaint()
|
void |
paintMap(java.awt.Graphics2D g,
boolean preview)
|
void |
pan(int sourcex,
int sourcey,
int currentx,
int currenty)
|
void |
setEnvelope(int minx,
int miny,
int maxx,
int maxy)
parameters are in window coordinates |
void |
setLayers(java.util.List<Layer> layers)
|
void |
setQueryLayer(Layer layer)
|
void |
setSize(int width,
int height)
|
void |
setZoomRectEnd(int x,
int y)
|
void |
setZoomRectStart(int minx,
int miny)
|
void |
startResize()
|
void |
stopResize()
|
void |
stopZoomin()
|
org.deegree.commons.utils.Pair<java.lang.Double,java.lang.Double> |
translate(int x,
int y)
|
void |
zoom(double factor,
int centerx,
int centery)
|
void |
zoomToMaxExtent()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapController
public MapController(MapService service,
org.deegree.cs.CRS crs,
int width,
int height)
- Parameters:
service - crs - width - height -
isResizing
public boolean isResizing()
- Returns:
- true, if resizing is in progress
getCurrentImage
public java.awt.image.BufferedImage getCurrentImage()
- Returns:
- the currently displayed map
getCRS
public org.deegree.cs.CRS getCRS()
- Returns:
- the crs of the map
getQueryLayer
public Layer getQueryLayer()
- Returns:
- the current query layer, or null, if none is selected
isRepainting
public boolean isRepainting()
- Returns:
- true, if the controller is currently repainting
paintMap
public void paintMap(java.awt.Graphics2D g,
boolean preview)
- Parameters:
g - preview -
getFeatures
public org.deegree.feature.FeatureCollection getFeatures(int radius,
int x,
int y)
- Parameters:
radius - x - y -
- Returns:
- do a get feature info internally
setLayers
public void setLayers(java.util.List<Layer> layers)
- Parameters:
layers -
startResize
public void startResize()
stopResize
public void stopResize()
setSize
public void setSize(int width,
int height)
- Parameters:
width - height -
zoom
public void zoom(double factor,
int centerx,
int centery)
- Parameters:
factor - if positive, zoom outcenterx - if negative, the center will remain unchangedcentery - if negative, the center will remain unchanged
endPanning
public void endPanning()
setEnvelope
public void setEnvelope(int minx,
int miny,
int maxx,
int maxy)
- parameters are in window coordinates
- Parameters:
minx - miny - maxx - maxy -
pan
public void pan(int sourcex,
int sourcey,
int currentx,
int currenty)
- Parameters:
sourcex - sourcey - currentx - currenty -
needsRepaint
public boolean needsRepaint()
- Returns:
- whether parameters have changed and the map needs repainting
translate
public org.deegree.commons.utils.Pair<java.lang.Double,java.lang.Double> translate(int x,
int y)
- Parameters:
x - y -
- Returns:
- the world coordinates
zoomToMaxExtent
public void zoomToMaxExtent()
getCurrentScale
public double getCurrentScale()
- Returns:
- the current scale (0.28 mm pixelsize)
setQueryLayer
public void setQueryLayer(Layer layer)
- Parameters:
layer -
setZoomRectStart
public void setZoomRectStart(int minx,
int miny)
- Parameters:
minx - miny -
setZoomRectEnd
public void setZoomRectEnd(int x,
int y)
- Parameters:
x - y -
stopZoomin
public void stopZoomin()
Copyright © 2011. All Rights Reserved.