CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
CartoTypeCore::Framework Class Reference

#include <cartotype_framework.h>

Inheritance diagram for CartoTypeCore::Framework:
CartoTypeCore::MNavigatorObserver

Classes

class  Param
 

Public Member Functions

std::unique_ptr< FrameworkCopy (Result &aError, bool aCopyTextIndex=true, bool aCopyFonts=true) const
 
Result License (const String &aKey)
 
Result License (const uint8_t *aKey, size_t aKeyLength)
 
std::string Licensee () const
 
std::string ExpiryDate () const
 
std::string AppBuildDate () const
 
uint8_t License () const
 
String Copyright () const
 
void SetCopyrightNotice ()
 
void SetCopyrightNotice (const String &aCopyright)
 
void SetLegend (std::unique_ptr< Legend > aLegend, double aWidth, const char *aUnit, const ExtendedNoticePosition &aPosition)
 
void SetLegend (const Legend &aLegend, double aWidth, const char *aUnit, const ExtendedNoticePosition &aPosition)
 
void EnableLegend (bool aEnable)
 
bool LegendEnabled () const
 
void SetScaleBar (bool aMetricUnits, double aWidth, const char *aUnit, const ExtendedNoticePosition &aPosition)
 
void EnableScaleBar (bool aEnable)
 
bool ScaleBarEnabled () const
 
Result SetTurnInstructions (bool aMetricUnits, bool aAbbreviate, double aWidth, const char *aUnit, const ExtendedNoticePosition &aPosition, double aTextSize=7, const char *aTextSizeUnit="pt")
 
void EnableTurnInstructions (bool aEnable)
 
bool TurnInstructionsEnabled () const
 
void SetTurnInstructionText (const String &aText)
 
String TurnInstructionText ()
 
void DrawNoticesAutomatically (bool aEnable)
 
bool HasNotices () const
 
PositionedBitmap NoticeBitmap () const
 
Result Configure (const String &aFilename)
 
Result LoadMap (const String &aMapFileName, const std::string *aEncryptionKey=nullptr)
 
Result CreateWritableMap (WritableMapType aType, String aFileName=nullptr)
 
Result SaveMap (uint32_t aHandle, const String &aFileName, FileType aFileType)
 
Result ReadMap (uint32_t aHandle, const String &aFileName, FileType aFileType)
 
Result SaveMap (uint32_t aHandle, std::vector< uint8_t > &aData, const FindParam &aFindParam)
 
Result ReadMap (uint32_t aHandle, const std::vector< uint8_t > &aData)
 
Result WriteMapImage (const String &aFileName, FileType aFileType, bool aCompress=false)
 
bool MapIsEmpty (uint32_t aHandle)
 
size_t MapCount () const
 
uint32_t MapHandle (size_t aIndex) const
 
bool MapIsWritable (size_t aIndex) const
 
std::unique_ptr< CartoTypeCore::MapMetaDataMapMetaData (size_t aIndex) const
 
Result UnloadMapByHandle (uint32_t aHandle)
 
Result EnableMapByHandle (uint32_t aHandle, bool aEnable)
 
Result EnableAllMaps ()
 
bool MapIsEnabled (uint32_t aHandle) const
 
uint32_t LastMapHandle () const
 
uint32_t MainMapHandle () const
 
uint32_t MemoryMapHandle () const
 
Result LoadFont (const String &aFontFileName)
 
Result LoadFont (const uint8_t *aData, size_t aLength, bool aCopyData)
 
Result SetStyleSheet (const String &aStyleSheetFileName, size_t aIndex=0)
 
Result SetStyleSheet (const char *aData, size_t aLength, size_t aIndex=0)
 
Result SetStyleSheet (const StyleSheetData &aStyleSheetData, size_t aIndex=0)
 
Result SetStyleSheet (const StyleSheetDataArray &aStyleSheetDataArray, const StringDictionary *aStyleSheetVariables=nullptr, const BlendStyleSet *aBlendStyleSet=nullptr)
 
Result ReloadStyleSheet (size_t aIndex=0)
 
Result AppendStyleSheet (const String &aStyleSheetFileName)
 
Result AppendStyleSheet (const char *aData, size_t aLength)
 
Result DeleteStyleSheet (size_t aIndex)
 
std::string StyleSheetText (size_t aIndex) const
 
CartoTypeCore::StyleSheetData StyleSheetData (size_t aIndex) const
 
const CartoTypeCore::StyleSheetDataArrayStyleSheetDataArray () const
 
const StringDictionaryStyleSheetVariables () const
 
bool SetNightMode (bool aSet)
 
Color SetNightModeColor (Color aColor)
 
bool NightMode () const
 
Color NightModeColor () const
 
CartoTypeCore::BlendStyleSet SetBlendStyle (const BlendStyleSet *aBlendStyleSet)
 
CartoTypeCore::BlendStyleSet BlendStyleSet () const
 
FileLocation StyleSheetErrorLocation () const
 
Result Resize (int32_t aViewWidth, int32_t aViewHeight)
 
void SetResolutionDpi (double aDpi)
 
double ResolutionDpi () const
 
Result SetScaleDenominator (double aScale)
 
double ScaleDenominator () const
 
Result SetScaleDenominatorInView (double aScale)
 
double ScaleDenominatorInView () const
 
double DistanceInMeters (double aX1, double aY1, double aX2, double aY2, CoordType aCoordType) const
 
double ScaleDenominatorFromZoomLevel (double aZoomLevel, int32_t aImageSizeInPixels=256) const
 
double ZoomLevelFromScaleDenominator (double aScaleDenominator, int32_t aImageSizeInPixels=256) const
 
void SetPerspective (bool aSet)
 
void SetPerspectiveParam (const PerspectiveParam &aParam)
 
bool Perspective () const
 
CartoTypeCore::PerspectiveParam PerspectiveParam () const
 
Result Zoom (double aZoomFactor)
 
Result ZoomAt (double aZoomFactor, double aX, double aY, CoordType aCoordType)
 
Result Rotate (double aAngle)
 
Result RotateAt (double aAngle, double aX, double aY, CoordType aCoordType)
 
Result SetRotation (double aAngle)
 
Result SetRotationAt (double aAngle, double aX, double aY, CoordType aCoordType)
 
double Rotation () const
 
Result RotateAndZoom (double aAngle, double aZoomFactor, double aX, double aY, CoordType aCoordType)
 
Result Pan (int32_t aDx, int32_t aDy)
 
Result Pan (const Point &aFrom, const Point &aTo)
 
Result Pan (double aFromX, double aFromY, CoordType aFromCoordType, double aToX, double aToY, CoordType aToCoordType)
 
Result SetViewCenter (double aX, double aY, CoordType aCoordType)
 
Result SetView (double aMinX, double aMinY, double aMaxX, double aMaxY, CoordType aCoordType, int32_t aMarginInPixels=0, int32_t aMinScaleDenominator=0)
 
Result SetView (const MapObject *const *aMapObjectArray, size_t aMapObjectCount, int32_t aMarginInPixels, int32_t aMinScaleDenominator)
 
Result SetView (const MapObjectArray &aMapObjectArray, int32_t aMarginInPixels, int32_t aMinScaleDenominator)
 
Result SetView (const MapObject &aMapObject, int32_t aMarginInPixels, int32_t aMinScaleDenominator)
 
Result SetView (const Geometry &aGeometry, int32_t aMarginInPixels, int32_t aMinScaleDenominator)
 
Result SetView (const ViewState &aViewState)
 
Result SetViewToRoute (size_t aRouteIndex, int32_t aMarginInPixels, int32_t aMinScaleDenominator)
 
Result SetViewToWholeMap ()
 
Result GetView (double &aMinX, double &aMinY, double &aMaxX, double &aMaxY, CoordType aCoordType) const
 
Result GetView (RectFP &aView, CoordType aCoordType) const
 
Result GetView (FixedSizeContourFP< 4, true > &aView, CoordType aCoordType) const
 
Result GetMapExtent (double &aMinX, double &aMinY, double &aMaxX, double &aMaxY, CoordType aCoordType) const
 
Result GetMapExtent (RectFP &aMapExtent, CoordType aCoordType) const
 
String ProjectionAsProj4Param () const
 
CartoTypeCore::ViewState ViewState () const
 
Result SetViewLimits (double aMinScaleDenominator, double aMaxScaleDenominator, const Geometry &aGeometry)
 
Result SetViewLimits (double aMinScaleDenominator=0, double aMaxScaleDenominator=0)
 
Result InsertMapObject (uint32_t aMapHandle, const String &aLayerName, const Geometry &aGeometry, const String &aStringAttributes, FeatureInfo aFeatureInfo, uint64_t &aId, bool aReplace)
 
Result InsertPointMapObject (uint32_t aMapHandle, const String &aLayerName, double aX, double aY, CoordType aCoordType, const String &aStringAttributes, FeatureInfo aFeatureInfo, uint64_t &aId, bool aReplace)
 
Result InsertCircleMapObject (uint32_t aMapHandle, const String &aLayerName, double aCenterX, double aCenterY, CoordType aCenterCoordType, double aRadius, CoordType aRadiusCoordType, const String &aStringAttributes, FeatureInfo aFeatureInfo, uint64_t &aId, bool aReplace)
 
Result InsertEllipseMapObject (uint32_t aMapHandle, const String &aLayerName, double aCenterX, double aCenterY, CoordType aCenterCoordType, double aRadiusX, double aRadiusY, CoordType aRadiusCoordType, double aRotationDegrees, const String &aStringAttributes, FeatureInfo aFeatureInfo, uint64_t &aId, bool aReplace)
 
Result InsertEnvelopeMapObject (uint32_t aMapHandle, const String &aLayerName, const Geometry &aGeometry, double aRadius, CoordType aRadiusCoordType, const String &aStringAttributes, FeatureInfo aFeatureInfo, uint64_t &aId, bool aReplace)
 
Result InsertPushPin (double aX, double aY, CoordType aCoordType, const String &aStringAttrib, const String &aColor, int32_t aIconCharacter, uint64_t &aId)
 
Result InsertCopyOfMapObject (uint32_t aMapHandle, const String &aLayerName, const MapObject &aObject, double aEnvelopeRadius, CoordType aRadiusCoordType, uint64_t &aId, bool aReplace, const String *aStringAttributes=nullptr, const FeatureInfo *aFeatureInfo=nullptr)
 
Result DeleteMapObjects (uint32_t aMapHandle, uint64_t aStartId, uint64_t aEndId, uint64_t &aDeletedCount, String aCondition=nullptr)
 
std::unique_ptr< MapObjectLoadMapObject (Result &aError, uint32_t aMapHandle, uint64_t aId)
 
Result ReadGpx (uint32_t aMapHandle, const String &aFileName)
 
Geometry Range (Result &aError, const RouteProfile *aProfile, double aX, double aY, CoordType aCoordType, double aTimeOrDistance, bool aIsTime)
 
CartoTypeCore::TimeAndDistanceMatrix TimeAndDistanceMatrix (Result &aError, const std::vector< PointFP > &aFrom, const std::vector< PointFP > &aTo, CoordType aCoordType, ProgressCallBack *aProgressCallBack=nullptr)
 
bool MutuallyAccessible (Result &aError, const std::vector< PointFP > &aPointArray, CoordType aCoordType, std::vector< uint32_t > *aGroupArray=nullptr)
 
void EnableLayer (const String &aLayerName, bool aEnable)
 
bool LayerIsEnabled (const String &aLayerName) const
 
void SetDisabledLayersInternal (const std::set< String > &aLayerNames)
 
void SetDisabledMapsInternal (const std::set< uint32_t > &aMaps)
 
std::vector< StringLayerNames ()
 
Result ConvertCoords (double *aCoordArray, size_t aCoordArraySize, CoordType aFromCoordType, CoordType aToCoordType) const
 
Result ConvertCoords (const WritableCoordSet &aCoordSet, CoordType aFromCoordType, CoordType aToCoordType) const
 
template<class T >
Result ConvertCoords (GeneralGeometry< T > &aGeometry, CoordType aToCoordType)
 
Result ConvertPoint (double &aX, double &aY, CoordType aFromCoordType, CoordType aToCoordType) const
 
double PixelsToMeters (double aPixels) const
 
double MetersToPixels (double aMeters) const
 
String DataSetName () const
 
Result EditSetWritableMap (uint32_t aMapHandle)
 
Result EditNewLineObject (const PointFP &aDisplayPoint)
 
Result EditNewPolygonObject (const PointFP &aDisplayPoint)
 
Result EditMoveCurrentPoint (const PointFP &aDisplayPoint)
 
Result EditAddCurrentPoint ()
 
Result EditDeleteCurrentPoint ()
 
Result EditDeleteCurrentObject ()
 
Result EditSelectNearestPoint (const PointFP &aDisplayPoint, double aRadiusInMillimeters)
 
Result EditInsertCurrentObject (const String &aLayer, uint64_t &aId, bool aReplace)
 
Result EditSetCurrentObjectStringAttribute (const String &aKey, const String &aValue)
 
Result EditSetCurrentObjectFeatureInfo (FeatureInfo aFeatureInfo)
 
Result EditGetCurrentObjectAreaAndLength (double &aArea, double &aLength) const
 
const BitmapViewMapBitmap (Result &aError, bool *aRedrawWasNeeded=nullptr)
 
const BitmapViewLabelBitmap (Result &aError, bool *aRedrawWasNeeded=nullptr)
 
const BitmapViewMemoryDataBaseMapBitmap (Result &aError, bool *aRedrawWasNeeded=nullptr)
 
void DrawNotices (GraphicsContext &aGc) const
 
Result EnableDrawingMemoryDataBase (bool aEnable)
 
void ForceRedraw ()
 
bool ClipBackgroundToMapBounds (bool aEnable)
 
bool DrawBackground (bool aEnable)
 
int32_t SetTileOverSizeZoomLevels (int32_t aLevels)
 
Result DrawLabelsToLabelHandler (MLabelHandler &aLabelHandler, double aStyleSheetExclusionScale)
 
bool ObjectWouldBeDrawn (Result &aError, uint64_t aId, MapObjectType aType, const String &aLayer, FeatureInfo aFeatureInfo, const String &aStringAttrib)
 
bool SetDraw3DBuildings (bool aEnable)
 
bool Draw3DBuildings () const
 
bool SetAnimateTransitions (bool aEnable)
 
bool AnimateTransitions () const
 
double SetLabelFPS (double aFPS)
 
double LabelFPS () const
 
bool SetFixedLabels (bool aSet)
 
bool FixedLabels ()
 
Result LoadIcon (const String &aFileName, const String &aId, const Point &aHotSpot, const Point &aLabelPos)
 
void UnloadIcon (const String &aId)
 
Bitmap TileBitmap (Result &aError, int32_t aTileSizeInPixels, int32_t aZoom, int32_t aX, int32_t aY, const TileBitmapParam *aParam=nullptr)
 
Bitmap TileBitmap (Result &aError, int32_t aTileSizeInPixels, const String &aQuadKey, const TileBitmapParam *aParam=nullptr)
 
Bitmap TileBitmap (Result &aError, int32_t aTileWidth, int32_t aTileHeight, const RectFP &aBounds, CoordType aCoordType, const TileBitmapParam *aParam=nullptr)
 
Result Find (MapObjectArray &aObjectArray, const FindParam &aFindParam) const
 
Result Find (MapObjectGroupArray &aObjectGroupArray, const FindParam &aFindParam) const
 
Result FindInDisplay (MapObjectArray &aObjectArray, size_t aMaxObjectCount, double aX, double aY, double aRadius) const
 
Result FindInLayer (MapObjectArray &aObjectArray, size_t aMaxObjectCount, const String &aLayer, double aMinX, double aMinY, double aMaxX, double aMaxY, CoordType aCoordType) const
 
Result FindText (MapObjectArray &aObjectArray, size_t aMaxObjectCount, const String &aText, StringMatchMethod aMatchMethod, const String &aLayers, const String &aAttribs) const
 
Result FindAddress (MapObjectArray &aObjectArray, size_t aMaxObjectCount, const Address &aAddress, bool aFuzzy=false) const
 
Result FindPolygonsContainingPath (MapObjectArray &aObjectArray, const Geometry &aPath, const FindParam *aParam=nullptr) const
 
