ebgeo.maprequest
Class MapSegment

java.lang.Object
  extended byebgeo.maprequest.MapSegment

public class MapSegment
extends Object

A class modelling a segment of a larger map. Maps may need to be broken down into segments if the user requests an image that is larger than the largest image that the remote map service will serve.


Constructor Summary
MapSegment(int x, int y)
          Creates a new instance of MapSegment.
MapSegment(int x, int y, double minx, double miny, double maxx, double maxy, int width, int height, int xOffset, int yOffset, String filename)
          Creates a new instance of MapSegment.
 
Method Summary
 void addError(String errorMessage)
           
 boolean equals(Object rhs)
           
 int getErrorCount()
           
 String getFilename()
           
 int getHeight()
           
 String getLastError()
          Get the message associated with the last error that ocurred when requesting this segment from the remote map service.
 double getMaxX()
           
 double getMaxY()
           
 double getMinX()
           
 double getMinY()
           
 int getWidth()
           
 int getX()
           
 int getXOffset()
          Getter for property xOffset.
 int getY()
           
 int getYOffset()
          Getter for property yOffset.
 boolean isComplete()
           
 void setComplete(boolean complete)
           
 void setFilename(String filename)
           
 void setXOffset(int xOffset)
          Setter for property xOffset.
 void setYOffset(int yOffset)
          Setter for property yOffset.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapSegment

public MapSegment(int x,
                  int y)
Creates a new instance of MapSegment.

Parameters:
x - The X index of this segment into the full map.
y - The Y index of this segment into the full map.

MapSegment

public MapSegment(int x,
                  int y,
                  double minx,
                  double miny,
                  double maxx,
                  double maxy,
                  int width,
                  int height,
                  int xOffset,
                  int yOffset,
                  String filename)
Creates a new instance of MapSegment.

Parameters:
x - The X index of this segment into the full map.
y - The Y index of this segment into the full map.
minx - The minimum X value for this segment.
miny - The minimum Y value for this segment.
maxx - The maximum X value for this segment.
maxy - The maximum Y value for this segment.
width - The width of the image to create.
height - The height of the image to create.
filename - The name of the file to store the image in.
Method Detail

getX

public int getX()

getY

public int getY()

getWidth

public int getWidth()

getHeight

public int getHeight()

getMinX

public double getMinX()

getMinY

public double getMinY()

getMaxX

public double getMaxX()

getMaxY

public double getMaxY()

getFilename

public String getFilename()

setFilename

public void setFilename(String filename)

isComplete

public boolean isComplete()

setComplete

public void setComplete(boolean complete)

addError

public void addError(String errorMessage)

getErrorCount

public int getErrorCount()

getLastError

public String getLastError()
Get the message associated with the last error that ocurred when requesting this segment from the remote map service.


equals

public boolean equals(Object rhs)

getXOffset

public int getXOffset()
Getter for property xOffset.

Returns:
Value of property xOffset.

setXOffset

public void setXOffset(int xOffset)
Setter for property xOffset.

Parameters:
xOffset - New value of property xOffset.

getYOffset

public int getYOffset()
Getter for property yOffset.

Returns:
Value of property yOffset.

setYOffset

public void setYOffset(int yOffset)
Setter for property yOffset.

Parameters:
yOffset - New value of property yOffset.