VisioMove SDK (iOS)  2.1.22
VgMapModule::VgIMapModule Interface Referenceabstract
Inheritance diagram for VgMapModule::VgIMapModule:
Inheritance graph

Public Types

typedef std::vector< std::string > StringVector
 

Public Member Functions

virtual ~VgIMapModule ()
 
virtual void addListener (VgEngine::VgRefPtr< VgIPlaceListener >const &pListener)=0
 
virtual void removeListener (VgEngine::VgRefPtr< VgIPlaceListener >const &pListener)=0
 
virtual void setPlaceName (const std::string &pID, const std::string &pName)=0
 
virtual void setPlaceIcon (const std::string &pID, const VgPlaceIconDescriptor &pPlaceIconDescriptor)=0
 
virtual bool getPlaceName (const std::string &pID, std::string &pPlaceName) const =0
 
virtual bool queryPlaceDescriptor (const std::string &pID, VgPlaceDescriptor &pPlaceDescriptor) const =0
 
virtual bool queryPOIDescriptor (const std::string &pID, VgPOIDescriptor &pPOIDescriptor) const =0
 
virtual void queryAllPlaceIDs (std::vector< std::string > &pPlaceIDs) const =0
 
virtual bool getLayerForPosition (const VgEngine::VgPosition &pPos, std::string &pLayerNameContainingPosition) const =0
 
virtual bool getHeightRangeForLayer (const std::string &pLayerName, float &pHeightMin, float &pHeightMax) const =0
 
virtual void setPlaceColor (const std::string &pID, const VgPlaceColorDescriptor &pColorDescriptor)=0
 
virtual void setPlaceColor (const std::vector< std::string > &pIDs, const VgPlaceColorDescriptor &pColorDescriptor)=0
 
virtual void setPlaceColor (const std::string &pChangesCsv)=0
 
virtual void resetPlaceColor (const std::string &pID)=0
 
virtual void resetPlaceColor (const std::vector< std::string > &pIDs)=0
 
virtual bool getGeofences (std::vector< std::string > &pPoiIds)=0
 
virtual bool getGeofences (std::set< std::string > &pPoiIds)=0
 
virtual bool getGeofences (const VgEngine::VgPosition &pPosition, std::vector< std::string > &pGeofenceIDs)=0
 
virtual bool getGeofences (const VgEngine::VgPosition &pPosition, const std::string &pLayerName, std::vector< std::string > &pGeofenceIDs)=0
 
- Public Member Functions inherited from VgApplication::VgIModule
virtual ~VgIModule ()
 
virtual const std::string & getName () const =0
 

Protected Member Functions

 VgIMapModule ()
 
- Protected Member Functions inherited from VgApplication::VgIModule
 VgIModule ()
 

Detailed Description

The VgIMapModule defines all the needed interfaces to interact with the map module.

Member Typedef Documentation

typedef std::vector< std::string > VgMapModule::VgIMapModule::StringVector

Constructor & Destructor Documentation

VgMapModule::VgIMapModule::VgIMapModule ( )
inlineprotected

Constructor.

virtual VgMapModule::VgIMapModule::~VgIMapModule ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void VgMapModule::VgIMapModule::addListener ( VgEngine::VgRefPtr< VgIPlaceListener >const &  pListener)
pure virtual

Adds a place listener.

Parameters
pListenerThe place listener to be added.
virtual bool VgMapModule::VgIMapModule::getGeofences ( std::vector< std::string > &  pPoiIds)
pure virtual

Retrieve the ids of all the pois that have at least a geofence.

Parameters
pPoiIdsVector of poi ids to feed with results.
Returns
true if geofences where found and added.
Version
2.1.4
Deprecated:
At version 2.1.19 the version taking a std::set is prefered.
virtual bool VgMapModule::VgIMapModule::getGeofences ( std::set< std::string > &  pPoiIds)
pure virtual

Retrieve the ids of all the pois that have at least a geofence.

Parameters
pPoiIdsSet of poi ids to feed with results.
Returns
true if geofences where found and added.
Version
2.1.19
virtual bool VgMapModule::VgIMapModule::getGeofences ( const VgEngine::VgPosition pPosition,
std::vector< std::string > &  pGeofenceIDs 
)
pure virtual

Retrieve the names of the geofences that the position belongs to. It uses the position's mZOrAltitude to determine which layers to search.