Result FindPointsInPath (MapObjectArray &aObjectArray, const Geometry &aPath, const FindParam *aParam=nullptr) const
 
Result FindAsync (const FindAsyncCallBack &aCallBack, const FindParam &aFindParam, bool aOverride=false)
 
Result FindAsync (const FindAsyncGroupCallBack &aCallBack, const FindParam &aFindParam, bool aOverride=false)
 
Result FindAddressAsync (const FindAsyncCallBack &aCallBack, size_t aMaxObjectCount, const Address &aAddress, bool aFuzzy=false, bool aOverride=false)
 
Result GetGeoCodeSummary (String &aSummary, const MapObject &aMapObject) const
 
Result GetGeoCodeSummary (String &aSummary, double aX, double aY, CoordType aCoordType) const
 
Result GetAddress (Address &aAddress, const MapObject &aMapObject) const
 
Result GetAddressFast (Address &aAddress, const MapObject &aMapObject) const
 
Result GetAddress (Address &aAddress, double aX, double aY, CoordType aCoordType, bool aFullAddress=true) const
 
std::vector< int32_t > Heights (Result &aError, const CoordSet &aCoordSet, CoordType aCoordType) const
 
void SetStyleSheetVariable (const String &aVariableName, const String &aValue)
 
void SetStyleSheetVariable (const String &aVariableName, int32_t aValue)
 
std::unique_ptr< GraphicsContextCreateGraphicsContext (int32_t aWidth, int32_t aHeight)
 
CartoTypeCore::Font Font (const FontSpec &aFontSpec)
 
std::shared_ptr< GraphicsContextMapGraphicsContext ()
 
void SetPreferredRouterType (RouterType aRouterType)
 
RouterType PreferredRouterType () const
 
RouterType ActualRouterType () const
 
Result StartNavigation (double aStartX, double aStartY, CoordType aStartCoordType, double aEndX, double aEndY, CoordType aEndCoordType)
 
Result StartNavigation (const RouteCoordSet &aCoordSet)
 
Result StartNavigationDeferred (const RouteCoordSet &aCoordSet)
 
Result StartNavigation (const CoordSet &aCoordSet, CoordType aCoordType)
 
void EndNavigation ()
 
bool EnableNavigation (bool aEnable)
 
bool NavigationEnabled () const
 
Result LoadNavigationData ()
 
bool NavigationDataHasGradients () const
 
Result SetMainProfile (const RouteProfile &aProfile)
 
uint32_t BuiltInProfileCount ()
 
const RouteProfileBuiltInProfile (uint32_t aIndex)
 
Result SetBuiltInProfile (uint32_t aIndex)
 
Result AddProfile (const RouteProfile &aProfile)
 
Result ChooseRoute (size_t aRouteIndex)
 
const RouteProfileProfile (size_t aIndex) const
 
bool Navigating () const
 
void AddObserver (std::weak_ptr< MFrameworkObserver > aObserver)
 
void RemoveObserver (std::weak_ptr< MFrameworkObserver > aObserver)
 
Point RouteStart ()
 
Point RouteEnd ()
 
Result DisplayRoute (bool aEnable=true)
 
Result DisplayNewRoute ()
 
const CartoTypeCore::RouteRoute () const
 
const CartoTypeCore::RouteRoute (size_t aIndex) const
 
std::unique_ptr< CartoTypeCore::RouteCreateRoute (Result &aError, const RouteProfile &aProfile, const RouteCoordSet &aCoordSet)
 
std::unique_ptr< CartoTypeCore::RouteCreateRoute (Result &aError, const RouteProfile &aProfile, const CoordSet &aCoordSet, CoordType aCoordType)
 
std::unique_ptr< CartoTypeCore::RouteCreateBestRoute (Result &aError, const RouteProfile &aProfile, const RouteCoordSet &aCoordSet, bool aStartFixed, bool aEndFixed, uint32_t aIterations)
 
std::unique_ptr< CartoTypeCore::RouteCreateBestRoute (Result &aError, const RouteProfile &aProfile, const CoordSet &aCoordSet, CoordType aCoordType, bool aStartFixed, bool aEndFixed, uint32_t aIterations)
 
std::unique_ptr< CartoTypeCore::RouteCreateRouteFromXml (Result &aError, const RouteProfile &aProfile, const String &aFileNameOrData)
 
Result CreateRouteAsync (const RouterAsyncCallBack &aCallBack, const RouteProfile &aProfile, const RouteCoordSet &aCoordSet, bool aOverride)
 
Result CreateBestRouteAsync (const RouterAsyncCallBack &aCallBack, const RouteProfile &aProfile, const RouteCoordSet &aCoordSet, bool aStartFixed, bool aEndFixed, uint32_t aIterations, bool aOverride)
 
String RouteInstructions (const CartoTypeCore::Route &aRoute) const
 
Result UseRoute (const CartoTypeCore::Route &aRoute, bool aReplace)
 
Result ReadRouteFromXml (const String &aFileNameOrData, bool aReplace)
 
Result WriteRouteAsXml (const CartoTypeCore::Route &aRoute, const String &aFileName, FileType aFileType=FileType::CTROUTE) const
 
Result WriteRouteAsXmlString (const CartoTypeCore::Route &aRoute, std::string &aXmlString, FileType aFileType=FileType::CTROUTE) const
 
const RouteSegmentCurrentRouteSegment () const
 
const RouteSegmentNextRouteSegment () const
 
size_t RouteCount () const
 
Result ReverseRoutes ()
 
Result DeleteRoutes ()
 
CartoTypeCore::RouteCreationData RouteCreationData () const
 
Result Navigate (const NavigationData &aNavData)
 
const NavigatorTurnFirstTurn () const
 
const NavigatorTurnSecondTurn () const
 
const NavigatorTurnContinuationTurn () const
 
CartoTypeCore::NavigationState NavigationState () const
 
void SetNavigatorParam (const CartoTypeCore::NavigatorParam &aParam)
 
CartoTypeCore::NavigatorParam NavigatorParam () const
 
void SetLocationMatchParam (const CartoTypeCore::LocationMatchParam &aParam)
 
CartoTypeCore::LocationMatchParam LocationMatchParam () const
 
void SetNavigationMinimumFixDistance (int32_t aMeters)
 
void SetNavigationTimeOffRouteTolerance (int32_t aSeconds)
 
void SetNavigationDistanceOffRouteTolerance (int32_t aMeters)
 
uint32_t SetNearbyObjectWarning (Result &aError, uint32_t aId, const String &aLayer, const String &aCondition, double aMaxDistance, size_t aMaxObjectCount)
 
uint32_t SetVehicleTypeWarning (Result &aError, double aMaxDistance, size_t aMaxObjectCount)
 
bool DeleteNearbyObjectWarning (uint32_t aId)
 
bool ClearNearbyObjectWarnings ()
 
MapObjectArray CopyNearbyObjects ()
 
double DistanceToDestination ()
 
double EstimatedTimeToDestination ()
 
Result FindNearestRoad (NearestRoadInfo &aInfo, double aX, double aY, CoordType aCoordType, double aHeadingInDegrees, bool aDisplayPosition)
 
Result DisplayPositionOnNearestRoad (const NavigationData &aNavData, NearestRoadInfo *aInfo=nullptr)
 
void SetVehiclePosOffset (double aXOffset, double aYOffset)
 
Result SetFollowMode (CartoTypeCore::FollowMode aFollowMode)
 
CartoTypeCore::FollowMode FollowMode () const
 
Result GetNavigationPosition (PointFP &aPos, CoordType aCoordType) const
 
Result GetNavigationData (NavigationData &aData, double &aHeading) const
 
void SetLocale (const char *aLocale)
 
std::string Locale () const
 
void AppendDistance (MString &aString, double aDistanceInMeters, bool aMetricUnits, bool aAbbreviate=false) const
 
String DistanceToString (double aDistanceInMeters, bool aMetricUnits, bool aAbbreviate=false) const
 
void AppendTime (MString &aString, double aTimeInSeconds) const
 
String TimeToString (double aTimeInSeconds) const
 
void SetCase (MString &aString, LetterCase aCase)
 
void AbbreviatePlacename (MString &aString)
 
Result AddTrafficInfo (uint64_t &aId, const TrafficInfo &aTrafficInfo, LocationRef &aLocationRef)
 
double TrafficInfoSpeed (double aX, double aY, CoordType aCoordType, uint32_t aVehicleTypes)
 
Result AddPolygonSpeedLimit (uint64_t &aId, const Geometry &aPolygon, double aSpeed, uint32_t aVehicleTypes)
 
Result AddLineSpeedLimit (uint64_t &aId, const Geometry &aLine, double aSpeed, uint32_t aVehicleTypes)
 
Result AddClosedLineSpeedLimit (uint64_t &aId, const Geometry &aLine, double aSpeed, uint32_t aVehicleTypes)
 
Result AddForbiddenArea (uint64_t &aId, const Geometry &aPolygon)
 
Result DeleteTrafficInfo (uint64_t aId)
 
void ClearTrafficInfo ()
 
Result WriteTrafficMessageAsXml (OutputStream &aOutput, const TrafficInfo &aTrafficInfo, LocationRef &aLocationRef)
 
Result WriteLineTrafficMessageAsXml (OutputStream &aOutput, const TrafficInfo &aTrafficInfo, const String &aId, const CartoTypeCore::Route &aRoute)
 
Result WriteClosedLineTrafficMessageAsXml (OutputStream &aOutput, const TrafficInfo &aTrafficInfo, const String &aId, const CartoTypeCore::Route &aRoute)
 
bool EnableTrafficInfo (bool aEnable)
 
bool TrafficInfoEnabled () const
 
void StartTracking ()
 
void EndTracking ()
 
void DeleteTrack ()
 
bool Tracking () const
 
Result DisplayTrack (bool aEnable)
 
bool TrackIsDisplayed () const
 
TrackGeometry Track () const
 
double TrackLengthInMeters () const
 
Result WriteTrackAsXml (const String &aFileName) const
 
Result WriteTrackAsXmlString (std::string &aXmlString) const
 
std::string HandleQuery (const std::string &aQuery, const std::string &aData)
 
std::shared_ptr< CMapStyle > CreateStyleSheet (double aScale)
 
std::unique_ptr< CMapStore > NewMapStore (std::shared_ptr< CMapStyle > aStyleSheet, MapObjectPurpose aPurpose, const Rect &aBounds, bool aUseFastAllocator)
 
CMapDataBase & MainDb () const
 
Transform3D MapTransform () const
 
AffineTransform MapTransform2D () const
 
Transform3D PerspectiveTransform () const
 
std::shared_ptr< CEngine > Engine () const
 
CMap & Map () const
 
std::shared_ptr< CMap > MapSharedPtr () const
 
Color OutlineColor () const
 
std::unique_ptr< FrameworkCreateLegendFramework (Result &aError)
 
std::unique_ptr< BitmapCreateBitmapFromSvg (InputStream &aInputStream, FileLocation &aErrorLocation, int32_t aForcedWidth=0)
 
void SetUserData (std::shared_ptr< MUserData > aUserData)
 
double SetLabelUpAngle (double aAngle)
 
double LabelUpAngle () const
 
void SetLabelUpVector (PointFP aVector)
 
PointFP LabelUpVector () const
 
size_t RouteCalculationCost () const
 
CMapDrawParam & MapDrawParam () const
 
double PolygonArea (const CoordSet &aCoordSet, CoordType aCoordType)
 
double PolylineLength (const CoordSet &aCoordSet, CoordType aCoordType)
 
Result GetAreaAndLength (const Geometry &aGeometry, double &aArea, double &aLength)
 
Result GetContourAreaAndLength (const Geometry &aGeometry, size_t aContourIndex, double &aArea, double &aLength)
 
double Pixels (double aSize, const char *aUnit) const
 
virtual void OnRoute (const Route *)
 
virtual void OnRouteAsync ()
 
virtual void OnTurn (const NavigatorTurn &, const NavigatorTurn *, const NavigatorTurn *, double, double)
 
virtual void OnState (NavigationState)
 

Static Public Member Functions

static std::unique_ptr< FrameworkNew (Result &aError, const String &aMapFileName, const String &aStyleSheetFileName, const String &aFontFileName, int32_t aViewWidth, int32_t aViewHeight, const std::string *aEncryptionKey=nullptr)
 
static std::unique_ptr< FrameworkNew (Result &aError, std::shared_ptr< FrameworkEngine > aSharedEngine, std::shared_ptr< FrameworkMapDataSet > aSharedMapDataSet, const String &aStyleSheetFileName, int32_t aViewWidth, int32_t aViewHeight, const std::string *aEncryptionKey=nullptr)
 
static std::unique_ptr< FrameworkNew (Result &aError, const Param &aParam)
 

Static Public Attributes

static constexpr size_t KDefaultImageCacheSize = 10 * 1024 * 1024
 
static constexpr size_t KMaxRoutesDisplayed = 16
 

Detailed Description

The Framework class provides a high-level CartoType API to draw maps and perform routing, navigation and geocoding.

Member Function Documentation

◆ AbbreviatePlacename()

void CartoTypeCore::Framework::AbbreviatePlacename ( MString aString)

Abbreviates a string using standard placename abbreviations.

◆ ActualRouterType()

RouterType CartoTypeCore::Framework::ActualRouterType ( ) const

If route data has been loaded for the current map or maps, returns the actual router type in use, which may not be the same as the preferred router type, because some router types are not available for certain types of data.

If the route data has not been loaded, returns RouterType::Default. Route data is loaded either when the first route is constructed, or when LoadNavigationData is called.

◆ AddClosedLineSpeedLimit()

Result CartoTypeCore::Framework::AddClosedLineSpeedLimit ( uint64_t &  aId,
const Geometry aLine,
double  aSpeed,
uint32_t  aVehicleTypes 
)

Add a speed limit in kph, to be used when calculating routes, to a polygon which is the interior of a closed line along roads, defined by a series of points.

aId is used to return an identifier for the speed limit, which can be used when calling DeleteTrafficInfo(). If aId is non-zero when passed in, it is used, and any existing object with that ID is replaced, otherwise a new identifier is generated.

aLine is a series of points defining the polygon. The polygon is calculated as the best route through the points, using the route network, so to be certain of specifying the desired polygon you need to supply a point for every junction.

aSpeed is the speed to which travel is restricted in kph. Values of zero or less indicate that the road is closed. Values higher than 255 indicate that there is no speed limit.

aVehicleTypes is a set of flags drawn from the access constants defined in FeatureInfo. If aVehicleTypes is 0, all vehicles are affected, and also pedestrians.

A polygon map object representing the speed limit is added to the layer 'traffic'.

See also AddTrafficInfo(), AddLineSpeedLimit(), AddPolygonSpeedlimit(), AddForbiddenArea(), DeleteTrafficInfo(), and ClearTrafficInfo().

◆ AddForbiddenArea()

Result CartoTypeCore::Framework::AddForbiddenArea ( uint64_t &  aId,
const Geometry aPolygon 
)

Marks a certain polygon as forbidden for routing.

aId is used to return an identifier for the forbidden area, which can be used when calling DeleteTrafficInfo(). If aId is non-zero when passed in, it is used, and any existing object with that ID is replaced, otherwise a new identifier is generated.

See also AddTrafficInfo(), AddLineSpeedLimit(), AddPolygonSpeedLimit(), DeleteTrafficInfo() and ClearTrafficInfo().

◆ AddLineSpeedLimit()

Result CartoTypeCore::Framework::AddLineSpeedLimit ( uint64_t &  aId,
const Geometry aLine,
double  aSpeed,
uint32_t  aVehicleTypes 
)

Add a speed limit in kph, to be used when calculating routes, to a route defined by a series of points.

aId is used to return an identifier for the speed limit, which can be used when calling DeleteTrafficInfo(). If aId is non-zero when passed in, it is used, and any existing object with that ID is replaced, otherwise a new identifier is generated.

aLine is a series of points defining the road. The road is calculated as the best route through the points, using the route network, so to be certain of specifying the desired route you need to supply a point for every junction. The points are snapped to the nearest nodes in the route network. This means that at the moment you cannot set a speed limit for a range smaller than an arc between two nodes.

