• Antelope Release 5.9 Mac OS X 10.13.2 2019-05-01

 

NAME

BQMap - BRTT Qt graphics extension for drawing a map

SYNOPSIS


$(QTNATIVELIBS) -lbqplot_native -lbanner -lbrttutil -lbumapdata $(DBLIBS) $(TRLIBS)

#include "BQ.h"

DESCRIPTION

BQMap objects are used to display geographic base maps. Maps can be latitude-longitude map image grids expressed as color pixels, such as the NASA Bluemarble images, or Digital Elevation Model (DEM) latitude-longitude grids, such as the NASA SRTM30 DEM grid, or vector polylines representing shorelines, displayed as polygons with outlines and fills, or other non-filled polylines, such as political boundaries and rivers, such as the Global Self-consistent Hierarchial High-resolution Shoreline (GSHHS) database from NOAA's National Geophysical Data Center.

BQMap objects are complex objects that make use of other helper classes, including BQMapLayer(3) and BQNavigator(3). The default BQTaskbar(3) and BQViewport(3) event handlers are used to implement a basic taskbar and mouse interaction for panning and zooming the map. The BQViewport parent object is controlled automatically from BQMap objects. All of the actual map rendering is handled through the BQMapLayer objects. BQMap objects themselves only orchestrate the interactions from all of its helper classes and the other objects it creates and uses.

This class inherits the BQConfigure class which is itself a subclass of the BUConfigure class with extensions to process Qt colors and fonts. The configure methods are implemented in the BUConfigure parent (see BUConfigure(3)).

INHERITS FROM

BQViewportItem, BQConfigure

CONSTRUCTOR

BQMap(BQViewport *master, int make_navigator=1, int make_grids=1);
BQMap(QWidget *parent, int make_navigator=1, int make_grids=1);

Where master is the BQViewport master for this object, or alternatively parent is a parent QWidget that is used to automatically construct a BQViewport object as the master viewport for this object. The make_navigator and make_grids flags control whether or not a QNavigator(3) window is made and whether or not latitude-longitude grid lines are automatically made through an internally generated BQAxes()3 object.

METHODS INHERITED FROM BQConfigure

METHODS INHERITED FROM BQViewportItem

BQMap METHODS

OBJECT CONFIGURATION PARAMETERS

EXAMPLE

Following is a simple example program that uses BQMap.

#include "BQ.h"

int
main (int argc, char **argv)

{
    int ret;

    QApplication app (argc, argv);

    QWidget *frame = new QWidget();

    BQMap *map = new BQMap(frame);
    map->setDefaults();
    map->configure (
        "latr", "40",
        "lonr", "-100",
        "range", "90",
        NULL );

    double t0 = now();
    frame->setGeometry (0, 0, 1500, 1000);
    frame->show();

    frame->setWindowTitle ("bqplot_test_map");

    printf ("view setup %f\n", now()-t0);

    ret = app.exec();

    return ret;
 }

SEE ALSO

bqplot(3), BQViewport(3), BQLayer(3), BQConfigure(3), BQMapLayer(3), BQNavigator(3), BQTaskbar(3)

AUTHOR

Danny Harvey, BRTT