Parameters
pPositionsearch position, it will use the position's mZOrAltitude to determine which layers to search
pGeofenceIDslist of IDs in no particular order.
Returns
true if geofences where found and added.
Version
2.1.4
virtual bool VgMapModule::VgIMapModule::getGeofences ( const VgEngine::VgPosition pPosition,
const std::string &  pLayerName,
std::vector< std::string > &  pGeofenceIDs 
)
pure virtual

Retrieve the names of the geofences that the position belongs to. It ignores the mZOrAltitude component of the position and forces search only in provided layer.

Parameters
pPositionsearch position.
pLayerNamelayer name, it will only search the geofences in that layer.
pGeofenceIDslist of IDs in no particular order.
Returns
true if geofences where found and added.
Version
2.1.4
virtual bool VgMapModule::VgIMapModule::getHeightRangeForLayer ( const std::string &  pLayerName,
float &  pHeightMin,
float &  pHeightMax 
) const
pure virtual

Gets the height range (min and max) for a given layer. These ranges may overlap between floors.

Parameters
pLayerNameThe layer who's height range is of interest
pHeightMinAn output parameter containing the minimum height (i.e. the floor) of pLayerName, this is used for indoor positioning. usually floor altitude minus 6.0
pHeightMaxAn output parameter containing the maximum height (i.e. the ceiling) of pLayerName, this is used for indoor positioning. usually floor altitude plus 6.0
Returns
true if output range parameters have been correctly assigned, otherwise false.
Note
the difference between pHeightMax and pHeightMin will be the altitude of the floor.
Version
2.0
2.1.4 updated documentation to say only the average or pHeightMin and pHeightMax is reliable and that they may overlap with different floors.
virtual bool VgMapModule::VgIMapModule::getLayerForPosition ( const VgEngine::VgPosition pPos,
std::string &  pLayerNameContainingPosition 
) const
pure virtual

Finds the best fitting layer for a given position.

Parameters
pPosthe position of interest
pLayerNameContainingPositionA string which will be populated with the name of the best fitting layer.
Returns
true if a corresponding layer has been found, otherwise false. Note on Multi-building datasets, where many layers may share the same altitude this method will only return one layer: possible solutions are:
  • Use getRoutingNode() and then VgIRoutingNode::getLayerName()
  • Use getHeightRangeForLayer for all the layers to determine which layers cover the target altitude
  • Add geofences to all the layers of your map, and use getGeofences with a position.
Warning
This method ignores the VgEngine::VgPosition::mSRS member. It will use solely the mZOrAltitude member to determine the layer.

This means that the positions returned by picking in VgIPlaceListener subclasses will not be suitable to determine the layer in which the "click" occured, instead use the VgMapModule::VgPlaceDescriptor structure.

This behavior will change in the near future to take SRSs into account.

Version
2.0
2.1.8 added warning about Multi-Buildings datasets.
virtual bool VgMapModule::VgIMapModule::getPlaceName ( const std::string &  pID,
std::string &  pPlaceName 
) const
pure virtual

Gets a place name according to its ID.

Parameters
pIDthe place ID.
pPlaceNamethe place name.
Returns
false if pID does not exist.
virtual void VgMapModule::VgIMapModule::queryAllPlaceIDs ( std::vector< std::string > &  pPlaceIDs) const
pure virtual

Queries all place IDs. This call can be made anytime after VgEngine::VgIDatabase::loadConfiguration()

Parameters
pPlaceIDsA string vector which will be populated with place IDs for the current dataset.
Version
2.1.0 Updated documentation, call is valid anytime after loadConfiguration()
virtual bool VgMapModule::VgIMapModule::queryPlaceDescriptor ( const std::string &  pID,
VgPlaceDescriptor pPlaceDescriptor 
) const
pure virtual

Queries a place descriptor.

Deprecated:
replaced with queryPOIDescriptor
Parameters
pIDthe place ID.
pPlaceDescriptorthe place descriptor.
Returns
true if the place descriptor was found, otherwise false.
virtual bool VgMapModule::VgIMapModule::queryPOIDescriptor ( const std::string &  pID,
VgPOIDescriptor pPOIDescriptor 
) const
pure virtual

Queries a POI descriptor. A POI Descriptor contains information like the layername, center, bounding positions (i.e. footprints), preferred heading of a POI. The bounding positions can be used with VgEngine::VgICamera::getViewpointFromPositions with some padding to obtain a nice fitting viewpoint for a given POI. If you are using this call only to find the layername of a POI, you may consider using VgRoutingModule::VgIRoutingSolver::getRoutingNode

