#include <TdkMapDisplay.h>
Inheritance diagram for TdkMapDisplay:
Public Member Functions | |
TdkMapDisplay (TdkCanvas *canvas) | |
virtual | ~TdkMapDisplay () |
virtual TeBox | getMapRange () |
Calculates the bounding box of the elements being displayed. | |
virtual TeBox | getFullMapRange () |
Calculates the bounding box of the elements in the map (being displayed or not). | |
virtual TeBox | getVisibleRegion () |
Returns the region being displayed. | |
virtual void | fit () |
Zoom to a level where all objects in the map can be seen. | |
virtual void | zoomArea (double x0, double y0, double x1, double y1) |
Zoom to a given area. | |
virtual void | zoom (double factor) |
Zoom by a fixed factor maintaining the center location. | |
virtual void | zoom (double xc, double yc, double factor) |
Zoom by a fixed factor. | |
virtual void | translateOrigin (double dx, double dy) |
Translates the origin of the display in some direction. | |
virtual void | pan (double dx, double dy) |
Pan (drag) the map in some direction. | |
virtual void | center (double x, double y) |
Centers the map around a given point. | |
virtual void | centerX (double x) |
Centers horizontally the map around a given point. | |
virtual void | centerY (double y) |
Centers vertically the map around a given point. | |
virtual void | draw () |
Redraws the map (by getting all the information from the database again). | |
virtual bool | drawObjects (int buffer=TdkCanvas::cbrBack) |
Returns true if any theme was loaded. | |
virtual void | drawFrontObjects () |
virtual void | drawGraphLegend () |
virtual void | drawSelectedObjects () |
virtual void | drawIdentifiedObjects () |
virtual void | drawOver () |
Redraws the map without erasing the current image displayed. | |
virtual void | refresh () |
Puts in the canvas the image of the last drawn map. | |
virtual void | resize (int xmin, int ymin, int xmax, int ymax, TdkResizeMethods met=rsmPreserveScalePos) |
Change the drawble area of the canvas. Coordinates are defined in pixels. | |
virtual double | distanceMeters (double xmin, double ymin, double xmax, double ymax) |
Calculates the distance between two given points. | |
Protected Member Functions | |
virtual void | handleVSEvent (TdkEvent &event) |
virtual void | handleVSEvent (TdkRedrawEvent &event) |
virtual void | handleVSEvent (TdkRefreshEvent &event) |
virtual void | handleVSEvent (TdkSelectObjectsEvent &event) |
virtual void | handleVSEvent (TdkSelectObjectsGIDVectorEvent &event) |
virtual void | handleVSEvent (TdkPickEvent &event) |
virtual void | handleVSEvent (TdkRedrawSelectedObjectsEvent &event) |
virtual void | handleVSEvent (TdkZoomAreaEvent &event) |
virtual void | handleVSEvent (TdkSelectedObjectsBBoxEvent &event) |
virtual void | handleVSEvent (TdkObjectIdentificationEvent &event) |
virtual void | handleVSEvent (TdkClearObjectIdentificationEvent &event) |
virtual void | handleVSEvent (TdkThemeObjectsIdentificationEvent &event) |
virtual void | handleVOEvent (TdkEvent &event) |
virtual void | handleVSEvent (TdkViewportPolylineFeedbackEvent &event) |
virtual void | box (bool onlyVisible, double &xmin, double &ymin, double &xmax, double &ymax) |
This class is the the component responsible for graphicaly displaying a map. It has a TdkCanvas component on which it draws themap. The basic operations performed by the map display are zoom, pan, fit, draw, coordinate transformations and calculations, etc.
TdkMapDisplay::TdkMapDisplay | ( | TdkCanvas * | canvas | ) |
virtual TdkMapDisplay::~TdkMapDisplay | ( | ) | [inline, virtual] |
TeBox TdkMapDisplay::getMapRange | ( | ) | [virtual] |
Calculates the bounding box of the elements being displayed.
TeBox TdkMapDisplay::getFullMapRange | ( | ) | [virtual] |
Calculates the bounding box of the elements in the map (being displayed or not).
TeBox TdkMapDisplay::getVisibleRegion | ( | ) | [virtual] |
Returns the region being displayed.
void TdkMapDisplay::fit | ( | ) | [virtual] |
void TdkMapDisplay::zoomArea | ( | double | x0, | |
double | y0, | |||
double | x1, | |||
double | y1 | |||
) | [virtual] |
Zoom to a given area.
x0 | X world coordinate of the location at the top left corner of the area. | |
y0 | Y world coordinate of the location at the top left corner of the area. | |
x1 | X world coordinate of the location at the bottom right corner of the area. | |
y1 | Y world coordinate of the location at the bottom right corner of the area. |
Reimplemented from TdkDisplay.
void TdkMapDisplay::zoom | ( | double | factor | ) | [virtual] |
Zoom by a fixed factor maintaining the center location.
factor | Zoom factor. |
Reimplemented from TdkDisplay.
void TdkMapDisplay::zoom | ( | double | xc, | |
double | yc, | |||
double | factor | |||
) | [virtual] |
Zoom by a fixed factor.
xc | X world coordinate of the location to be centralized in the new zoom level. | |
yc | Y world coordinate of the location to be centralized in the new zoom level. | |
factor | Zoom factor. |
Reimplemented from TdkDisplay.
void TdkMapDisplay::translateOrigin | ( | double | dx, | |
double | dy | |||
) | [virtual] |
Translates the origin of the display in some direction.
dx | Origin's horizontal deslocation in world coordinates. | |
dy | Origin's vertical deslocation in world coordinates. |
void TdkMapDisplay::pan | ( | double | dx, | |
double | dy | |||
) | [virtual] |
Pan (drag) the map in some direction.
dx | Horizontal deslocation in world coordinates. | |
dy | Vertical deslocation in world coordinates. |
Reimplemented from TdkDisplay.
void TdkMapDisplay::center | ( | double | x, | |
double | y | |||
) | [virtual] |
Centers the map around a given point.
x | X coordinate of the point. | |
y | Y coordinate of the point. |
void TdkMapDisplay::centerX | ( | double | x | ) | [virtual] |
Centers horizontally the map around a given point.
x | X coordinate of the point. |
void TdkMapDisplay::centerY | ( | double | y | ) | [virtual] |
Centers vertically the map around a given point.
y | Y coordinate of the point. |
void TdkMapDisplay::draw | ( | ) | [virtual] |
Redraws the map (by getting all the information from the database again).
Reimplemented from TdkDisplay.
Reimplemented in TdkJNIMapDisplay.
bool TdkMapDisplay::drawObjects | ( | int | buffer = TdkCanvas::cbrBack |
) | [virtual] |
Returns true if any theme was loaded.
drawImageOk
void TdkMapDisplay::drawFrontObjects | ( | ) | [virtual] |
void TdkMapDisplay::drawGraphLegend | ( | ) | [virtual] |
void TdkMapDisplay::drawSelectedObjects | ( | ) | [virtual] |
void TdkMapDisplay::drawIdentifiedObjects | ( | ) | [virtual] |
void TdkMapDisplay::drawOver | ( | ) | [virtual] |
Redraws the map without erasing the current image displayed.
void TdkMapDisplay::refresh | ( | ) | [virtual] |
void TdkMapDisplay::resize | ( | int | xmin, | |
int | ymin, | |||
int | xmax, | |||
int | ymax, | |||
TdkResizeMethods | met = rsmPreserveScalePos | |||
) | [virtual] |
Change the drawble area of the canvas. Coordinates are defined in pixels.
Reimplemented from TdkDisplay.
double TdkMapDisplay::distanceMeters | ( | double | xmin, | |
double | ymin, | |||
double | xmax, | |||
double | ymax | |||
) | [virtual] |
Calculates the distance between two given points.
xmin | X world coordinate of point 1. | |
ymin | Y world coordinate of point 1. | |
xmax | X world coordinate of point 2. | |
ymax | Y world coordinate of point 2. |
void TdkMapDisplay::handleVSEvent | ( | TdkEvent & | event | ) | [protected, virtual] |
Reimplemented from TdkDisplay.
void TdkMapDisplay::handleVSEvent | ( | TdkRedrawEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkRefreshEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkSelectObjectsEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkSelectObjectsGIDVectorEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkPickEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkRedrawSelectedObjectsEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkZoomAreaEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkSelectedObjectsBBoxEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkObjectIdentificationEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkClearObjectIdentificationEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVSEvent | ( | TdkThemeObjectsIdentificationEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::handleVOEvent | ( | TdkEvent & | event | ) | [protected, virtual] |
Reimplemented from TdkDisplay.
void TdkMapDisplay::handleVSEvent | ( | TdkViewportPolylineFeedbackEvent & | event | ) | [protected, virtual] |
void TdkMapDisplay::box | ( | bool | onlyVisible, | |
double & | xmin, | |||
double & | ymin, | |||
double & | xmax, | |||
double & | ymax | |||
) | [protected, virtual] |
Computes the bounding box of the spatial data associated to the MapView.