aSpeed is the speed to which travel is restricted in kph. Values of zero or less indicate that the road is closed. Values higher than 255 indicate that there is no speed limit.

aVehicleTypes is a set of flags drawn from the access constants defined in FeatureInfo. If aVehicleTypes is 0, all vehicles are affected, and also pedestrians.

A line map object representing the speed limit is added to the layer 'traffic', with the subtype 0x1yy if the driving side is on the right or 0x2yy if it is on the left, where yy is the speed limit.

See also AddTrafficInfo(), AddClosedLineSpeedLimit(), AddPolygonSpeedlimit(), AddForbiddenArea(), DeleteTrafficInfo(), and ClearTrafficInfo().

◆ AddObserver()

void CartoTypeCore::Framework::AddObserver ( std::weak_ptr< MFrameworkObserver >  aObserver)

Adds an observer to receive messages about navigation and changes to the style sheet, layers, view, etc. If no observer exists, navigation information can still be obtained by calling FirstTurn, SecondTurn, ContinuationTurn, NavigationState, NavigationPositionKnown and other functions after each call to Navigate.

◆ AddPolygonSpeedLimit()

Result CartoTypeCore::Framework::AddPolygonSpeedLimit ( uint64_t &  aId,
const Geometry aPolygon,
double  aSpeed,
uint32_t  aVehicleTypes 
)

Adds a speed limit in kph, to be used when calculating routes, to all roads in a certain polygon. To specify particular roads, or an area enclosed by roads, use AddTrafficInfo(). This allows the router to take account of slow-downs caused by traffic density, road works, etc.

aId is used to return an identifier for the speed limit, which can be used when calling DeleteTrafficInfo(). If aId is non-zero when passed in, it is used, and any existing object with that ID is replaced, otherwise a new identifier is generated.

aSpeed is the speed to which travel is restricted, in kph. If aSpeed is zero or less, routing is forbidden in the given polygon.

aVehicleTypes is a set of flags drawn from the access constants defined in FeatureInfo. If aVehicleTypes is 0, all vehicles are affected, and also pedestrians.

A polygon map object representing the speed limit is added to the layer 'traffic'.

See also AddTrafficInfo(), AddLineSpeedlimit(), AddForbiddenArea(), DeleteTrafficInfo(), and ClearTrafficInfo().

◆ AddProfile()

Result CartoTypeCore::Framework::AddProfile ( const RouteProfile aProfile)

Adds a new routing profile. A Framework object starts life with a single routing profile. Adding new profiles allows several different routes to be calculated for the same start and end point.

This function has no effect if routing is performed on a map with built-in routing profiles (created using makemap /route options ch, cs, ct, tech or tt) because such tables are created using fixed routing profiles which can be set in makemap.

◆ AddTrafficInfo()

Result CartoTypeCore::Framework::AddTrafficInfo ( uint64_t &  aId,
const TrafficInfo aTrafficInfo,
LocationRef aLocationRef 
)

Adds traffic information, such as a speed restriction, prohibition on the use of a route, reduction in the number of lanes, notification of road works, etc. At present only speed restrictions are supported.

This is the general function. See also the specialized functions AddPolygonSpeedLimit(), AddLineSpeedLimit(), AddClosedLineSpeedLimit() and AddForbiddenArea().

aId is used to return an identifier for the information, which can be used when calling DeleteTrafficInfo(). If aId is non-zero when passed in, it is used, and any existing object with that ID is replaced, otherwise a new identifier is generated.

aTrafficInfo gives the type of information (speed limit, etc.).

aLocationRef defines the location (area, road, point, etc.). Only the values RoadOrientation::Forwards and RoadOrientation::None (which means the same in this context) is supported for RoadOrientation in aLocationRef.

◆ AnimateTransitions()

bool CartoTypeCore::Framework::AnimateTransitions ( ) const

Returns true if transitions are smoothly animated in graphics-accelerated drawing.

◆ AppBuildDate()

std::string CartoTypeCore::Framework::AppBuildDate ( ) const

Returns the date on which the application was built in the form YYYY-MM-DD.

◆ AppendDistance()

void CartoTypeCore::Framework::AppendDistance ( MString aString,
double  aDistanceInMeters,
bool  aMetricUnits,
bool  aAbbreviate = false 
) const

Appends a distance as a string containing locale-dependent words for kilometres, metres, miles and yards.

◆ AppendStyleSheet() [1/2]

Result CartoTypeCore::Framework::AppendStyleSheet ( const char *  aData,
size_t  aLength 
)

Loads an extra style sheet from data in memory. Extra style sheets are compiled after the main style sheet.

◆ AppendStyleSheet() [2/2]

Result CartoTypeCore::Framework::AppendStyleSheet ( const String aStyleSheetFileName)

Loads an extra style sheet from a file. Extra style sheets are compiled after the main style sheet.

◆ AppendTime()

void CartoTypeCore::Framework::AppendTime ( MString aString,
double  aTimeInSeconds 
) const

Appends a time duration as a string containing locale-dependent words for hours, minutes and seconds.

◆ BlendStyleSet()

BlendStyleSet CartoTypeCore::Framework::BlendStyleSet ( ) const

Returns the current blend style set. If there is none, returns an empty blend style set.

◆ BuiltInProfile()

const RouteProfile * CartoTypeCore::Framework::BuiltInProfile ( uint32_t  aIndex)

Returns a built-in routing profile selected by its index, or null if the index is out of range. Routers allowing an arbitrary profile to be set have no built-in profiles. Contraction hierarchy routers have one or more built-in profiles.

◆ BuiltInProfileCount()

uint32_t CartoTypeCore::Framework::BuiltInProfileCount ( )

Returns the number of built-in routing profiles owned by the router. This function returns zero for routers allowing an arbitrary profile to be set, and one or greater for the contraction hierarchy router, which stores one or more fixed profiles.

◆ ChooseRoute()

Result CartoTypeCore::Framework::ChooseRoute ( size_t  aRouteIndex)

Chooses one among a set of alternative routes. The index aRouteIndex selects the route: index 0 is the route created from the standard profile set at the time of creating the CNavigator object. Indexes from 1 upwards select routes created using profiles added using AddProfile, in order of their addition.

This function is most appropriately called after calling StartNavigation to create the routes, but before calling Navigate to supply a position.

◆ ClearNearbyObjectWarnings()

bool CartoTypeCore::Framework::ClearNearbyObjectWarnings ( )

Clears all nearby object warnings, and the objects themselves, and returns true if any objects were deleted.

◆ ClearTrafficInfo()

void CartoTypeCore::Framework::ClearTrafficInfo ( )

Deletes all speed restrictions, forbidden areas and other traffic information.

◆ ClipBackgroundToMapBounds()

bool CartoTypeCore::Framework::ClipBackgroundToMapBounds ( bool  aEnable)

Enables or disables clipping the map background to the map bounds. Use this when creating map tiles to be overlaid on a larger map, so that the background (sea) color does not erase the larger map's graphics. The return value is the previous state.

◆ Configure()

Result CartoTypeCore::Framework::Configure ( const String aFilename)

Configures the CartoTypeCore engine by reading an XML configuration file.

◆ ContinuationTurn()

const NavigatorTurn & CartoTypeCore::Framework::ContinuationTurn ( ) const

When navigating, return any 'ahead' or 'continue' turn before aFirstTurn, so that the user interface can show that no turn is required at the next junction or adjoining minor road. If its type is TurnType::None there is no such turn. The iDistance member of the turn is the distance from the current position to the continuation turn.

◆ ConvertCoords() [1/3]

Result CartoTypeCore::Framework::ConvertCoords ( const WritableCoordSet aCoordSet,
CoordType  aFromCoordType,
CoordType  aToCoordType 
) const

Converts coordinates between any combination of lat/long, map coordinates and display pixels.

◆ ConvertCoords() [2/3]

Result CartoTypeCore::Framework::ConvertCoords ( double *  aCoordArray,
size_t  aCoordArraySize,
CoordType  aFromCoordType,
CoordType  aToCoordType 
) const

Converts coordinates between any combination of lat/long, map coordinates and display pixels.

◆ ConvertCoords() [3/3]

template<class T >
Result CartoTypeCore::Framework::ConvertCoords ( GeneralGeometry< T > &  aGeometry,
CoordType  aToCoordType 
)
inline

Converts the coordinates of a geometry object between any combination of lat/long, map coordinates and display pixels.

◆ ConvertPoint()

Result CartoTypeCore::Framework::ConvertPoint ( double &  aX,
double &  aY,
CoordType  aFromCoordType,
CoordType  aToCoordType 
) const

Converts a point between any combination of lat/long, map coordinates and display pixels.

◆ Copy()

std::unique_ptr< Framework > CartoTypeCore::Framework::Copy ( Result aError,
bool  aCopyTextIndex = true,
bool  aCopyFonts = true 
) const

Creates a framework that is a copy of an existing framework, accessing the same maps, fonts and style sheets in a thread-safe way. If aCopyTextIndex is false the full-text index is not loaded. If aCopyFonts is false the fonts are not loaded.

◆ CopyNearbyObjects()

MapObjectArray CartoTypeCore::Framework::CopyNearbyObjects ( )

Returns copies of all the objects for which nearby object warnings exist.

◆ Copyright()

String CartoTypeCore::Framework::Copyright ( ) const

Returns the copyright string stored in the main map database.

◆ CreateBestRoute() [1/2]

std::unique_ptr< Route > CartoTypeCore::Framework::CreateBestRoute ( Result aError,
const RouteProfile aProfile,
const CoordSet aCoordSet,
CoordType  aCoordType,
bool  aStartFixed,
bool  aEndFixed,
uint32_t  aIterations 
)

A version of CreateBestRoute that takes a CoordSet and a CoordType instead of a RouteCoordSet. The current location match parameters are used.

◆ CreateBestRoute() [2/2]

std::unique_ptr< Route > CartoTypeCore::Framework::CreateBestRoute ( Result aError,
const RouteProfile aProfile,
const RouteCoordSet aCoordSet,
bool  aStartFixed,
bool  aEndFixed,
uint32_t  aIterations 
)

Creates an optimized route to visit a series of waypoints in any order.

If aStartFixed is true, the first point in the route is always the first point supplied. If aEndFixed is true, the last point in the route is always the last point supplied. To create a circular route starting and ending at a predetermined place, but visiting the other points in any order, set aStartFixed and aEndFixed true, and make the first and last point the same. aIterations is the number of different routes to be tried.

If the heading has been supplied by means of one or more calls to Navigate(), and was not supplied in the start coordinates, and aStartFixed is true, it is used to decide the best starting direction for the route.

To use the route for navigation, call the UseRoute() function.

The profile aProfile is used if the current router allows the profile to be set. If not, the current built-in profile is used.

◆ CreateBestRouteAsync()

Result CartoTypeCore::Framework::CreateBestRouteAsync ( const RouterAsyncCallBack aCallBack,
const RouteProfile aProfile,
const RouteCoordSet aCoordSet,
bool  aStartFixed,
bool  aEndFixed,
uint32_t  aIterations,
bool  aOverride 
)

An asynchronous version of CreateBestRoute. Creates a route asynchronously and calls aCallback (from a different thread) with the created route and an error code.

If aOverride is true, any pending asynchronous routing operations that have not yet been started are deleted. Asynchronous routing operations are executed in order.

◆ CreateBitmapFromSvg()

std::unique_ptr< Bitmap > CartoTypeCore::Framework::CreateBitmapFromSvg ( InputStream aInputStream,
FileLocation aErrorLocation,
int32_t  aForcedWidth = 0 
)

Creates a bitmap from SVG code in aInputStream, starting from the current location of InputStream. Used by the Maps App.

◆ CreateGraphicsContext()

std::unique_ptr< GraphicsContext > CartoTypeCore::Framework::CreateGraphicsContext ( int32_t  aWidth,
int32_t  aHeight 
)

Creates a bitmap graphics context of the specified size in pixels.

◆ CreateLegendFramework()

std::unique_ptr< Framework > CartoTypeCore::Framework::CreateLegendFramework ( Result aError)

Using this framework as a base, create a framework for drawing map legends. It contains a writable spherical mercator map which is a 20,000km square in map coordinates. It has the same fonts as the base framework.

◆ CreateRoute() [1/2]

std::unique_ptr< Route > CartoTypeCore::Framework::CreateRoute ( Result aError,
const RouteProfile aProfile,
const CoordSet aCoordSet,
CoordType  aCoordType 
)

A version of CreateRoute that takes a CoordSet and a CoordType instead of a RouteCoordSet. The current location match parameters are used.

◆ CreateRoute() [2/2]

std::unique_ptr< Route > CartoTypeCore::Framework::CreateRoute ( Result aError,
const RouteProfile aProfile,
const RouteCoordSet aCoordSet 
)

Creates a route without starting navigation, supplying a route profile and waypoints. If the heading is known it is used to decide the best starting direction for the route.

To use the route for navigation, call the UseRoute() function.

The profile aProfile is used if the current router allows the profile to be set. If not, the current built-in profile is used.

◆ CreateRouteAsync()

Result CartoTypeCore::Framework::CreateRouteAsync ( const RouterAsyncCallBack aCallBack,
const RouteProfile aProfile,
const RouteCoordSet aCoordSet,
bool  aOverride 
)

Creates a route asynchronously and calls aCallback (from a different thread) with the created route and an error code.

If aOverride is true, any pending asynchronous routing operations that have not yet been started are deleted. Asynchronous routing operations are executed in order.

◆ CreateRouteFromXml()

std::unique_ptr< Route > CartoTypeCore::Framework::CreateRouteFromXml ( Result aError,
const RouteProfile aProfile,
const String aFileNameOrData 
)

Creates a route by reading it from XML data in GPX or CartoTypeCore route format. If the parameter aFileNameOrData starts with a less-than sign, it is treated as XML data, otherwise it is treated as a filename.

If GPX data contains route elements, the first of them is used; otherwise the first track element is used if any.

The profile is ignored if the data is in CartoTypeCore route format, which contains the profile used to create it.

◆ CreateStyleSheet()

std::shared_ptr< CMapStyle > CartoTypeCore::Framework::CreateStyleSheet ( double  aScale)

Creates a compile style sheet at the scale denominator aScale. For internal use only.

◆ CreateWritableMap()

Result CartoTypeCore::Framework::CreateWritableMap ( WritableMapType  aType,
String  aFileName = nullptr 
)

Creates a writable (editable) map of the specified type and load it. For any map type that requires a file to be created, the file name must be supplied in aFileName.

◆ CurrentRouteSegment()

const RouteSegment * CartoTypeCore::Framework::CurrentRouteSegment ( ) const

Return the current route segment, or null if not navigating.

◆ DataSetName()

String CartoTypeCore::Framework::DataSetName ( ) const

Returns the name of the data in the main map database.

◆ DeleteMapObjects()

Result CartoTypeCore::Framework::DeleteMapObjects ( uint32_t  aMapHandle,
uint64_t  aStartId,
uint64_t  aEndId,
uint64_t &  aDeletedCount,
String  aCondition = nullptr 
)

Deletes map objects with IDs in the range aStartId...aEndId inclusive.

The map from which the objects are deleted is identified by aMapHandle. If aMapHandle is zero the in-memory map used for routing is used.

If aCondition is not empty this function deletes objects satisfying aCondition only.

◆ DeleteNearbyObjectWarning()

bool CartoTypeCore::Framework::DeleteNearbyObjectWarning ( uint32_t  aId)

Deletes the nearby object warning or vehicle type warning with an ID of aId and returns true if any such object existed.

◆ DeleteRoutes()

Result CartoTypeCore::Framework::DeleteRoutes ( )

Delete all routes.

◆ DeleteStyleSheet()

Result CartoTypeCore::Framework::DeleteStyleSheet ( size_t  aIndex)

Deletes the style sheet with the specified index. The main style sheet (index 0) may not be deleted. Other style sheets have indexes from 1 up, in the order of loading.

◆ DeleteTrack()

void CartoTypeCore::Framework::DeleteTrack ( )

Deletes the current track. Does not affect whether tracking is on or off.

◆ DeleteTrafficInfo()