Parameters
pIDthe POI ID.
pPOIDescriptorthe POI descriptor.
Returns
true if the POI descriptor was found, otherwise false.
See also
VgRoutingModule::VgIRoutingSolver::getRoutingNode
Version
2.1.3
virtual void VgMapModule::VgIMapModule::removeListener ( VgEngine::VgRefPtr< VgIPlaceListener >const &  pListener)
pure virtual

Removes a place listener.

Parameters
pListenerThe place listener to be removed.
virtual void VgMapModule::VgIMapModule::resetPlaceColor ( const std::string &  pID)
pure virtual

Resets the original color of a place.

There are no effect if the place color has not been changed.

Parameters
pIDThe place ID.
virtual void VgMapModule::VgIMapModule::resetPlaceColor ( const std::vector< std::string > &  pIDs)
pure virtual

Resets the original color of a list of place.

There are no effect on places whose color has not been changed.

Parameters
pIDsA list of place IDs.
virtual void VgMapModule::VgIMapModule::setPlaceColor ( const std::string &  pID,
const VgPlaceColorDescriptor pColorDescriptor 
)
pure virtual

Sets a place color according to its ID.

Parameters
pIDThe place ID to color.
pColorDescriptorThe place color descriptor to be set.
Remarks
With non-extruded maps, only the VgPlaceColorDescriptor.mTopColor will be used.
It is advised to achieve the best performance to call setPlaceColor after loadConfiguration, but before loadDataset when updating many places.
It is advised to use this method when setting a single place with a unique color.
Warning
The use of this features requires that the map be specially configured, please contact Visioglobe if you use this feature.
virtual void VgMapModule::VgIMapModule::setPlaceColor ( const std::vector< std::string > &  pIDs,
const VgPlaceColorDescriptor pColorDescriptor 
)
pure virtual

Sets a place color according to a list of place ID's.

Parameters
pIDsthe list of place IDs to color.
pColorDescriptorthe place color descriptor to be set.
Remarks
With non-extruded maps, only the VgPlaceColorDescriptor.mTopColor will be used.
It is advised to achieve the best performance to call setPlaceColor after loadConfiguration, but before loadDataset when updating many places.
It is advised to use this method when setting two or more places with the same color.
Warning
The use of this features requires that the map be specially configured, please contact Visioglobe if you use this feature.
virtual void VgMapModule::VgIMapModule::setPlaceColor ( const std::string &  pChangesCsv)
pure virtual

Sets multiple places' colors in one call.

Parameters
pChangesCsvChanges encoded in a CSV string. Format is (<id>,<topColor>[,<bottomColor>]\n)*. Colors are given in HTML-style hex format.
Remarks
With non-extruded maps, only the top color will be used.
It is advised to achieve the best performance to call setPlaceColor after loadConfiguration, but before loadDataset when updating many places.
It is advised to use this method when setting two or more places with the different colors.
Warning
The use of this features requires that the map be specially configured, please contact Visioglobe if you use this feature.
Version
2.1.22
virtual void VgMapModule::VgIMapModule::setPlaceIcon ( const std::string &  pID,
const VgPlaceIconDescriptor pPlaceIconDescriptor 
)
pure virtual

Sets a place icon according to its ID. The Texture it adds will be available on all datasets and will only be released if a different Texture is set for the same place ID or if a different configuration is loaded.

Parameters
pIDthe place ID.
pPlaceIconDescriptorThe place icon descriptor
Remarks
adding an icon changes the orientation behaviour of the label, and makes it always camera facing.
if there is already a place name associated with the ID, the size of the label will be changed to match the size of the icon.
It is advised to achieve the best performance to call setPlaceIcon after loadConfiguration, but before loadDataset when updating many places.
This method cannot yet change icons that are initially on the map. This can be done via VgQuery.
This method deletes and creates a new VgPoint associated with the ID. If one holds a ref to a point before calling this method on its ID, the point will remain valid but detached from its layer and another one (with same ID) will be displayed.
Version
2.1.0 Updated documentation.
virtual void VgMapModule::VgIMapModule::setPlaceName ( const std::string &  pID,
const std::string &  pName 
)
pure virtual

Sets a place name according to its ID.

Parameters
pIDthe place ID.
pNamethe place name to be set.
Remarks
It is advised to achieve the best performance to call setPlaceIcon after loadConfiguration, but before loadDataset when updating many places.
This method deletes and creates a new VgPoint associated with the ID. If one holds a ref to a point before calling this method on its ID, the point will remain valid but detached from its layer and another one (with same ID) will be displayed.

The documentation for this interface was generated from the following file:
VisioMove 2.1.22, Visioglobe® 2016