Bridges-C++  3.4.5-dev1-6-g935685a
Bridges(C++ API)
Public Member Functions | List of all members
bridges::datastructure::USMap Class Reference

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

#include <USMap.h>

Inheritance diagram for bridges::datastructure::USMap:
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 US map. More...
 
 USMap (vector< USState > st_data)
 
vector< USState > & getMapData ()
 
void setStateData (vector< USState > st_data)
 
virtual const string getDStype () const override
 
- Public Member Functions inherited from bridges::datastructure::DataStructure
virtual ~DataStructure ()=default
 

Detailed Description

This class provides an API to building, displaying and manipulating US maps and counties in BRIDGES.

In the current implementation, we can draw a US map with all state boundaries, a map with all US state and county boundaries, or specify a set of states and display the state and/or county boundaries.

Functions are provided to access each US state or county and color its boundary or its interior using the stroke color and fill color functions. This lets us build map based applications where the fill fill color can be used to represent different data attributes, such population counts, election statistics or any attribute at the state or county level.

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

Constructor & Destructor Documentation

◆ USMap()

bridges::datastructure::USMap::USMap ( vector< USState st_data)
inline

Member Function Documentation

◆ getDStype()

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

Implements bridges::datastructure::DataStructure.

◆ getMapData()

vector<USState>& bridges::datastructure::USMap::getMapData ( )
inline

◆ getMapRepresentation()

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

Generates the JSON representation of the US map.

Returns
string

Implements bridges::datastructure::Map.

◆ getOverlay()

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

Gets the map overlay flag.

Implements bridges::datastructure::Map.

◆ getProjection()

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

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

Implements bridges::datastructure::Map.

◆ setStateData()

void bridges::datastructure::USMap::setStateData ( vector< USState st_data)
inline

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