Result CartoTypeCore::Framework::DeleteTrafficInfo ( uint64_t  aId)

Deletes traffic information: a speed limit, forbidden area, or other information, referring to it by the ID returned when the restriction was added by AddTrafficInfo(), AddLineSpeedLimit(), AddForbiddenArea(), etc.

Use ClearTrafficInfo() to delete all restrictions and forbidden areas.

◆ DisplayNewRoute()

Result CartoTypeCore::Framework::DisplayNewRoute ( )

Draws the new route if a new route has been created asynchronously.

◆ DisplayPositionOnNearestRoad()

Result CartoTypeCore::Framework::DisplayPositionOnNearestRoad ( const NavigationData aNavData,
NearestRoadInfo aInfo = nullptr 
)

Moves the current location to the nearest road, using a navigation fix and the current location match parameters, and optionally returns information about it.

◆ DisplayRoute()

Result CartoTypeCore::Framework::DisplayRoute ( bool  aEnable = true)

If aEnable is true, display the current route and a maximum of 2 alternative routes. If not, remove the current route from the display.

◆ DisplayTrack()

Result CartoTypeCore::Framework::DisplayTrack ( bool  aEnable)

Enables or disables displaying the track.

◆ DistanceInMeters()

double CartoTypeCore::Framework::DistanceInMeters ( double  aX1,
double  aY1,
double  aX2,
double  aY2,
CoordType  aCoordType 
) const

Get the great-circle distance in meters between two points. Uses the WGS84 ellipsoid.

◆ DistanceToDestination()

double CartoTypeCore::Framework::DistanceToDestination ( )

Returns the current distance to the destination in meters, or zero if no route exists.

◆ DistanceToString()

String CartoTypeCore::Framework::DistanceToString ( double  aDistanceInMeters,
bool  aMetricUnits,
bool  aAbbreviate = false 
) const

Returns a distance as a string containing locale-dependent words for kilometres, metres, miles and yards.

◆ Draw3DBuildings()

bool CartoTypeCore::Framework::Draw3DBuildings ( ) const

Returns true if buildings are drawn in 3D where data is available.

◆ DrawBackground()

bool CartoTypeCore::Framework::DrawBackground ( bool  aEnable)

Enable or disable drawing the map background. The return value is the previous state.

◆ DrawLabelsToLabelHandler()

Result CartoTypeCore::Framework::DrawLabelsToLabelHandler ( MLabelHandler aLabelHandler,
double  aStyleSheetExclusionScale 
)

Draw the labels for the current map view to a label handler. This function is intended to be used by graphics-accelerated rendering.

◆ DrawNotices()

void CartoTypeCore::Framework::DrawNotices ( GraphicsContext aGc) const

Draws notices (legend and copyright notice) to a graphics context.

◆ DrawNoticesAutomatically()

void CartoTypeCore::Framework::DrawNoticesAutomatically ( bool  aEnable)

Controls whether notices (the scale bar, legend and copyright notice) are drawn automatically. If not, they can be drawn using DrawNotices.

◆ EditAddCurrentPoint()

Result CartoTypeCore::Framework::EditAddCurrentPoint ( )

Adds a new point to the editable object by copying the current point.

◆ EditDeleteCurrentObject()

Result CartoTypeCore::Framework::EditDeleteCurrentObject ( )

Deletes the current editable object.

◆ EditDeleteCurrentPoint()

Result CartoTypeCore::Framework::EditDeleteCurrentPoint ( )

Deletes the editable object's current point unless that would result in a line object of fewer than 2 points, or a polygon object of fewer than 3.

◆ EditGetCurrentObjectAreaAndLength()

Result CartoTypeCore::Framework::EditGetCurrentObjectAreaAndLength ( double &  aArea,
double &  aLength 
) const

Returns the area and length of the currently edited object. For line objects returns 0 and the length in meters. For polygon objects returns the area in square meters and the perimeter in meters.

◆ EditInsertCurrentObject()

Result CartoTypeCore::Framework::EditInsertCurrentObject ( const String aLayer,
uint64_t &  aId,
bool  aReplace 
)

Inserts the currently edited object into a chosen layer, converting it from an edited object into an ordinary object. If aId is non-zero and aReplace is true, replaces any existing object with that ID, otherwise creates a new object. The ID of the new object is returned in aId.

◆ EditMoveCurrentPoint()

Result CartoTypeCore::Framework::EditMoveCurrentPoint ( const PointFP aDisplayPoint)

Moves the editable object's current point if any.

◆ EditNewLineObject()

Result CartoTypeCore::Framework::EditNewLineObject ( const PointFP aDisplayPoint)

Creates a new editable line object starting at the specified point.

◆ EditNewPolygonObject()

Result CartoTypeCore::Framework::EditNewPolygonObject ( const PointFP aDisplayPoint)

Creates a new editable polygon object starting at the specified point.

◆ EditSelectNearestPoint()

Result CartoTypeCore::Framework::EditSelectNearestPoint ( const PointFP aDisplayPoint,
double  aRadiusInMillimeters 
)

Selects an editable object by selecting the nearest point of any editable object within a given radius. If the point is not within the given radius of an existing point, creates a new point.

◆ EditSetCurrentObjectFeatureInfo()

Result CartoTypeCore::Framework::EditSetCurrentObjectFeatureInfo ( FeatureInfo  aFeatureInfo)

Sets the integer attribute of the currently edited object.

◆ EditSetCurrentObjectStringAttribute()

Result CartoTypeCore::Framework::EditSetCurrentObjectStringAttribute ( const String aKey,
const String aValue 
)

Sets a string attribute in the currently edited object. If aKey is empty, sets the label. If aValue is empty, deletes the attribute.

◆ EditSetWritableMap()

Result CartoTypeCore::Framework::EditSetWritableMap ( uint32_t  aMapHandle)

Sets the map used to store editable objects. Does not affect objects already created. If this function is not called, editable objects are stored in the map used for route objects.

◆ EnableAllMaps()

Result CartoTypeCore::Framework::EnableAllMaps ( )

Enables all currently loaded maps.

◆ EnableDrawingMemoryDataBase()

Result CartoTypeCore::Framework::EnableDrawingMemoryDataBase ( bool  aEnable)

Enables or disables the drawing of the in-memory database when the rest of the map is drawn. The in-memory database is used for the route, its start and end, and the current vehicle position. If drawing the in-memory database is disabled, you can get a separate image containing the objects from the in-memory database by calling MemoryDataBaseMapBitmap.

◆ EnableLayer()

void CartoTypeCore::Framework::EnableLayer ( const String aLayerName,
bool  aEnable 
)

Enable or disable a named layer. When a layer is disabled it is not drawn but is still searchable.

◆ EnableLegend()

void CartoTypeCore::Framework::EnableLegend ( bool  aEnable)

Enables or disables the drawing of a legend that has been supplied using SetLegend.

◆ EnableMapByHandle()

Result CartoTypeCore::Framework::EnableMapByHandle ( uint32_t  aHandle,
bool  aEnable 
)

Enable or disable a map, selecting it by handle.

◆ EnableNavigation()

bool CartoTypeCore::Framework::EnableNavigation ( bool  aEnable)

Enables or disables navigation. When navigation is disabled, the follow modes work but no navigation is performed even if there is a route. The return value is the previous state.

◆ EnableScaleBar()

void CartoTypeCore::Framework::EnableScaleBar ( bool  aEnable)

Enables or disables the drawing of a scale bar that has been supplied using SetScaleBar.

◆ EnableTrafficInfo()

bool CartoTypeCore::Framework::EnableTrafficInfo ( bool  aEnable)

Enables or disables the use of traffic information when routing. Returns the previous state.

◆ EnableTurnInstructions()

void CartoTypeCore::Framework::EnableTurnInstructions ( bool  aEnable)

Enables or disables the drawing of a turn instruction notice that has been supplied using SetTurnInstructions.

◆ EndNavigation()

void CartoTypeCore::Framework::EndNavigation ( )

Stops navigating. Current routes remain in existence. Navigation can be resumed using StartNavigation or EnableNavigation.

◆ EndTracking()

void CartoTypeCore::Framework::EndTracking ( )

Stops tracking (storing and displaying track points). Does not delete the current track.

◆ Engine()

std::shared_ptr< CEngine > CartoTypeCore::Framework::Engine ( ) const
inline

Returns the CEngine object used by this framework. For internal use only.

◆ EstimatedTimeToDestination()

double CartoTypeCore::Framework::EstimatedTimeToDestination ( )

Returns the estimated time to the destination in seconds, or zero if no route exists.

◆ ExpiryDate()

std::string CartoTypeCore::Framework::ExpiryDate ( ) const

Returns the expiry date of the license in the form YYYY-MM-DD.

◆ Find() [1/2]

Result CartoTypeCore::Framework::Find ( MapObjectArray aObjectArray,
const FindParam aFindParam 
) const

A general search function, allowing any combination of clip rectangle, choice of layers, choice of attributes, text and string match method, and condition. The objects returned are in map coordinates.

◆ Find() [2/2]

Result CartoTypeCore::Framework::Find ( MapObjectGroupArray aObjectGroupArray,
const FindParam aFindParam 
) const

A search function to make interactive searching easier. It returns map objects grouped by names which can be used to identify the groups in a list box. For example, a search for pubs using the word 'Red' as the search term might return one group with the name 'Red Lion' and another group with the name 'Red Cow'.

◆ FindAddress()

Result CartoTypeCore::Framework::FindAddress ( MapObjectArray aObjectArray,
size_t  aMaxObjectCount,
const Address aAddress,
bool  aFuzzy = false 
) const

Finds an address using structured data.

The rules for address finding are:

Street addresses are found if at least one of Street, Building or Feature is supplied, and at least one of Locality, SubLocality and PostCode is supplied. If the rules for street address searching are fulfilled, all other items in aAddress are ignored.

If no street address search is possible, a search is made for the smallest item, in the order Building, Feature, Street, PostCode, SubLocality, Locality, Island, SubAdminArea, AdminArea, Country.

◆ FindAddressAsync()

Result CartoTypeCore::Framework::FindAddressAsync ( const FindAsyncCallBack aCallBack,
size_t  aMaxObjectCount,
const Address aAddress,
bool  aFuzzy = false,
bool  aOverride = false 
)

An asynchronous address finding function.

Calls the function aCallBack (from a different thread) with the map objects that have been found when the operation has been completed.

If aOverride is true, any pending asynchronous find operations that have not yet been started are deleted. Asynchronous find operations are executed in order.

◆ FindAsync() [1/2]

Result CartoTypeCore::Framework::FindAsync ( const FindAsyncCallBack aCallBack,
const FindParam aFindParam,
bool  aOverride = false 
)

Performs a general find operation asynchronously.

Calls the function aCallBack (from a different thread) with the map objects that have been found when the operation has been completed.

If aOverride is true, any pending asynchronous find operations that have not yet been started are deleted. Asynchronous find operations are executed in order.

◆ FindAsync() [2/2]

Result CartoTypeCore::Framework::FindAsync ( const FindAsyncGroupCallBack aCallBack,
const FindParam aFindParam,
bool  aOverride = false 
)

An asynchronous find function to make interactive searching easier.

It returns map objects grouped by names which can be used to identify the groups in a list box. For example, a search for pubs using the word 'Red' as the search term might return one group with the name 'Red Lion' and another group with the name 'Red Cow'.

The function aCallback is called (from a different thread) with the map object groups that have been found when the operation has been completed.

If aOverride is true, any pending asynchronous find operations that have not yet been started are deleted. Asynchronous find operations are executed in order.

◆ FindInDisplay()

Result CartoTypeCore::Framework::FindInDisplay ( MapObjectArray aObjectArray,
size_t  aMaxObjectCount,
double  aX,
double  aY,
double  aRadius 
) const

Finds all objects within aRadius of the point aX,aY on the display. The point and the radius are given in pixels. Objects are clipped to the union of the display and the bounds of the circle defined by aX, aY and aRadius.

Unlike the other find functions, this function deals with the graphic representation of objects, so it will work correctly when the user clicks on an icon, but not on the actual location of the object represented by the icon.

◆ FindInLayer()

Result CartoTypeCore::Framework::FindInLayer ( MapObjectArray aObjectArray,
size_t  aMaxObjectCount,
const String aLayer,
double  aMinX,
double  aMinY,
double  aMaxX,
double  aMaxY,
CoordType  aCoordType 
) const

Finds all objects in a named layer or list of layers (space or comma separated), within specified bounds.

◆ FindNearestRoad()

Result CartoTypeCore::Framework::FindNearestRoad ( NearestRoadInfo aInfo,
double  aX,
double  aY,
CoordType  aCoordType,
double  aHeadingInDegrees,
bool  aDisplayPosition 
)

Finds the nearest road to the point (aX,aY), returns information about it in aInfo, and optionally (if aDisplayPosition is true) sets the current location to that position. Uses the current location match parameters.

Roads are defined as routable map objects allowed by the current main route profile. If aHeadingInDegrees is valid (not negative) it is used to choose among roads going in different directions.

◆ FindPointsInPath()

Result CartoTypeCore::Framework::FindPointsInPath ( MapObjectArray aObjectArray,
const Geometry aPath,
const FindParam aParam = nullptr 
) const

Finds all point objects contained in a certain closed path. To set parameters other than the path and the condition of finding points, pass a FindParam object with your chosen parameters.

◆ FindPolygonsContainingPath()

Result CartoTypeCore::Framework::FindPolygonsContainingPath ( MapObjectArray aObjectArray,
const Geometry aPath,
const FindParam aParam = nullptr 
) const

Finds all polygon objects containing a certain path. To set parameters other than the path and the condition of finding polygons, pass a FindParam object with your chosen parameters.

◆ FindText()

Result CartoTypeCore::Framework::FindText ( MapObjectArray aObjectArray,
size_t  aMaxObjectCount,
const String aText,
StringMatchMethod  aMatchMethod,
const String aLayers,
const String aAttribs 
) const

Find objects with attributes matching aText. If aLayers is empty, search all layers, otherwise aLayers is a list of layers separated by spaces or commas. If aAttributes is empty, search all attributes, otherwise aAttributes is a list of attributes separated by spaces or commas; use "$" to indicate the label (the unnamed attribute).

◆ FirstTurn()

const NavigatorTurn & CartoTypeCore::Framework::FirstTurn ( ) const

When navigating, return the first significant turn after the current position, ignoring 'ahead' and 'continue' turns. If its type is TurnType::None there are no remaining significant turns. The iDistance member of the turn is the distance from the current position to the first turn or the arrival point.

◆ FixedLabels()

bool CartoTypeCore::Framework::FixedLabels ( )

Returns true if labels are drawn, as far as possible, in fixed positions, and not moved when the map is panned.

◆ FollowMode()

FollowMode CartoTypeCore::Framework::FollowMode ( ) const

Return the follow mode, which controls the way the map tracks the user location and heading.

◆ Font()

Font CartoTypeCore::Framework::Font ( const FontSpec aFontSpec)

Creates a font.

◆ ForceRedraw()

void CartoTypeCore::Framework::ForceRedraw ( )

Redraws the map after any change which has not been handled automatically.

For example, if hardware graphics acceleration is disabled while a large number of map objects are inserted, call this function after re-enabling hardware graphics acceleration.

If hardware graphics acceleration is not used, call this function if the bitmap has been changed directly, such as by drawing a scale on it.

◆ GetAddress() [1/2]

Result CartoTypeCore::Framework::GetAddress ( Address aAddress,
const MapObject aMapObject 
) const

Creates an address for a map object. Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoTypeCore library.

◆ GetAddress() [2/2]

Result CartoTypeCore::Framework::GetAddress ( Address aAddress,
double  aX,
double  aY,
CoordType  aCoordType,
bool  aFullAddress = true 
) const

Creates an address for a point in the map. Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoTypeCore library.

If aFullAddress is false, only the building and street are returned, and the function runs faster.

◆ GetAddressFast()

Result CartoTypeCore::Framework::GetAddressFast ( Address aAddress,
const MapObject aMapObject 
) const

Creates an address for a map object, using attributes of the object only. Returns KErrorNotFound if the relevant address parts were not found.

◆ GetAreaAndLength()

