Bridges-C++ 3.5.0
Bridges(C++ API)
Public Member Functions | List of all members
bridges::datastructure::WorldMap Class Reference

This class provides an API to building, displaying and manipulating World maps and countries in BRIDGES. More...

#include <WorldMap.h>

Inheritance diagram for bridges::datastructure::WorldMap:
bridges::datastructure::Map bridges::datastructure::DataStructure

Public Member Functions

const string getProjection () const override
 Gets the type of map projection. For US map we currently use albersusa. More...
 
const bool getOverlay () const override
 Gets the map overlay flag. More...
 
virtual const string getMapRepresentation () const override
 Generates the JSON representation of the World map. More...
 
 WorldMap ()
 
 WorldMap (vector< Country > cntry_data)
 
vector< Country > & getMapData ()
 
void setCountryData (vector< Country > cntry_data)
 
virtual const string getDStype () const override
 
virtual const string getProjection () const =0
 
virtual const bool getOverlay () const =0
 
virtual const string getMapRepresentation () const =0
 
- Public Member Functions inherited from bridges::datastructure::DataStructure
virtual ~DataStructure ()=default
 
virtual const string getDStype () const =0
 

Detailed Description

This class provides an API to building, displaying and manipulating World maps and countries in BRIDGES.

We can draw a World map with all country boundaries, or specify a set of countries and display the country boundaries.

Functions are provided to access each country county and color its boundary, its interior using stroke and fill color functions. This lets us build map based applications where the fill color can be used to represent different data attributes, such as population counts, election statistics or any attribute at the country level. We stop at the country level as each country has its own subdivisions, such as discticts, states, regions, counties, etc.

One can also construct the object with the default constructor, passing no data. And only a simple outline of the states will be rendered.

See the Maps tutorials for examples of the usage of the World Map API at https://bridgesuncc.github.io/tutorials/WorldMap.html

Authors: Kalpathi Subramanian, Erik Saule Last modified : May 22, 2025

Constructor & Destructor Documentation

◆ WorldMap() [1/2]

bridges::datastructure::WorldMap::WorldMap ( )
inline

◆ WorldMap() [2/2]

bridges::datastructure::WorldMap::WorldMap ( vector< Country cntry_data)
inline

Member Function Documentation

◆ getDStype()

virtual const string bridges::datastructure::WorldMap::getDStype ( ) const
inlineoverridevirtual
Returns
The string representation of this data structure type

Implements bridges::datastructure::DataStructure.

◆ getMapData()

vector< Country > & bridges::datastructure::WorldMap::getMapData ( )
inline

◆ getMapRepresentation()

virtual const string bridges::datastructure::WorldMap::getMapRepresentation ( ) const
inlineoverridevirtual

Generates the JSON representation of the World map.

Returns
string

Implements bridges::datastructure::Map.

◆ getOverlay()

const bool bridges::datastructure::WorldMap::getOverlay ( ) const
inlineoverridevirtual

Gets the map overlay flag.

Implements bridges::datastructure::Map.

◆ getProjection()

const string bridges::datastructure::WorldMap::getProjection ( ) const
inlineoverridevirtual

Gets the type of map projection. For US map we currently use albersusa.

Implements bridges::datastructure::Map.

◆ setCountryData()

void bridges::datastructure::WorldMap::setCountryData ( vector< Country cntry_data)
inline

The documentation for this class was generated from the following file: