de.fhg.igd.gps.maps
Interface MapRequester

All Known Implementing Classes:
DarmstadtMapRequester, ExpediaMapRequester, MapblastMapRequester

public interface MapRequester

Defines the interface for classes that know how to obtain a world map clipping as a BufferedImage object.

Author:
Dennis Bartussek

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.
 

Method Detail

scaleMin

public double scaleMin()
Returns the minimum scale that is valid for this MapRequester.

Returns:
the minimum scale for this MapRequester

scaleMax

public double scaleMax()
Returns the maximum scale that is valid for this MapRequester.

Returns:
the maximum scale for this MapRequester

getMap

public BufferedImage getMap(Latitude latitude,
                            Longitude longitude,
                            double scale,
                            int width,
                            int height)
                     throws IOException
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 scaleMin() and equal to or less than 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.

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

getMap

public BufferedImage getMap(WGS84Coordinate center,
                            double scale,
                            int width,
                            int height)
                     throws IOException
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 scaleMin() and equal to or less than 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.

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


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.