Result CartoTypeCore::Framework::GetAreaAndLength ( const Geometry aGeometry,
double &  aArea,
double &  aLength 
)

Returns the area and length of a geometry object on the surface of the earth in square meters and meters respectively, using the WGS84 ellipsoid. The area and length of a point object are both zero. The area of a line object is zero. This function ignores curves. All points are treated as on-curve.

◆ GetContourAreaAndLength()

Result CartoTypeCore::Framework::GetContourAreaAndLength ( const Geometry aGeometry,
size_t  aContourIndex,
double &  aArea,
double &  aLength 
)

Returns the area and length of a contour of a geometry object on the surface of the earth in square meters and meters respectively, using the WGS84 ellipsoid. The area and length of a point object are both zero. The area of a line object is zero. This function ignores curves. All points are treated as on-curve.

◆ GetGeoCodeSummary() [1/2]

Result CartoTypeCore::Framework::GetGeoCodeSummary ( String aSummary,
const MapObject aMapObject 
) const

Returns a string summarizing a geocode for a map object. The summary is a string version of the address returned by GetAddress.

Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoTypeCore library.

◆ GetGeoCodeSummary() [2/2]

Result CartoTypeCore::Framework::GetGeoCodeSummary ( String aSummary,
double  aX,
double  aY,
CoordType  aCoordType 
) const

Write a string summarizing a geocode for a geographical location. The summary is a string version of the address returned by GetAddress.

Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoTypeCore library.

◆ GetMapExtent() [1/2]

Result CartoTypeCore::Framework::GetMapExtent ( double &  aMinX,
double &  aMinY,
double &  aMaxX,
double &  aMaxY,
CoordType  aCoordType 
) const

Gets the combined extent of all loaded maps.

◆ GetMapExtent() [2/2]

Result CartoTypeCore::Framework::GetMapExtent ( RectFP aMapExtent,
CoordType  aCoordType 
) const

Gets the combined extent of all loaded maps.

◆ GetNavigationData()

Result CartoTypeCore::Framework::GetNavigationData ( NavigationData aData,
double &  aHeading 
) const

Gets the navigation data representing the current position. aHeading is used to return the heading in degrees relative to the local map north, taking the projection into account. It may differ from aData.iCourse.

◆ GetNavigationPosition()

Result CartoTypeCore::Framework::GetNavigationPosition ( PointFP aPos,
CoordType  aCoordType 
) const

Gets the current position used by the navigation system. This may be an extrapolated position.

◆ GetView() [1/3]

Result CartoTypeCore::Framework::GetView ( double &  aMinX,
double &  aMinY,
double &  aMaxX,
double &  aMaxY,
CoordType  aCoordType 
) const

Gets the current view coordinates as a bounding box.

◆ GetView() [2/3]

Result CartoTypeCore::Framework::GetView ( FixedSizeContourFP< 4, true > &  aView,
CoordType  aCoordType 
) const

Gets the current view coordinates as a closed path of four points, which is a rectangle unless perspective mode is turned on, in which case it is a trapezium.

◆ GetView() [3/3]

Result CartoTypeCore::Framework::GetView ( RectFP aView,
CoordType  aCoordType 
) const

Gets the current view coordinates as a bounding box.

◆ HandleQuery()

std::string CartoTypeCore::Framework::HandleQuery ( const std::string &  aQuery,
const std::string &  aData 
)

Handles a query sent over a communication system such as HTTP. The query requests data from the main map database owned by this framework, which must be a CTM1 database.

The query is a sequence of key-value pairs separated by '&' characters. The return value depends on the query, and can be interpreted by the online CTM1 accessor: see the OnlineType1MapDataAccessor class.

Return values are serialised binary data compressed using zlib, preceded by the uncompressed length, written using OutputStream::WriteUint. An uncompressed length of UINT32_MAX signals an error, in which case the error code and error message follow as an unsigned integer and a UTF-8 string.

All queries must have a 'type' value.

Legal queries are:

type=metadata – returns the metadata as a serialised MapMetaData object type=tile&x=X&y=Y&zoom=ZOOM&layer=LAYER – returns map objects from a given layer in a given tile type=objects – returns map objects specified by a serialised MultiLayerDataParam object in aData type=find – finds objects specified by a serialised FindTextParam object in aData type=streets – finds objects specified by a serialised FindStreetsParam object in aData type=roads&x=X&y=Y&w=W&h=H – finds routable objects in a rectangle given in map coordinates type=route – returns a route created using a serialised Router::RouteParam object in aData; the return value is an XML route, or an error number

◆ HasNotices()

bool CartoTypeCore::Framework::HasNotices ( ) const

Returns true if any notices such as a scale bar, legend or copyright notice exist.

◆ Heights()

std::vector< int32_t > CartoTypeCore::Framework::Heights ( Result aError,
const CoordSet aCoordSet,
CoordType  aCoordType 
) const

Returns the heights of a set of points in the specified coordinate type. Heights are returned in metres.

The layer 'terrain-height-metres' is used by preference. It contains heights to metre precision. If that layer is not available, the layer 'terrain-height-feet' is used, which contains heights to 100-foot precision.

Unknown heights are set to -32768.

◆ InsertCircleMapObject()

Result CartoTypeCore::Framework::InsertCircleMapObject ( uint32_t  aMapHandle,
const String aLayerName,
double  aCenterX,
double  aCenterY,
CoordType  aCenterCoordType,
double  aRadius,
CoordType  aRadiusCoordType,
const String aStringAttributes,
FeatureInfo  aFeatureInfo,
uint64_t &  aId,
bool  aReplace 
)

Inserts a circle map object into one of the maps, identifying the map by its handle. If aMapHandle is zero the in-memory map used for routing is used.

The circle is defined by its center and radius, which may be in different coordinate systems. It is often convenient to supply a point in degrees long/lat and its radius in map meters.

This function uses the supplied ID if aId is non-zero, otherwise generates an ID and returns it in aId. It fails if the map database is not writable.

◆ InsertCopyOfMapObject()

Result CartoTypeCore::Framework::InsertCopyOfMapObject ( uint32_t  aMapHandle,
const String aLayerName,
const MapObject aObject,
double  aEnvelopeRadius,
CoordType  aRadiusCoordType,
uint64_t &  aId,
bool  aReplace,
const String aStringAttributes = nullptr,
const FeatureInfo aFeatureInfo = nullptr 
)

Insert an object by copying an existing object. If aEnvelopeRadius is greater than zero, convert the object to an envelope using the specified radius. Use the supplied ID if aId is non-zero, otherwise generate an ID. Return the ID in aId. This function fails if the map is not writable.

If string attributes are supplied in aStringAttributes they override the original string attributes. If feature info is supplied in aFeatureInfo it overrides the original feature info.

◆ InsertEllipseMapObject()

Result CartoTypeCore::Framework::InsertEllipseMapObject ( uint32_t  aMapHandle,
const String aLayerName,
double  aCenterX,
double  aCenterY,
CoordType  aCenterCoordType,
double  aRadiusX,
double  aRadiusY,
CoordType  aRadiusCoordType,
double  aRotationDegrees,
const String aStringAttributes,
FeatureInfo  aFeatureInfo,
uint64_t &  aId,
bool  aReplace 
)

Inserts an ellipse map object into one of the maps, identifying the map by its handle. If aMapHandle is zero the in-memory map used for routing is used.

The ellipse is defined by its center and radii, which may be in different coordinate systems, and its rotation in degrees. It is often convenient to supply a point in degrees long/lat and radii in map meters.

This function uses the supplied ID if aId is non-zero, otherwise generates an ID and returns it in aId. It fails if the map database is not writable.

◆ InsertEnvelopeMapObject()

Result CartoTypeCore::Framework::InsertEnvelopeMapObject ( uint32_t  aMapHandle,
const String aLayerName,
const Geometry aGeometry,
double  aRadius,
CoordType  aRadiusCoordType,
const String aStringAttributes,
FeatureInfo  aFeatureInfo,
uint64_t &  aId,
bool  aReplace 
)

Inserts a map object that is an envelope around some geometry, at a radius of aRadius; it can also be regarded as a stroke drawn along the path with a stroke width of twice aRadius. The geometry and the radius may use different coordinate systems. It is often convenient to supply the geometry in degrees long/lat and its radius in map meters.

The map into which the object is inserted is identified by aMapHandle. If aMapHandle is zero the in-memory map used for routing is used.

This function uses the supplied ID if aId is non-zero, otherwise generates an ID and returns it in aId. It fails if the map database is not writable.

◆ InsertMapObject()

Result CartoTypeCore::Framework::InsertMapObject ( uint32_t  aMapHandle,
const String aLayerName,
const Geometry aGeometry,
const String aStringAttributes,
FeatureInfo  aFeatureInfo,
uint64_t &  aId,
bool  aReplace 
)

Inserts a map object into one of the writable maps. The type of the map object (point, line or polygon) is deduced from the geometry object. If aMapHandle is zero the in-memory map used for routing is used.

This function uses the supplied ID if aId is non-zero, otherwise generates an ID and returns it in aId. It fails if the map database is not writable.

◆ InsertPointMapObject()

Result CartoTypeCore::Framework::InsertPointMapObject ( uint32_t  aMapHandle,
const String aLayerName,
double  aX,
double  aY,
CoordType  aCoordType,
const String aStringAttributes,
FeatureInfo  aFeatureInfo,
uint64_t &  aId,
bool  aReplace 
)

Inserts a point map object into one of the maps, identifying it by its handle. If aMapHandle is zero the in-memory map used for routing is used.

This function uses the supplied ID if aId is non-zero, otherwise generates an ID and returns it in aId. It fails if the map database is not writable.

◆ InsertPushPin()

Result CartoTypeCore::Framework::InsertPushPin ( double  aX,
double  aY,
CoordType  aCoordType,
const String aStringAttrib,
const String aColor,
int32_t  aIconCharacter,
uint64_t &  aId 
)

Inserts a pushpin: a point object belonging to the 'pushpin' layer. The pushpin is inserted into the built-in modifiable map.

If aColor is not empty it is used as the _color attribute, which, in the standard style sheet, causes the pushpin icon to be drawn in that color instead of the standard color.

If aIconCharacter is not zero it is used to set the _iconText attributes, which, in the standard style sheet, causes that character to be used as an icon. The MapKeyIcons font is supplied with CartoTypeCore and contains icons in the private-character range U+E002...U+E0B1.

If aId is zero, a new pushpin is inserted and its ID is returned in aId. If aId is non-zero, an existing pushpin with the specified ID, if any exists, is replaced.

◆ LabelBitmap()

const BitmapView * CartoTypeCore::Framework::LabelBitmap ( Result aError,
bool *  aRedrawWasNeeded = nullptr 
)

Gets the bitmap containing the labels, redrawing it first if necessary. If aRedrawWasNeeded is non-null it is used to state whether a redraw was needed.

◆ LabelFPS()

double CartoTypeCore::Framework::LabelFPS ( ) const

Returns the number of frames per second used when drawing labels.

◆ LabelUpAngle()

double CartoTypeCore::Framework::LabelUpAngle ( ) const

Returns the up direction for labels as an angle in degrees measured clockwise from straight up.

◆ LabelUpVector()

PointFP CartoTypeCore::Framework::LabelUpVector ( ) const

Returns the up direction for labels as a unit vector.

◆ LastMapHandle()

uint32_t CartoTypeCore::Framework::LastMapHandle ( ) const

Gets the handle of the map most recently loaded, or created using CreateWritableMap.

◆ LayerIsEnabled()

bool CartoTypeCore::Framework::LayerIsEnabled ( const String aLayerName) const

Return the enabled status of a named layer. When a layer is disabled it is not drawn but is still searchable.

◆ LayerNames()

std::vector< String > CartoTypeCore::Framework::LayerNames ( )

Returns the names of all the layers in the map data.

◆ LegendEnabled()

bool CartoTypeCore::Framework::LegendEnabled ( ) const

Returns true if a legend exists and has been enabled.

◆ License() [1/3]

uint8_t CartoTypeCore::Framework::License ( ) const

Returns the license level, which is made from these flags: 1 = API is licensed; 2 = graphics acceleration is enabled; 4 = the license has expired.

◆ License() [2/3]

Result CartoTypeCore::Framework::License ( const String aKey)

Supplies a license key to enable the licensed version of the CartoTypeCore library.

◆ License() [3/3]

Result CartoTypeCore::Framework::License ( const uint8_t *  aKey,
size_t  aKeyLength 
)

Supplies a license key to enable the licensed version of the CartoTypeCore library.

◆ Licensee()

std::string CartoTypeCore::Framework::Licensee ( ) const

Returns the name of the licensee. Returns "no licensee: for evaluation only" if there is no licensee.

◆ LoadFont() [1/2]

Result CartoTypeCore::Framework::LoadFont ( const String aFontFileName)

Load a font in addition to any fonts already loaded.

◆ LoadFont() [2/2]

Result CartoTypeCore::Framework::LoadFont ( const uint8_t *  aData,
size_t  aLength,
bool  aCopyData 
)

Loads a font from data in memory. If aCopyData is true, makes a copy of the data and uses the copy, otherwise uses the supplied pointer aData, which must point to data that survives at least as long as the Framework object exists, or until the font is unloaded.

◆ LoadIcon()

Result CartoTypeCore::Framework::LoadIcon ( const String aFileName,
const String aId,
const Point aHotSpot,
const Point aLabelPos 
)

Loads an icon from a file. It will be used whenever the ID aId is referenced in the style sheet, overriding any icon specified in the style sheet.

The icon file may be in PNG or JPEG format.

aHotSpot is the point, relative to the top left corner of the icon, that should be made to coincide with the point of interest marked by the icon.

aLabelPos is the point, relative to the hot spot, at which the center of the baseline of any label text is placed.

◆ LoadMap()

Result CartoTypeCore::Framework::LoadMap ( const String aMapFileName,
const std::string *  aEncryptionKey = nullptr 
)

Loads a map in addition to any maps already loaded. If an encryption key is supplied the map must have been encrypted using this key.

◆ LoadMapObject()

std::unique_ptr< MapObject > CartoTypeCore::Framework::LoadMapObject ( Result aError,
uint32_t  aMapHandle,
uint64_t  aId 
)

Load a map object, identifying it by its map handle and ID.

◆ LoadNavigationData()

Result CartoTypeCore::Framework::LoadNavigationData ( )

Loads navigation data for the current map. This function need not be called; if it is not called, navigation data will be loaded automatically when it is first needed. It is provided so that the time overhead of loading navigation data can be incurred at a predictable stage, for example at application startup. Navigation data is loaded in a background thread. The main thread is blocked only if routing is needed before loading has finished.

Navigation data is unloaded when the map data set is changed: that is, when a map is loaded or unloaded.

No error is returned if navigation data has already been loaded.

◆ Locale()

std::string CartoTypeCore::Framework::Locale ( ) const

Return the locale used when getting the names of map objects when routing, geocoding, etc. The returned value is either a null-terminated string, usually a two-letter language identifier like 'en' for English or 'fr' for French, or an empty string meaning 'no locale'.

◆ LocationMatchParam()

LocationMatchParam CartoTypeCore::Framework::LocationMatchParam ( ) const

Gets the current location match parameters.

◆ MainDb()

CMapDataBase & CartoTypeCore::Framework::MainDb ( ) const
inline

Returns the main map database. For internal use only.

◆ MainMapHandle()

uint32_t CartoTypeCore::Framework::MainMapHandle ( ) const

Get the handle of the main map.

◆ Map()

CMap & CartoTypeCore::Framework::Map ( ) const
inline

Returns the CMap object owned by this framework. For internal use only.

◆ MapBitmap()

const BitmapView * CartoTypeCore::Framework::MapBitmap ( Result aError,
bool *  aRedrawWasNeeded = nullptr 
)

Gets the bitmap containing the map, redrawing it first if necessary. If aRedrawWasNeeded is non-null, it is used to state whether a redraw was needed.

◆ MapCount()

size_t CartoTypeCore::Framework::MapCount ( ) const

Returns the number of maps currently loaded, including the main map and the in-memory map.

◆ MapDrawParam()

CMapDrawParam & CartoTypeCore::Framework::MapDrawParam ( ) const
inline

Returns the current map drawing parameters. For internal use only.

