de.fhg.igd.gps.maps
Class ExpediaMapRequester

java.lang.Object
  extended byde.fhg.igd.gps.maps.ExpediaMapRequester
All Implemented Interfaces:
MapRequester

public class ExpediaMapRequester
extends Object
implements MapRequester

A MapRequester implementation that can be used to obtain world map clippings from expedia.

Author:
Dennis Bartussek

Field Summary
protected static MemoryCache imageCache_
          cache to store already requested images
protected static double scaleFactor_
          The factor to convert the scale from MapInfo (in meters per pixel) into the ExpediaMap specific scale
protected static double scaleMax_
          largest scale factor that is valid for this ExpediaMapRequester
protected static double scaleMin_
          smallest scale factor that is valid for this ExpediaMapRequester
 
Constructor Summary
ExpediaMapRequester()
          Creates a new Expedia.
 
Method Summary
 BufferedImage getMap(Latitude latitude, Longitude longitude, double scale, int width, int height)
          Returns a world map clipping as a BufferedImage object.
 BufferedImage getMap(WGS84Coordinate center, double scale, int width, int height)
          Returns a world map clipping as a BufferedImage object.
 double scaleMax()
          Returns the maximum scale that is valid for this MapRequester.
 double scaleMin()
          Returns the minimum scale that is valid for this MapRequester.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scaleFactor_

protected static final double scaleFactor_
The factor to convert the scale from MapInfo (in meters per pixel) into the ExpediaMap specific scale

See Also:
Constant Field Values

scaleMin_

protected static final double scaleMin_
smallest scale factor that is valid for this ExpediaMapRequester

See Also:
Constant Field Values

scaleMax_

protected static final double scaleMax_
largest scale factor that is valid for this ExpediaMapRequester

See Also:
Constant Field Values

imageCache_

protected static MemoryCache imageCache_
cache to store already requested images

Constructor Detail

ExpediaMapRequester

public ExpediaMapRequester()
Creates a new Expedia.

Method Detail

scaleMin

public double scaleMin()
Description copied from interface: MapRequester
Returns the minimum scale that is valid for this MapRequester.

Specified by:
scaleMin in interface MapRequester
Returns:
the minimum scale for this MapRequester

scaleMax

public double scaleMax()
Description copied from interface: MapRequester
Returns the maximum scale that is valid for this MapRequester.

Specified by:
scaleMax in interface MapRequester
Returns:
the maximum scale for this MapRequester

getMap

public BufferedImage getMap(WGS84Coordinate center,
                            double scale,
                            int width,
                            int height)
                     throws IOException
Description copied from interface: MapRequester
Returns a world map clipping as a BufferedImage object. The center of the requested map is specified by center. The scale argument is expected to be equal to or more than MapRequester.scaleMin() and equal to or less than MapRequester.scaleMax() and will be adjusted to the appropriate level if not within the expected range.

The width and height arguments define the dimension of the returned BufferedImage.

Specified by:
getMap in interface MapRequester
Parameters:
center - the center position of the map
scale - scale of the map, measured in meters per pixel
width - width of the requested BufferedImage, measured in pixels
height - height of the requested BufferedImage, measured in pixels
Returns:
the requested BufferedImage or null if the image could not be retrieved
Throws:
IOException - if an input or output exception occurred during retrieval

getMap

public BufferedImage getMap(Latitude latitude,
                            Longitude longitude,
                            double scale,
                            int width,
                            int height)
                     throws IOException
Description copied from interface: MapRequester
Returns a world map clipping as a BufferedImage object. The center of the requested map is specified by latitude and longitude. The scale argument is expected to be equal to or more than MapRequester.scaleMin() and equal to or less than MapRequester.scaleMax() and will be adjusted to the appropriate level if not within the expected range.

The width and height arguments define the dimension of the returned BufferedImage.

Specified by:
getMap in interface MapRequester
Parameters:
latitude - latitude of the map's center
longitude - longitude of the map's center
scale - scale of the map, measured in meters per pixel
width - width of the requested BufferedImage, measured in pixels
height - height of the requested BufferedImage, measured in pixels
Returns:
the requested BufferedImage or null if the image could not be retrieved
Throws:
IOException - if an input or output exception occurred during retrieval


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.