◆ MapGraphicsContext()

std::shared_ptr< GraphicsContext > CartoTypeCore::Framework::MapGraphicsContext ( )

Gets the graphics context used to draw the map so that extra graphics can be drawn.

◆ MapHandle()

uint32_t CartoTypeCore::Framework::MapHandle ( size_t  aIndex) const

Returns the handle of one of the currently loaded maps. Returns 0 if aIndex is out of range.

◆ MapIsEmpty()

bool CartoTypeCore::Framework::MapIsEmpty ( uint32_t  aHandle)

Return true if a map, identified by its handle, is known to be empty or does not exist.

◆ MapIsEnabled()

bool CartoTypeCore::Framework::MapIsEnabled ( uint32_t  aHandle) const

Returns true if a map, identified by its handle, is enabled.

◆ MapIsWritable()

bool CartoTypeCore::Framework::MapIsWritable ( size_t  aIndex) const

Returns true if a map, identified by its index, is writable.

◆ MapMetaData()

std::unique_ptr< MapMetaData > CartoTypeCore::Framework::MapMetaData ( size_t  aIndex) const

Returns the metadata for a map, identified by its index, if available. Returns null if no metadata is available. Metadata is currently available only for CTM1 maps.

◆ MapSharedPtr()

std::shared_ptr< CMap > CartoTypeCore::Framework::MapSharedPtr ( ) const
inline

Returns the CMap object owned by this framework. For internal use only.

◆ MapTransform()

Transform3D CartoTypeCore::Framework::MapTransform ( ) const

Returns the transform from map coordinates to pixels, including any perspective transform.

◆ MapTransform2D()

AffineTransform CartoTypeCore::Framework::MapTransform2D ( ) const

Returns the transform from map coordinates to 64ths of pixels, not including any perspective transform.

◆ MemoryDataBaseMapBitmap()

const BitmapView * CartoTypeCore::Framework::MemoryDataBaseMapBitmap ( Result aError,
bool *  aRedrawWasNeeded = nullptr 
)

Get a bitmap containing a map drawn using objects from the in-memory database only, redrawing it first if necessary. If aRedrawWasNeeded is non-null use it to state whether a redraw was needed.

◆ MemoryMapHandle()

uint32_t CartoTypeCore::Framework::MemoryMapHandle ( ) const

Get the handle of the in-memory map.

◆ MetersToPixels()

double CartoTypeCore::Framework::MetersToPixels ( double  aMeters) const

Converts a distance in map meters (projected meters) to pixels.

◆ MutuallyAccessible()

bool CartoTypeCore::Framework::MutuallyAccessible ( Result aError,
const std::vector< PointFP > &  aPointArray,
CoordType  aCoordType,
std::vector< uint32_t > *  aGroupArray = nullptr 
)

Determines the mutual accessibility of a set of points for routing purposes. This function is implemented only for the turn-expanded router. If aGroupArray is non-null it is filled with the connectivity group IDs of the points. A set of points that is mutually accessible will have identical non-zero group IDs. A group ID of zero indicates that a point is not near enough to a road or other routable segment. Group IDs are ordered by group sizes. Group 1 is the group with the largest number of connected route nodes, therefore in general a point needs to be in group 1 to take part in routing.

◆ Navigate()

Result CartoTypeCore::Framework::Navigate ( const NavigationData aNavData)

Updates the vehicle position and, if navigating, updates the navigation state.

In order to implement turn-by-turn navigation, you should call Navigate() at frequent intervals (once per second is good enough) after creating a route using StartNavigation(), ReadRouteFromXml(), etc.

When not navigating, you may call this function to update the vehicle position if necessary (i.e., if the current follow mode displays the vehicle position: see SetFollowMode()).

aNavData.iValidity is a set of bit flags, ORed together, which determines which of the other parameters are valid. The bit flags are the constants NavigationData::ETimeValid, NavigationData::EPositionValid, etc. For normal navigation not all the data is necessary: you need supply the time and position only. Other data, if available, helps the navigation system decide which road the vehicle is on, and extrapolate positions. The height (elevation above sea level) is not currently used.

aNavData.iTime is the time in seconds. Any consistent time representation may be used (e.g., the unix timestamp format of the time in seconds since midnight, 1st Jan 1970); the absolute time does not matter as long as times can be subtracted to give a difference in seconds.

aNavData.iPosition is the location in degrees latitude and longitude, using the WGS84 datum.

aNavData.iSpeed is the speed in kilometres per hour.

aNavData.iCourse is the true course in degrees, where 0 is north, and degrees increase clockwise; 90 is east, 180 is south, and 270 is west.

aNavData.iHeight is the height above sea level in metres.

If the position is invalid, Navigate() guesses the position by extrapolating from the current speed, if known, and the previous position.

After Navigate() has been called, the map position, rotation or zoom will change according to the current follow mode (see SetFollowMode()).

If you are not using graphics acceleration you should redraw the map after calling this function.

◆ Navigating()

bool CartoTypeCore::Framework::Navigating ( ) const

Returns true if navigation is happening, which is true if there is a known route and navigation is enabled.

◆ NavigationDataHasGradients()

bool CartoTypeCore::Framework::NavigationDataHasGradients ( ) const

Returns true if the navigation data for the main map contains gradients.

◆ NavigationEnabled()

bool CartoTypeCore::Framework::NavigationEnabled ( ) const

Returns true if navigation is enabled, false otherwise.

◆ NavigationState()

NavigationState CartoTypeCore::Framework::NavigationState ( ) const

Return the current navigation state.

◆ NavigatorParam()

NavigatorParam CartoTypeCore::Framework::NavigatorParam ( ) const

Gets the current parameters affecting the working of the navigation system.

◆ New() [1/3]

std::unique_ptr< Framework > CartoTypeCore::Framework::New ( Result aError,
const Param aParam 
)
static

Create a new framework object using a parameter object.

◆ New() [2/3]

std::unique_ptr< Framework > CartoTypeCore::Framework::New ( Result aError,
const String aMapFileName,
const String aStyleSheetFileName,
const String aFontFileName,
int32_t  aViewWidth,
int32_t  aViewHeight,
const std::string *  aEncryptionKey = nullptr 
)
static

Creates a new framework object.

aMapFileName is the file name of the main map. aStyleSheetFileName is the name of the style sheet file. aFontFileName is the name of the first font to be loaded. Other fonts may be loaded at any time. aViewWidth and aViewHeight are the width and height of the map view in pixels.

If an encryption key is supplied the map must have been encrypted using this key.

◆ New() [3/3]

std::unique_ptr< Framework > CartoTypeCore::Framework::New ( Result aError,
std::shared_ptr< FrameworkEngine aSharedEngine,
std::shared_ptr< FrameworkMapDataSet aSharedMapDataSet,
const String aStyleSheetFileName,
int32_t  aViewWidth,
int32_t  aViewHeight,
const std::string *  aEncryptionKey = nullptr 
)
static

Creates a new framework object using a shared engine and shared map data.

aSharedEngine is the shared engine. It may be used with multiple Framework objects. aSharedMapDataSet is the shared map data set. It may be used with multiple Framework objects. aMapFileName is the file name of the main map. aStyleSheetFileName is the name of the style sheet file. aViewWidth and aViewHeight are the width and height of the map view in pixels.

If an encryption key is supplied the map must have been encrypted using this key.

◆ NewMapStore()

std::unique_ptr< CMapStore > CartoTypeCore::Framework::NewMapStore ( std::shared_ptr< CMapStyle >  aStyleSheet,
MapObjectPurpose  aPurpose,
const Rect aBounds,
bool  aUseFastAllocator 
)

Creates a map store using a given style sheet and bounding rectangle. For internal use only.

◆ NextRouteSegment()

const RouteSegment * CartoTypeCore::Framework::NextRouteSegment ( ) const

Return the next route segment if any, or null if not navigating or the current segment is the last.

◆ NightMode()

bool CartoTypeCore::Framework::NightMode ( ) const

Returns true if night mode is on.

◆ NightModeColor()

Color CartoTypeCore::Framework::NightModeColor ( ) const

Returns the current night mode color.

◆ NoticeBitmap()

PositionedBitmap CartoTypeCore::Framework::NoticeBitmap ( ) const

Gets a bitmap containing notices (legend, scale bar and copyright notice).

◆ ObjectWouldBeDrawn()

bool CartoTypeCore::Framework::ObjectWouldBeDrawn ( Result aError,
uint64_t  aId,
MapObjectType  aType,
const String aLayer,
FeatureInfo  aFeatureInfo,
const String aStringAttrib 
)

Return true if an object with the given attributes would be drawn. The disabled layers are taken into account, but whether a map is disabled is ignored.

◆ OutlineColor()

Color CartoTypeCore::Framework::OutlineColor ( ) const

Returns the color used for drawing the outline layer (land as opposed to sea), or white if it is not known or null.

◆ Pan() [1/3]

Result CartoTypeCore::Framework::Pan ( const Point aFrom,
const Point aTo 
)

Pan (slide) the map so that the former display position aFrom moves to aTo.

◆ Pan() [2/3]

Result CartoTypeCore::Framework::Pan ( double  aFromX,
double  aFromY,
CoordType  aFromCoordType,
double  aToX,
double  aToY,
CoordType  aToCoordType 
)

Pan (slide) the map so that the position aFrom moves to aTo, giving the coordinate system of both positions.

◆ Pan() [3/3]

Result CartoTypeCore::Framework::Pan ( int32_t  aDx,
int32_t  aDy 
)

Pans (slides the map) by a certain distance in pixels, horizontally or vertically or both.

◆ Perspective()

bool CartoTypeCore::Framework::Perspective ( ) const

Returns true if perspective mode is currently selected, false otherwise.

◆ PerspectiveParam()

PerspectiveParam CartoTypeCore::Framework::PerspectiveParam ( ) const

Returns the current perspective parameters.

◆ PerspectiveTransform()

Transform3D CartoTypeCore::Framework::PerspectiveTransform ( ) const

Returns the perspective transform.

◆ Pixels()

double CartoTypeCore::Framework::Pixels ( double  aDimension,
const char *  aUnit 
) const

Returns the number of pixels corresponding to a dimension in specified units: pt, pc, cm, mm, or in; null or any other unit means pixels.

◆ PixelsToMeters()

double CartoTypeCore::Framework::PixelsToMeters ( double  aPixels) const

Converts a distance in pixels to map meters (projected meters).

◆ PolygonArea()

double CartoTypeCore::Framework::PolygonArea ( const CoordSet aCoordSet,
CoordType  aCoordType 
)

Returns the area of a polygon on the surface of the earth in square meters, using the WGS84 ellipsoid.

◆ PolylineLength()

double CartoTypeCore::Framework::PolylineLength ( const CoordSet aCoordSet,
CoordType  aCoordType 
)

Returns the length of a polyline on the surface of the earth in meters, using the WGS84 ellipsoid.

◆ PreferredRouterType()

RouterType CartoTypeCore::Framework::PreferredRouterType ( ) const

Returns the preferred type of router to be used for calculating routes.

◆ Profile()

const RouteProfile * CartoTypeCore::Framework::Profile ( size_t  aIndex) const

Returns one of the active route profiles, or null if the index is out of range. The index 0 always works, and returns the main profile.

◆ ProjectionAsProj4Param()

String CartoTypeCore::Framework::ProjectionAsProj4Param ( ) const

Returns the current map projection as a proj.4 parameter string if possible. If not returns the empty string.

◆ Range()

Geometry CartoTypeCore::Framework::Range ( Result aError,
const RouteProfile aProfile,
double  aX,
double  aY,
CoordType  aCoordType,
double  aTimeOrDistance,
bool  aIsTime 
)

Returns the range: a polygon containing the area reachable within a certain time in seconds or distance in meters.

Uses the supplied route profile if it is non-null, otherwise the current profile. If a time is supplied, the profile's bonuses and penalties are suppressed. If a distance is supplied, shortest routes are used. You can optionally insert the returned Geometry object into the map using InsertMapObject.

◆ ReadGpx()

Result CartoTypeCore::Framework::ReadGpx ( uint32_t  aMapHandle,
const String aFileName 
)

Reads route and track objects from a GPX file and inserts them into the map identified by aMapHandle. This function fails if the map is not writable.

Waypoint objects (wpt) are made into points in the gpx/wpt layer. Route objects (rte) are made into lines in the gpx/rte layer. Track objects (trk) are made into lines in the gpx/trk layer.

◆ ReadMap() [1/2]

Result CartoTypeCore::Framework::ReadMap ( uint32_t  aHandle,
const std::vector< uint8_t > &  aData 
)

Reads map data from aData in CTMS format and merges it into the map identified by aHandle, which must refer to a writable map database. If aMapHandle is zero it means the in-memory map used for routing.

◆ ReadMap() [2/2]

Result CartoTypeCore::Framework::ReadMap ( uint32_t  aHandle,
const String aFileName,
FileType  aFileType 
)

Reads map data from aFileName in the format given by aFileType and merges it into the map identified by aHandle, which must refer to a writable map database. Only the CTMS (CartoTypeCore Map Serialized) and Keyhole Markup Language (KML) formats are supported.

◆ ReadRouteFromXml()

Result CartoTypeCore::Framework::ReadRouteFromXml ( const String aFileNameOrData,
bool  aReplace 
)

Read a route from XML (a GPX file or a CartoTypeCore route file) and display it. aFileNameOrData is treated as XML data if it starts with a less-than sign.

If aReplace is true, delete all current routes, add the new route and make its profile the current profile. If aReplace is false, append the new route to the list of current routes.

Appending a route fails if the new route has a different start and end point, or intermediate waypoints, from the current routes.

This function resets the navigation state and enables navigation.

◆ ReloadStyleSheet()

Result CartoTypeCore::Framework::ReloadStyleSheet ( size_t  aIndex = 0)

Reloads a sheet from the file it was originally loaded from. This function can be used to apply changes after a style sheet is modified. The index aIndex determines which style sheet is reloaded: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets. Only style sheets loaded from files can be reloaded.

◆ RemoveObserver()

void CartoTypeCore::Framework::RemoveObserver ( std::weak_ptr< MFrameworkObserver >  aObserver)

Removes an observer.

◆ Resize()

Result CartoTypeCore::Framework::Resize ( int32_t  aViewWidth,
int32_t  aViewHeight 
)

Resizes the map, preserving the scale and view center. The height and width are in pixels.

◆ ResolutionDpi()

double CartoTypeCore::Framework::ResolutionDpi ( ) const

Returns the display resolution used by CartoTypeCore in dots per inch.

◆ ReverseRoutes()

Result CartoTypeCore::Framework::ReverseRoutes ( )

Reverses the order of the current route points, recreates the route or routes, and displays them on the map. The two directions of the same route may not follow the same path because of one-way streets and turn restrictions.

◆ Rotate()

Result CartoTypeCore::Framework::Rotate ( double  aAngle)

Rotates the map about the center of the display by an angle given in degrees.

◆ RotateAndZoom()

Result CartoTypeCore::Framework::RotateAndZoom ( double  aAngle,
double  aZoomFactor,
double  aX,
double  aY,
CoordType  aCoordType 
)

Simultaneously rotates and zooms at a certain point given in aCoordType. The rotation is in degrees.

◆ RotateAt()

Result CartoTypeCore::Framework::RotateAt ( double  aAngle,
double  aX,
double  aY,
CoordType  aCoordType 
)

Rotates the map about a specified point by an angle given in degrees.

◆ Rotation()

double CartoTypeCore::Framework::Rotation ( ) const

Returns the current rotation angle of the map in degrees.

◆ Route() [1/2]

const Route * CartoTypeCore::Framework::Route ( ) const

Return the current main route, or null if there is none.

◆ Route() [2/2]

const Route * CartoTypeCore::Framework::Route ( size_t  aIndex) const

Return any of the current routes, or null if there are none.

◆ RouteCalculationCost()

size_t CartoTypeCore::Framework::RouteCalculationCost ( ) const

Returns an arbitrary number representing the cost of calculating a route. For internal use only.

◆ RouteCount()

size_t CartoTypeCore::Framework::RouteCount ( ) const

Return the number of alternative routes. The return value is zero if no routes have been calculated, or the routes have been deleted.

◆ RouteCreationData()

RouteCreationData CartoTypeCore::Framework::RouteCreationData ( ) const

Returns the time it took to create the last route, and other data. Applies only to routes created synchronously.

◆ RouteEnd()

Point CartoTypeCore::Framework::RouteEnd ( )

If a route exists, return the end of the route in map coordinates, otherwise return (0,0).

◆ RouteInstructions()

String CartoTypeCore::Framework::RouteInstructions ( const CartoTypeCore::Route aRoute) const

Creates route instructions for the current route as a string.

◆ RouteStart()

Point CartoTypeCore::Framework::RouteStart ( )

If a route exists, return the start of the route in map coordinates, otherwise return (0,0).

◆ SaveMap() [1/2]

Result CartoTypeCore::Framework::SaveMap ( uint32_t  aHandle,
const String aFileName,
FileType  aFileType 
)

Saves a map identified by its handle by writing it in the specified format. If aMapHandle is zero it means the in-memory map used for routing.

The CTMS (CartoTypeCore Map Serialized), CTSQL (CartoTypeCore SQL format), and Keyhole Markup Language (KML) file types are supported.

◆ SaveMap() [2/2]

Result CartoTypeCore::Framework::SaveMap ( uint32_t  aHandle,
std::vector< uint8_t > &  aData,
const FindParam aFindParam 
)

Saves selected objects to a map identified by its handle by writing them as an array of bytes in CTMS format. aFindParam can be used to select the objects to be saved. If aMapHandle is zero it means the in-memory map used for routing.

◆ ScaleBarEnabled()

bool CartoTypeCore::Framework::ScaleBarEnabled ( ) const

Returns true if a scale bar exists and has been enabled.

◆ ScaleDenominator()

double CartoTypeCore::Framework::ScaleDenominator ( ) const

Return the denominator of the scale fraction. For example, if the scale is 1:50,000 the value 50000 is returned. This is the overall scale of the projection and may be affected by distortion for some projections, particularly Mercator.

To get the true scale in the center of the map view, use GetScaleDenominatorInView.

◆ ScaleDenominatorFromZoomLevel()

double CartoTypeCore::Framework::ScaleDenominatorFromZoomLevel ( double  aZoomLevel,
int32_t  aImageSizeInPixels = 256 
) const

Calculate the scale denominator at the equator for a certain Open Street Map zoom level (0 maps the length of the equator to aImageSizeInPixels pixels, 1 = half the length of the equator, etc.).

◆ ScaleDenominatorInView()

double CartoTypeCore::Framework::ScaleDenominatorInView ( ) const

Get the denominator of the scale fraction at the center of the view, taking any scale distortion into account.

◆ SecondTurn()

const NavigatorTurn & CartoTypeCore::Framework::SecondTurn ( ) const

When navigating, return any significant turn 100 metres or less after aFirstTurn. If its type is TurnType::None there is no such turn. The iDistance member of the turn is the distance from the first turn to the second turn.

◆ SetAnimateTransitions()

bool CartoTypeCore::Framework::SetAnimateTransitions ( bool  aEnable)

Enables or disables smoothly animated transitions in graphics-accelerated drawing. Returns the previous enabled state.

◆ SetBlendStyle()

BlendStyleSet CartoTypeCore::Framework::SetBlendStyle ( const BlendStyleSet aBlendStyleSet)

Sets a blend style, or, if aBlendStyleSet is null or empty, removes the current blend style. If night mode is on, night mode is turned off and replaced by the specified blend style or by no blend style. Returns the previous blend style, which is empty if none is in force.

◆ SetBuiltInProfile()

Result CartoTypeCore::Framework::SetBuiltInProfile ( uint32_t  aIndex)

Selects a built-in routing profile by its index. Routers allowing an arbitrary profile to be set have no built-in profiles. Contraction hierarchy routers have one or more built-in profiles.

◆ SetCase()

void CartoTypeCore::Framework::SetCase ( MString aString,
LetterCase  aCase 
)

Sets the letter case of a string, using the current title-case exception dictionary to prevent words like 'of' being capitalised.

◆ SetCopyrightNotice() [1/2]

void CartoTypeCore::Framework::SetCopyrightNotice ( )

Sets the copyright notice displayed at the bottom-right corner of the map to that of the main map database.

◆ SetCopyrightNotice() [2/2]

void CartoTypeCore::Framework::SetCopyrightNotice ( const String aCopyright)

Sets the copyright notice displayed in the bottom-right corner of the map.

◆ SetDisabledLayersInternal()

void CartoTypeCore::Framework::SetDisabledLayersInternal ( const std::set< String > &  aLayerNames)

Sets the currently disabled layers. For internal use only.

◆ SetDisabledMapsInternal()

void CartoTypeCore::Framework::SetDisabledMapsInternal ( const std::set< uint32_t > &  aMaps)

Sets the currently disabled maps. For internal use only.

◆ SetDraw3DBuildings()

bool CartoTypeCore::Framework::SetDraw3DBuildings ( bool  aEnable)

Enables or disables the drawing of 3D buildings where data is available. Returns the previous enabled state.

◆ SetFixedLabels()

bool CartoTypeCore::Framework::SetFixedLabels ( bool  aSet)

Turns fixed-position labels on or off. Returns the previous setting.

◆ SetFollowMode()

Result CartoTypeCore::Framework::SetFollowMode ( CartoTypeCore::FollowMode  aFollowMode)

Set the follow mode, which controls the way the map tracks the user location and heading.

◆ SetLabelFPS()

double CartoTypeCore::Framework::SetLabelFPS ( double  aFPS)

Sets the number of frames per second used when drawing labels. Clamped to the range 1...30. Returns the previous value.

◆ SetLabelUpAngle()

double CartoTypeCore::Framework::SetLabelUpAngle ( double  aAngle)

Sets the up direction for labels using an angle in degrees measured clockwise from straight up. If the angle is 0, labels are drawn normally. Returns the previous angle.

◆ SetLabelUpVector()

void CartoTypeCore::Framework::SetLabelUpVector ( PointFP  aVector)

Sets the up direction for labels using a vector. For example, if the up direction is (0,1) labels are drawn normally. The null vector is converted to (0,1); other values are converted to unit vectors.

◆ SetLegend() [1/2]

void CartoTypeCore::Framework::SetLegend ( const Legend aLegend,
double  aWidth,
const char *  aUnit,
const ExtendedNoticePosition aPosition 
)

Sets the legend: any combination of map key, scale and turn instructions. The legend is copied.

◆ SetLegend() [2/2]

void CartoTypeCore::Framework::SetLegend ( std::unique_ptr< Legend aLegend,
double  aWidth,
const char *  aUnit,
const ExtendedNoticePosition aPosition 
)

Sets the legend: any combination of map key, scale and turn instructions.

◆ SetLocale()

void CartoTypeCore::Framework::SetLocale ( const char *  aLocale)

Set the locale used when getting the names of map objects when routing, geocoding, etc. The value of aLocale is usually a two-letter language identifier like 'en' for English or 'fr' for French. Passing an empty or null string sets the locale to 'no locale'.

◆ SetLocationMatchParam()

void CartoTypeCore::Framework::SetLocationMatchParam ( const CartoTypeCore::LocationMatchParam aParam)

Sets the current location match parameters. These parameters are used when creating routes in functions which do not receive explicit location match parameters. In functions which do receive location match parameters, any parameters with the value 0 are replaced by the current location match parameters set by this function.

◆ SetMainProfile()

Result CartoTypeCore::Framework::SetMainProfile ( const RouteProfile aProfile)

Sets the main routing profile. If you do not call this function, the standard profile for private car routing is used.

This function has no effect if routing is performed on a map with a built-in contraction-hierarchy routing table (created using makemap /route options ch, cs, ct, tech or tt), because such a table is created using one or more fixed routing profiles which can be set in makemap. Use SetBuiltInProfile for contraction hierarchy routing.

◆ SetNavigationDistanceOffRouteTolerance()

void CartoTypeCore::Framework::SetNavigationDistanceOffRouteTolerance ( int32_t  aMeters)

Set the maximum distance from the route in meters before the vehicle is deemed off-route when navigating.

◆ SetNavigationMinimumFixDistance()

void CartoTypeCore::Framework::SetNavigationMinimumFixDistance ( int32_t  aMeters)

Set the minimum distance between location fixes in meters that is taken as an actual move when navigating.

◆ SetNavigationTimeOffRouteTolerance()

void CartoTypeCore::Framework::SetNavigationTimeOffRouteTolerance ( int32_t  aSeconds)

Set the maximum time off route in seconds before a new route is calculated when navigating.

◆ SetNavigatorParam()

void CartoTypeCore::Framework::SetNavigatorParam ( const CartoTypeCore::NavigatorParam aParam)

Sets parameters affecting the working of the navigation system.

◆ SetNearbyObjectWarning()

uint32_t CartoTypeCore::Framework::SetNearbyObjectWarning ( Result aError,
uint32_t  aId,
const String aLayer,
const String aCondition,
double  aMaxDistance,
size_t  aMaxObjectCount 
)

Adds or replaces a nearby object warning. Objects found are added to the 'nearby' layer while the warning is in force. The attribute '_warning=0' is set.

Objects in aLayer, satisfying aCondition if it is not empty, and within aMaxDistance of the current point, are highlighted. The parameter aLayer may contain wild cards or end in a '/' sign.

The parameter aMaxObjectCount is the maximum number of objects to be found, which is clamped to the range 0...1024. If it is zero, the default of 32 is used. If more objects are actually found, the closest ones are used.

If aId is zero, a new warning is created. If aId is non-zero, the existing warning if any with an ID of aId is replaced. The ID of the new or replaced warning is returned. If aMaxDistance, which is in meters, is less than or equal to zero, it is set to the default distance of 1000, or 1km.

Returns 0 if no warning was created, which occurs if aLayer was empty, or the navigation system could not be created.

◆ SetNightMode()

bool CartoTypeCore::Framework::SetNightMode ( bool  aSet)

Sets night mode and returns the previous setting. In night mode the map is shaded dark blue and roads are made brighter than other features.

◆ SetNightModeColor()

Color CartoTypeCore::Framework::SetNightModeColor ( Color  aColor)

Sets the night mode color, which should be a dark color (although this is not enforced), and returns the previous night mode color.

To set a custom blend fraction, use the alpha value. For example, set the color's alpha value to 153 to blend the night mode color with a style color in the ratio 0.6 : 0.4 (153/255 = 0.6). Use an alpha value of 255 to get the default blend fraction (alpha = 191).

Roads use the night mode color blended with 50% white, and half the specified blend fraction. This increases contrast between roads and other features.

◆ SetPerspective()

void CartoTypeCore::Framework::SetPerspective ( bool  aSet)

Turns perspective mode on or off.

◆ SetPerspectiveParam()

void CartoTypeCore::Framework::SetPerspectiveParam ( const PerspectiveParam aParam)

Sets the perspective parameters.

◆ SetPreferredRouterType()

void CartoTypeCore::Framework::SetPreferredRouterType ( RouterType  aRouterType)

Sets the preferred type of router to be used for calculating routes. Different routers have various advantages and disadvantages, such as using more or less memory, being faster or slower, or producing more useful routes.

Calling this function causes navigation data to be unloaded if the current navigation data uses a different type of router.

◆ SetResolutionDpi()

void CartoTypeCore::Framework::SetResolutionDpi ( double  aDpi)

Sets the display resolution in dots per inch. Call this function to ensure that style sheet dimensions and font sizes given in inches, cm, pt, etc., are correct on the screen.

◆ SetRotation()

Result CartoTypeCore::Framework::SetRotation ( double  aAngle)

Sets the map's orientation to an absolute angle given in degrees.

◆ SetRotationAt()

Result CartoTypeCore::Framework::SetRotationAt ( double  aAngle,
double  aX,
double  aY,
CoordType  aCoordType 
)

Sets the map's orientation to a rotation about a specified point by an absolute angle given in degrees.

◆ SetScaleBar()

void CartoTypeCore::Framework::SetScaleBar ( bool  aMetricUnits,
double  aWidth,
const char *  aUnit,
const ExtendedNoticePosition aPosition 
)

Creates a scale bar in either metric or imperial units, with a specified width and position in the display.

◆ SetScaleDenominator()

Result CartoTypeCore::Framework::SetScaleDenominator ( double  aScale)

Set the scale, supplying the denominator of the scale fraction. For example, to set the scale to 1:50,000 use the statement SetScaleDenominator(50000).

This function sets the overall scale of the projection and may be affected by distortion for some projections, particularly Mercator.

To set the true scale in the center of the map view, use SetScaleDenominatorInView.

◆ SetScaleDenominatorInView()

Result CartoTypeCore::Framework::SetScaleDenominatorInView ( double  aScale)

Set the denominator of the scale fraction so that the desired scale applies to the center of the view, taking any scale distortion into account.

◆ SetStyleSheet() [1/4]

Result CartoTypeCore::Framework::SetStyleSheet ( const char *  aData,
size_t  aLength,
size_t  aIndex = 0 
)

Set a style sheet by loading it from data in memory. The index aIndex determines which style sheet to replace: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets.

◆ SetStyleSheet() [2/4]

Result CartoTypeCore::Framework::SetStyleSheet ( const String aStyleSheetFileName,
size_t  aIndex = 0 
)

Set a style sheet by loading it from a file. The index aIndex determines which style sheet to replace: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets.

◆ SetStyleSheet() [3/4]

Result CartoTypeCore::Framework::SetStyleSheet ( const StyleSheetData aStyleSheetData,
size_t  aIndex = 0 
)

Sets a style sheet from a StyleSheetData object. The index aIndex determines which style sheet to replace: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets.

◆ SetStyleSheet() [4/4]

Result CartoTypeCore::Framework::SetStyleSheet ( const StyleSheetDataArray aStyleSheetDataArray,
const StringDictionary aStyleSheetVariables = nullptr,
const BlendStyleSet aBlendStyleSet = nullptr 
)

Sets all the style sheets, the style sheet variables, and the blend style. The style sheet variables are not set if aStyleSheetVariables is null.

◆ SetStyleSheetVariable() [1/2]

void CartoTypeCore::Framework::SetStyleSheetVariable ( const String aVariableName,
const String aValue 
)

Sets a variable used in conditional compilation of the style sheet to a string value.

◆ SetStyleSheetVariable() [2/2]

void CartoTypeCore::Framework::SetStyleSheetVariable ( const String aVariableName,
int32_t  aValue 
)

Sets a variable used in conditional compilation of the style sheet to an integer value.

◆ SetTileOverSizeZoomLevels()

int32_t CartoTypeCore::Framework::SetTileOverSizeZoomLevels ( int32_t  aLevels)

Set the number of zoom levels by which to zoom out when creating a tile bitmap returned by TileBitmap().

The number may be 0, 1, or 2. If it is 0, each tile is self-contained. If it is 1, each tile is cut from a larger tile containing four tiles. If it is 2, each tile is cut from a larger tile containing sixteen tiles. The values 1 and 2 are useful in allowing longer labels to be used when creating small tiles; if not, many street labels will not be drawn because the street is cut in two by the tile border and the resulting sections are too short.

The return value is the previous setting.

◆ SetTurnInstructions()

Result CartoTypeCore::Framework::SetTurnInstructions ( bool  aMetricUnits,
bool  aAbbreviate,
double  aWidth,
const char *  aWidthUnit,
const ExtendedNoticePosition aPosition,
double  aTextSize = 7,
const char *  aTextSizeUnit = "pt" 
)

Creates turn instructions in either metric or imperial units, with a specified width and position in the display.

◆ SetTurnInstructionText()

void CartoTypeCore::Framework::SetTurnInstructionText ( const String aText)

Sets the instruction to be displayed for the current turn, overriding automatically generated instructions. To revert to automatically generated instructions, call this function with empty text or nullptr. This function has no effect if turn instructions have not been created using SetTurnInstructions, or have been disabled by calling EnableTurnInstructions(false).

◆ SetUserData()

void CartoTypeCore::Framework::SetUserData ( std::shared_ptr< MUserData aUserData)
inline

Associates arbitrary data with this framework. Used by the Android SDK.

◆ SetVehiclePosOffset()

void CartoTypeCore::Framework::SetVehiclePosOffset ( double  aXOffset,
double  aYOffset 
)

Set the vehicle position when navigating as an offset from the center of the display, in units of the width and height of the display. For example, to show the vehicle in the middle but three quarters of the way down the display, use (0,0.25).

◆ SetVehicleTypeWarning()

uint32_t CartoTypeCore::Framework::SetVehicleTypeWarning ( Result aError,
double  aMaxDistance,
size_t  aMaxObjectCount 
)

Adds a vehicle type warning and returns its ID. Road sections illegal for the current vehicle weight, dimensions or cargo type are found.

Objects found are added to the 'nearby' layer while the warning is in force. The attribute '_warning=1' is set.

The parameter aMaxObjectCount is the maximum number of objects to be found, which is clamped to the range 0...1024. If it is zero, the default of 32 is used. If more objects are actually found, the closest ones are used.

If there is already a vehicle type warning it is replaced by this one.

Returns 0 if no warning was created, which occurs if aLayer was empty, or the navigation system could not be created.

◆ SetView() [1/6]

Result CartoTypeCore::Framework::SetView ( const Geometry aGeometry,
int32_t  aMarginInPixels,
int32_t  aMinScaleDenominator 
)

Sets the view to show certain geometry, with a margin in pixels, and at a minimum scale.

◆ SetView() [2/6]

Result CartoTypeCore::Framework::SetView ( const MapObject aMapObject,
int32_t  aMarginInPixels,
int32_t  aMinScaleDenominator 
)

Sets the view to show a single map object, with a margin in pixels, and at a minimum scale.

◆ SetView() [3/6]

Result CartoTypeCore::Framework::SetView ( const MapObject *const *  aMapObjectArray,
size_t  aMapObjectCount,
int32_t  aMarginInPixels,
int32_t  aMinScaleDenominator 
)

Sets the view to show a group of map objects (which must be in map coordinates), with a margin in pixels, and at a minimum scale. Does nothing if there are no objects.

◆ SetView() [4/6]

Result CartoTypeCore::Framework::SetView ( const MapObjectArray aMapObjectArray,
int32_t  aMarginInPixels,
int32_t  aMinScaleDenominator 
)

Sets the view to show a group of map objects (which must be in map coordinates), with a margin in pixels, and at a minimum scale.

◆ SetView() [5/6]

Result CartoTypeCore::Framework::SetView ( const ViewState aViewState)

Sets the view to a view state, which specifies the display size, view rectangle, rotation and whether perspective is used.

◆ SetView() [6/6]

Result CartoTypeCore::Framework::SetView ( double  aMinX,
double  aMinY,
double  aMaxX,
double  aMaxY,
CoordType  aCoordType,
int32_t  aMarginInPixels = 0,
int32_t  aMinScaleDenominator = 0 
)

Set the view area of the map. specifying the coordinate type, which may be display pixels, map coordinates or latitude and longitude. The projection is scaled and shifted so that the projected map will contain the specified area.

You can also specify a margin in pixels around the display area, and a minimum scale denominator to ensure that when displaying a small map object the map is not zoomed right in to it.

◆ SetViewCenter()

Result CartoTypeCore::Framework::SetViewCenter ( double  aX,
double  aY,
CoordType  aCoordType 
)

Set the center of the map to the position (aX,aY), specifying the coordinate type, which may be display pixels, map coordinates or latitude and longitude.

◆ SetViewLimits() [1/2]

Result CartoTypeCore::Framework::SetViewLimits ( double  aMinScaleDenominator,
double  aMaxScaleDenominator,
const Geometry aPanArea 
)

Sets the limits to zooming and panning.

Zooming is restricted to the range between aMinScaleDenominator and aMaxScaleDenominator, and panning is restricted so that the edges of the display always touch the bounds of aPanArea.

Use the value zero to remove either or both of the two zoom limits. Use an empty geometry object to remove panning limits.

◆ SetViewLimits() [2/2]

Result CartoTypeCore::Framework::SetViewLimits ( double  aMinScaleDenominator = 0,
double  aMaxScaleDenominator = 0 
)

Sets the limits to zooming and panning so that panning outside the map is prevented.

Zooming is restricted to the range between aMinScaleDenominator and aMaxScaleDenominator, and panning is restricted so that the edges of the display always touch the bounds of the map.

Use the value zero to remove either or both of the two zoom limits.

◆ SetViewToRoute()

Result CartoTypeCore::Framework::SetViewToRoute ( size_t  aRouteIndex,
int32_t  aMarginInPixels,
int32_t  aMinScaleDenominator 
)

Sets the view to one of the current routes, selected by its index (0 means the main route), with a margin in pixels, and at a minimum scale. This function does nothing if the selected route doesn't exist.

◆ SetViewToWholeMap()

Result CartoTypeCore::Framework::SetViewToWholeMap ( )

Shows the whole map, zooming out as far as necessary.

◆ StartNavigation() [1/3]

Result CartoTypeCore::Framework::StartNavigation ( const CoordSet aCoordSet,
CoordType  aCoordType 
)

A version of StartNavigation that takes a CoordSet and a CoordType instead of a RouteCoordSet. The current location match parameters are used.

◆ StartNavigation() [2/3]

Result CartoTypeCore::Framework::StartNavigation ( const RouteCoordSet aCoordSet)

Starts navigation through a set of at least two points. If the heading is known from previous navigation fixes, and it is not supplied with the first route point, it is used to decide the best starting direction for the route.

◆ StartNavigation() [3/3]

Result CartoTypeCore::Framework::StartNavigation ( double  aStartX,
double  aStartY,
CoordType  aStartCoordType,
double  aEndX,
double  aEndY,
CoordType  aEndCoordType 
)

Starts navigation from a start point to an end point, which may be in different coordinate systems. If the heading is known it is used to decide the best starting direction for the route. The current location match parameters are used.

◆ StartNavigationDeferred()

Result CartoTypeCore::Framework::StartNavigationDeferred ( const RouteCoordSet aCoordSet)

Starts navigation through a set of at least two points, creating the route asynchronously and starting to supply turn instructions when the route has been calculated.

◆ StartTracking()

void CartoTypeCore::Framework::StartTracking ( )

Starts tracking (storing and displaying track points) and starts a new track segment. If tracking is turned on, a track point is added every time a new position fix is supplied using Navigate, if the position is far enough from the previous track point.

◆ StyleSheetData()

StyleSheetData CartoTypeCore::Framework::StyleSheetData ( size_t  aIndex) const

Returns a StyleSheetData object representing the style sheet with the specified index. An index of 0 means the main style sheet. If the index is out of range an empty StyleSheetData object is returned.

◆ StyleSheetDataArray()

const StyleSheetDataArray & CartoTypeCore::Framework::StyleSheetDataArray ( ) const

Returns the entire array of style sheets used by this framework.

◆ StyleSheetErrorLocation()

FileLocation CartoTypeCore::Framework::StyleSheetErrorLocation ( ) const

Returns location information set by the last style sheet load operation.

◆ StyleSheetText()

std::string CartoTypeCore::Framework::StyleSheetText ( size_t  aIndex) const

Returns the XML text of the style sheet with the specified index. An index of 0 means the main style sheet. If the index is out of range the empty string is returned.

◆ StyleSheetVariables()

const StringDictionary & CartoTypeCore::Framework::StyleSheetVariables ( ) const

Returns a reference to the dictionary containing the style sheet variables and their values.

◆ TileBitmap() [1/3]

Bitmap CartoTypeCore::Framework::TileBitmap ( Result aError,
int32_t  aTileSizeInPixels,
const String aQuadKey,
const TileBitmapParam aParam = nullptr 
)

Returns a bitmap containing a tile of the required coordinates and size, specified using a quad key. aParam controls whether map objects or labels are drawn, and whether labels are passed to an external handler.

◆ TileBitmap() [2/3]

Bitmap CartoTypeCore::Framework::TileBitmap ( Result aError,
int32_t  aTileSizeInPixels,
int32_t  aZoom,
int32_t  aX,
int32_t  aY,
const TileBitmapParam aParam = nullptr 
)

Returns a bitmap containing a tile of the required coordinates and size, specified using OpenStreetMap tile coordinates. aParam controls whether map objects or labels are drawn, and whether labels are passed to an external handler.

◆ TileBitmap() [3/3]

Bitmap CartoTypeCore::Framework::TileBitmap ( Result aError,
int32_t  aTileWidth,
int32_t  aTileHeight,
const RectFP aBounds,
CoordType  aCoordType,
const TileBitmapParam aParam = nullptr 
)

Return a bitmap containing a tile of the required coordinates and size, specified using degrees, map coordinates, etc. aParam controls whether map objects or labels are drawn, and whether labels are passed to an external handler.

◆ TimeAndDistanceMatrix()

TimeAndDistanceMatrix CartoTypeCore::Framework::TimeAndDistanceMatrix ( Result aError,
const std::vector< PointFP > &  aFrom,
const std::vector< PointFP > &  aTo,
CoordType  aCoordType,
ProgressCallBack aProgressCallBack = nullptr 
)

Returns an object containing route times in seconds and distances in metres from aFrom to all points in aTo. If routing fails for any pair of points the time and distance are set to UINT32_MAX. It is legal for aFrom to refer to the same vector as aTo. Times and distances where the start and end point are the same are set to zero.

If aProgressCallBack is supplied it is called at frequent intervals to supply progress estimates.

◆ TimeToString()

String CartoTypeCore::Framework::TimeToString ( double  aTimeInSeconds) const

Returns a time duration as a string containing locale-dependent words for hours, minutes and seconds.

◆ Track()

TrackGeometry CartoTypeCore::Framework::Track ( ) const

Returns the current track as a geometry object with coordinates in degrees. Each segment of the track is a contour in the geometry object.

◆ Tracking()

bool CartoTypeCore::Framework::Tracking ( ) const

Returns true if tracking (storing and displaying track points) is on.

◆ TrackIsDisplayed()

bool CartoTypeCore::Framework::TrackIsDisplayed ( ) const

Returns true if the track is currently displayed.

◆ TrackLengthInMeters()

double CartoTypeCore::Framework::TrackLengthInMeters ( ) const

Returns the length of the current track in meters.

◆ TrafficInfoEnabled()

bool CartoTypeCore::Framework::TrafficInfoEnabled ( ) const

Returns true if navigation data has been loaded and traffic information is used when routing.

◆ TrafficInfoSpeed()

double CartoTypeCore::Framework::TrafficInfoSpeed ( double  aX,
double  aY,
CoordType  aCoordType,
uint32_t  aVehicleTypes 
)

Returns the minimum speed of any traffic info speed restrictions affecting specified vehicle types, for a route defined by a series of points. Returns 255 if there are no speed restrictions.

◆ TurnInstructionsEnabled()

bool CartoTypeCore::Framework::TurnInstructionsEnabled ( ) const

Returns true if turn instructions exist and have been enabled.

◆ TurnInstructionText()

String CartoTypeCore::Framework::TurnInstructionText ( )

Gets the instruction to be displayed for the current turn. This function returns an empty string if turn instructions have not been created using SetTurnInstructions.

◆ UnloadIcon()

void CartoTypeCore::Framework::UnloadIcon ( const String aId)

Unload an icon previously loaded using LoadIcon.

◆ UnloadMapByHandle()

Result CartoTypeCore::Framework::UnloadMapByHandle ( uint32_t  aHandle)

Unload a map, selecting it by handle. It is illegal to unload the main map database or the in-memory database.

◆ UseRoute()

Result CartoTypeCore::Framework::UseRoute ( const CartoTypeCore::Route aRoute,
bool  aReplace 
)

Use an existing route and display it.

If aReplace is true, delete all current routes, add the new route and make its profile the current profile. If aReplace is false, append the new route to the list of current routes.

Appending a route fails if the new route has a different start and end point from the current routes.

This function resets the navigation state and enables navigation.

◆ ViewState()

ViewState CartoTypeCore::Framework::ViewState ( ) const

Gets the current view state. This state can be saved, then restored using SetView(const ViewState&).

◆ WriteClosedLineTrafficMessageAsXml()

Result CartoTypeCore::Framework::WriteClosedLineTrafficMessageAsXml ( OutputStream aOutput,
const TrafficInfo aTrafficInfo,
const String aId,
const CartoTypeCore::Route aRoute 
)

Writes a traffic information message referring to an area defined by a closed line in the road network. The message is written in XML. aOutput is the stream to which the message is written. aTrafficInfo gives the traffic-related information, such as a speed restriction. aId gives the arbitrary identifier of the message. aRoute is a route object describing the line.

◆ WriteLineTrafficMessageAsXml()

Result CartoTypeCore::Framework::WriteLineTrafficMessageAsXml ( OutputStream aOutput,
const TrafficInfo aTrafficInfo,
const String aId,
const CartoTypeCore::Route aRoute 
)

Writes a traffic information message referring to a line in the road network. The message is written in XML. aOutput is the stream to which the message is written. aTrafficInfo gives the traffic-related information, such as a speed restriction. aId gives the arbitrary identifier of the message. aRoute is a route object describing the line.

◆ WriteMapImage()

Result CartoTypeCore::Framework::WriteMapImage ( const String aFileName,
FileType  aFileType,
bool  aCompress = false 
)

Writes a map image to a file of the specified type. Only the PNG file type is supported. If aCompress is true, uses lossy compression to reduce the file size. For PNG files compression is achieved by palettization.

◆ WriteRouteAsXml()

Result CartoTypeCore::Framework::WriteRouteAsXml ( const CartoTypeCore::Route aRoute,
const String aFileName,
FileType  aFileType = FileType::CTROUTE 
) const

Write a route as XML in the format selected by aFileType: FileType::CTROUTE or FileType::GPX.

◆ WriteRouteAsXmlString()

Result CartoTypeCore::Framework::WriteRouteAsXmlString ( const CartoTypeCore::Route aRoute,
std::string &  aXmlString,
FileType  aFileType = FileType::CTROUTE 
) const

Write a route as an XML string, in the format selected by aFileType: FileType::CTROUTE or FileType::GPX.

◆ WriteTrackAsXml()

Result CartoTypeCore::Framework::WriteTrackAsXml ( const String aFileName) const

Writes the current track to a file as XML in GPX format.

◆ WriteTrackAsXmlString()

Result CartoTypeCore::Framework::WriteTrackAsXmlString ( std::string &  aXmlString) const

Writes the current track to a string as XML in GPX format.

◆ WriteTrafficMessageAsXml()

Result CartoTypeCore::Framework::WriteTrafficMessageAsXml ( OutputStream aOutput,
const TrafficInfo aTrafficInfo,
LocationRef aLocationRef 
)

Writes a traffic information message. The message is written in XML. aOutput is the stream to which the message is written. aTrafficInfo gives the traffic-related information, such as a speed restriction. aLocationRef gives the location to which the information applies.

◆ Zoom()

Result CartoTypeCore::Framework::Zoom ( double  aZoomFactor)

Zooms in by a specified zoom factor, or zooms out if the zoom factor is less than 1.

◆ ZoomAt()

Result CartoTypeCore::Framework::ZoomAt ( double  aZoomFactor,
double  aX,
double  aY,
CoordType  aCoordType 
)

Zooms in by a specified zoom factor, or zooms out if the zoom factor is less than 1, centering the zoom at the specified position, so that it remains at the same place on the display.

◆ ZoomLevelFromScaleDenominator()

double CartoTypeCore::Framework::ZoomLevelFromScaleDenominator ( double  aScaleDenominator,
int32_t  aImageSizeInPixels = 256 
) const

Calculate the Open Street Map zoom level (0 maps the length of the equator to aImageSizeInPixels pixels, 1 = half the length of the equator, etc.) for a certain scale denominator.

Member Data Documentation

◆ KDefaultImageCacheSize

constexpr size_t CartoTypeCore::Framework::KDefaultImageCacheSize = 10 * 1024 * 1024
staticconstexpr

The default size of the cache used by the image server.

◆ KMaxRoutesDisplayed

constexpr size_t CartoTypeCore::Framework::KMaxRoutesDisplayed = 16
staticconstexpr

The maximum number of alternative routes that can be displayed simultaneously.


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