CartoType .NET API 8.8-7-gb35e4dc71
for development in C#, Visual Basic and other .NET languages
CartoTypeWrapper.h
1/*
2CartoTypeWrapper.h
3Copyright (C) CartoType Ltd 2011-2023.
4See www.cartotype.com for more information.
5*/
6
7#pragma once
8
9#include "CartoTypeResult.h"
10#include "CartoTypeGeometry.h"
11#include "CartoTypeMetaData.h"
12#include "CartoTypeFeatureInfo.h"
13
14using namespace System;
15using namespace System::Collections::Generic;
16
17#using "System.Drawing.dll"
18
19namespace CartoTypeCore
20{
21class Framework;
22class MapObject;
23class TCoordinateTransform;
24class NavigatorTurn;
25class MInternetAccessor;
26class Route;
27class RouteSegment;
28class RouteProfile;
29class NearestRoadInfo;
30class NearestSegmentInfo;
31class Address;
32class Legend;
33class MapRenderer;
34class RouteCoordSet;
35class ExtendedNoticePosition;
36class TimeAndDistanceMatrix;
37}
38
40namespace CartoType
41{
42
63// forward declarations
64ref class Framework;
65ref class Route;
66ref class Address;
67ref class Geometry;
68ref class Legend;
69ref class FindAsyncHelper;
70ref class FindAsyncGroupHelper;
71ref class CreateRouteAsyncHelper;
72
74public enum class MapObjectType
75 {
77 Point,
79 Line,
81 Polygon,
83 Array,
86 };
87
89public enum class StringMatchMethod
90 {
92 PrefixFlag = 1,
98 FuzzyFlag = 8,
100 FoldCaseFlag = 16,
103
105 Exact = 0,
116 };
117
119public enum class LetterCase
120 {
122 None,
124 Lower,
126 Upper,
131 Title
132 };
133
135public ref class FindNearbyParam
136 {
137 public:
138 FindNearbyParam() { Type = FeatureType::Invalid; }
139
141 property FeatureType Type;
143 property String^ Text;
145 property Geometry^ Location;
146 };
147
149public ref class FindParam
150 {
151 public:
154 FindParam(FindNearbyParam^ aFindNearbyParam);
155
157 property int MaxObjectCount;
159 property Geometry^ Clip;
161 property Geometry^ Location;
163 property String^ Layers;
170 property String^ Attributes;
175 property String^ Text;
182 property String^ Condition;
184 property bool Merge;
189 property double TimeOut;
190 };
191
193public ref class MapObjectMatch
194 {
195 public:
197 property bool Found;
199 property String^ Key;
201 property String^ Value;
203 property int Start;
205 property int End;
206 };
207
209public ref class MapObject: public Path
210 {
211 public:
213
215 property String^ Label { String^ get(); };
219 String^ StringAttribute(String^ aName);
221 SortedDictionary<String^,String^>^ StringAttributes();
223 property Int64 Id { Int64 get(); }
225 property MapObjectType Type { MapObjectType get(); };
227 property String^ LayerName { String^ get(); }
229 property double Area { double get(); };
231 property double LengthOrPerimeter { double get(); }
238 property Point^ Center { Point^ get(); };
247 property Point^ CenterInDegrees { Point^ get(); };
249 property Rect^ BoundsInDegrees { Rect^ get(); };
251 property Geometry^ GeometryInDegrees { Geometry^ get(); };
253 property Rect^ Bounds { Rect^ get(); }
254
264 MapObjectMatch^ Match(String^ aText,StringMatchMethod aMatchMethod,String^ aAttributes,bool aPhrase);
266 virtual int ContourCount();
268 virtual int PointCount(int aContourIndex);
270 virtual PathPoint^ Point(int aContourIndex,int aPointIndex);
271
272 internal:
273 MapObject(CartoTypeCore::MapObject* aMapObject);
274
275 protected:
276 !MapObject();
277
278 internal:
279 CartoTypeCore::MapObject* m_map_object;
280 };
281
296public ref class MapRenderer
297 {
298 public:
307 MapRenderer(Framework^ aFramework,IntPtr aWindowHandle);
308 ~MapRenderer();
310 void Draw();
312 bool Valid();
323 bool Enable(bool aEnable);
324
325 protected:
326 !MapRenderer();
327
328 internal:
329 Framework^ m_framework;
330 CartoTypeCore::MapRenderer* m_map_renderer = nullptr;
331 };
332
334public enum class FollowFlag
335 {
337 Location = 1,
339 Heading = 2,
341 Zoom = 4
342 };
343
345public enum class FollowMode
346 {
348 None = 0,
357 };
358
360public enum class ValidityFlag
361 {
363 Time = 1,
365 Position = 2,
367 Speed = 4,
369 Course = 8,
371 Height = 16
372 };
373
375public enum class NavigationState
376 {
378 None,
382 Turn,
384 OffRoute,
386 Routing,
388 NewRoute,
390 TurnRound,
392 Arrival
393 };
394
396public ref class LocationMatchParam
397 {
398 public:
404 property double LocationAccuracyInMeters;
410 property double HeadingAccuracyInDegrees;
416 property double MaxRoadDistanceInMeters;
417 };
418
420public enum class RouterType
421 {
423 Default,
434 TECH
435 };
436
445public enum class TurnType
446 {
448 None,
453 Ahead,
458 BearRight,
460 Right,
464 Around,
466 SharpLeft,
468 Left,
474 };
475
480public enum class RoundaboutState
481 {
483 None,
485 Enter,
487 Continue,
489 Exit
490 };
491
493public ref class Turn
494 {
495 public:
499 void Clear();
500
502 property TurnType Type;
504 property bool IsContinue;
508 property double TurnAngle;
510 property int ExitNumber;
512 property double Distance;
514 property double Time;
516 property String^ FromName;
518 property String^ FromRef;
520 property String^ ToName;
522 property String^ ToRef;
524 property String^ Instructions;
525
526 internal:
527 void Set(const CartoTypeCore::NavigatorTurn& aTurn);
528 };
529
531public enum class RouteProfileType
532 {
534 Car,
536 Walk,
537 Walking = Walk,
539 Cycle,
540 Bicycle = Cycle,
542 Hike,
543 Hiking = Hike,
545 Ski
546 };
547
553public ref class RouteProfile
554 {
555 public:
556 RouteProfile();
560 Result ReadFromXmlFile(String^ aFileName);
562 Result ReadFromXmlString(String^ aString);
564 Result WriteAsXmlFile(String^ aFileName);
566 property String^ XmlString { String^ get(); }
567
569 property String^ Name;
570
575 property int VehicleType;
576
578 property double Weight;
579
581 property double AxleLoad;
582
584 property double DoubleAxleLoad;
585
587 property double TripleAxleLoad;
588
590 property double Height;
591
593 property double Width;
594
596 property double Length;
597
599 property bool HazMat;
600
602 array<double>^ Speed;
603
608 array<double>^ Bonus;
609
615
620 property int TurnTime;
621
626 property int UTurnTime;
627
635 property int CrossTrafficTurnTime;
636
640 property int TrafficLightTime;
641
646 property bool Shortest;
647
649 property bool ShortestByTime;
650
661 property double TollPenalty;
662
672 array<double>^ GradientSpeed;
673
675 array<double>^ GradientBonus;
676
681 property int GradientFlags;
682
683 internal:
684 void Set(const CartoTypeCore::RouteProfile& aProfile);
685 void Get(CartoTypeCore::RouteProfile& aProfile);
686 };
687
689public ref class NearestSegmentInfo
690 {
691 public:
693
695 property int SegmentIndex;
697 property int LineIndex;
699 property double NearestPointX;
701 property double NearestPointY;
703 property double DistanceToRoute;
705 property double DistanceAlongRoute;
707 property double DistanceAlongSegment;
709 property double TimeAlongRoute;
711 property double TimeAlongSegment;
713 property double Heading;
714
715 internal:
716 void Set(const CartoTypeCore::NearestSegmentInfo& aInfo);
717 };
718
720public ref class RoutePoint
721 {
722 public:
724 property double X;
726 property double Y;
728 property double Heading;
730 property bool HeadingKnown;
733 };
734
736public ref class RoutePointList: List<RoutePoint^>
737 {
738 };
739
746public ref class RouteCoordSet
747 {
748 public:
750 {
752 }
753
758
759 internal:
760 CartoTypeCore::RouteCoordSet CreateRouteCoordSet();
761 };
762
764public ref class RouteSegment: public Path
765 {
766 public:
770 property String^ Name { String^ get(); };
772 property String^ Ref { String^ get(); };
774 property double Distance { double get(); };
776 property double Time { double get(); };
778 property double TurnTime { double get(); }
780 property TurnType TurnType { CartoType::TurnType get(); }
782 property bool IsContinue { bool get(); }
786 property double TurnAngle { double get(); }
788 property int ExitNumber { int get(); };
790 property int Choices { int get(); }
792 property int Section { int get(); };
793
795 virtual int ContourCount() { return 1; }
797 virtual int PointCount(int aContourIndex);
799 virtual PathPoint^ Point(int aContourIndex,int aPointIndex);
800
801 internal:
802 RouteSegment(Route^ aRoute,const CartoTypeCore::RouteSegment* aSegment);
803
804 private:
805 Route^ m_route; // a reference to the parent route, to keep it in existence
806 const CartoTypeCore::RouteSegment* m_segment; // the segment: owned by m_route
807 };
808
810public ref class Route: public Path
811 {
812 internal:
813 Route(CartoTypeCore::Route* aRoute);
815
816 public:
818 property Geometry^ Geometry { CartoType::Geometry^ get(); };
820 property RouteProfile^ Profile { RouteProfile^ get(); }
822 property double Distance { double get(); }
824 property double Time { double get(); }
826 property int RouteSegmentCount { int get(); }
830 property double TollRoadDistance { double get(); }
845 NearestSegmentInfo^ NearestSegment(double aX,double aY,int aSection,double aPreviousDistanceAlongRoute);
847 NearestSegmentInfo^ PointAtDistance(double aDistanceInMeters);
849 NearestSegmentInfo^ PointAtTime(double aTimeInSeconds);
851 virtual int ContourCount();
853 virtual int PointCount(int aContourIndex);
855 virtual PathPoint^ Point(int aContourIndex,int aPointIndex);
856
857 internal:
858 const CartoTypeCore::Route* GetRoute() { return m_route; }
859
860 protected:
861 !Route();
862
863 private:
864 CartoTypeCore::Route* m_route;
865 };
866
872public ref class Address
873 {
874 public:
880 String^ ToString(bool aFull);
881
883 property String^ Building;
885 property String^ Feature;
887 property String^ Street;
889 property String^ SubLocalty;
891 property String^ Locality;
893 property String^ Island;
895 property String^ SubAdminArea;
897 property String^ AdminArea;
899 property String^ Country;
901 property String^ PostCode;
902
903 internal:
904 void Get(CartoTypeCore::Address& aAddress);
905 void Set(const CartoTypeCore::Address& aAddress);
906 };
907
909public enum class SideOfRoad
910 {
911 None,
912 Right,
913 Left,
914 Both
915 };
916
918public ref class NearestRoadInfo
919 {
920 public:
922 property FeatureInfo^ FeatureInfo;
924 property String^ Name;
926 property String^ Ref;
928 property double NearestPointX;
930 property double NearestPointY;
932 property double Distance;
934 property double HeadingInDegrees;
936 property double HeadingVectorX;
938 property double HeadingVectorY;
944 property SideOfRoad SideOfRoad;
945
946 internal:
947 void Set(const CartoTypeCore::NearestRoadInfo& aInfo);
948 };
949
951public enum class WritableMapType
952 {
954 Memory,
956 SQLite
957 };
958
960public enum class FileType
961 {
963 Png,
965 Jpeg,
967 Tiff,
969 Ctm1,
971 Ctms,
973 Kml,
975 Ctsql,
979 Gpx
980 };
981
983public ref class MapObjectList: List<MapObject^>
984 {
985 };
986
991public ref class TrafficInfo
992 {
993 public:
994 TrafficInfo();
995
997 literal double NoSpeedLimit = 255;
998
1000 property int VehicleTypes;
1002 property double Speed;
1003 };
1004
1006public enum class RoadOrientation
1007 {
1008 None,
1009 Forwards,
1010 Backwards,
1011 Both,
1012 };
1013
1015public enum class LocationRefType
1016 {
1018 Line,
1026 Circle,
1028 Rectangle,
1030 Polygon,
1033 };
1034
1036public ref class LocationRef
1037 {
1038 public:
1041
1043 property LocationRefType Type;
1045 property String^ Id;
1047 property Geometry^ Geometry;
1049 property double RadiusInMeters;
1051 property SideOfRoad SideOfRoad;
1054 };
1055
1057public enum class NoticePosition
1058 {
1060 TopLeft,
1062 TopRight,
1064 BottomLeft,
1068 Top,
1070 Right,
1072 Left,
1074 Bottom,
1076 Center
1077 };
1078
1093 {
1094 public:
1098 ExtendedNoticePosition(NoticePosition aBasePosition,double aXInset,String^ aXInsetUnit,double aYInset,String^ aYInsetUnit);
1100
1101 protected:
1103
1104 internal:
1105 CartoTypeCore::ExtendedNoticePosition* m_position = nullptr;
1106 };
1107
1109public ref class PositionedBitmap
1110 {
1111 public:
1113 property Drawing::Bitmap^ Bitmap;
1115 property int X;
1117 property int Y;
1118 };
1119
1121public ref class MapObjectGroup
1122 {
1123 public:
1125 property String^ Name;
1127 property MapObjectList^ MapObjectList;
1128 };
1129
1131public ref class MapObjectGroupList: List<MapObjectGroup^>
1132 {
1133 };
1134
1136public delegate void FindAsyncDelegate(MapObjectList^);
1137
1140
1142public delegate void RouterAsyncDelegate(Result,Route^);
1143
1145public ref class PerspectiveParam
1146 {
1147 public:
1149 {
1150 AutoPosition = true;
1151 AutoAzimuth = true;
1152 DeclinationDegrees = 30;
1153 FieldOfViewDegrees = 22.5;
1154 }
1155
1157 Result ReadFromXml(String^ aText);
1159 String^ ToXml();
1160
1162 property double PositionDegreesX;
1164 property double PositionDegreesY;
1166 property bool AutoPosition;
1168 property double HeightMeters;
1170 property double AzimuthDegrees;
1172 property bool AutoAzimuth;
1174 property double DeclinationDegrees;
1176 property double RotationDegrees;
1178 property double FieldOfViewDegrees;
1179 };
1180
1182public ref class ViewState
1183 {
1184 public:
1185 ViewState() { WidthInPixels = 256; HeightInPixels = 256; }
1186
1188 Result ReadFromXml(String^ aText);
1190 String^ ToXml();
1191
1193 property int WidthInPixels;
1195 property int HeightInPixels;
1197 property double ViewCenterDegreesX;
1199 property double ViewCenterDegreesY;
1201 property double ScaleDenominator;
1203 property double RotationDegrees;
1205 property bool Perspective;
1208 };
1209
1211public ref class NavigatorParam
1212 {
1213 public:
1215 {
1218 RouteTimeTolerance = 30;
1219 NavigationEnabled = true;
1220 }
1221
1223 property int MinimumFixDistance;
1225 property int RouteDistanceTolerance;
1227 property int RouteTimeTolerance;
1232 property bool NavigationEnabled;
1233 };
1234
1241public ref class FrameworkParam
1242 {
1243 public:
1245 {
1246 ViewWidth = 256;
1247 ViewHeight = 256;
1248 }
1249
1251 property String^ MapFileName;
1253 property String^ StyleSheetFileName;
1255 property String^ StyleSheetText;
1257 property String^ FontFileName;
1259 property int ViewWidth;
1261 property int ViewHeight;
1263 property String^ EncryptionKey;
1265 property int FileBufferSizeinBytes;
1267 property int MaxFileBufferCount;
1274 property int TextIndexLevels;
1275 };
1276
1284public value class Color
1285 {
1286 public:
1288 Color(int aValue) { Value = aValue; }
1290 Color(int aRed,int aGreen,int aBlue)
1291 {
1292 Value = (0xFF << 24) | ((aBlue & 0xFF) << 16) | ((aGreen & 0xFF) << 8) | (aRed & 0xFF);
1293 }
1295 Color(int aRed,int aGreen,int aBlue,int aAlpha)
1296 {
1297 Value = ((aAlpha & 0xFF) << 24) | ((aBlue & 0xFF) << 16) | ((aGreen & 0xFF) << 8) | (aRed & 0xFF);
1298 }
1300 Color(String^ aColor);
1302 property int Red { int get() { return (Value & 0xFF); } }
1304 property int Green { int get() { return (Value & 0xFF00) >> 8; } }
1306 property int Blue { int get() { return (Value & 0xFF0000) >> 16; } }
1308 property int Gray { int get() { return ((Value & 0xFF) + ((Value & 0xFF00) >> 8) + ((Value & 0xFF0000) >> 16)) / 3; } }
1310 property int Alpha { int get() { return (Value & 0xFF000000) >> 24; } void set(int aAlpha) { Value = (aAlpha << 24) | (Value & 0xFFFFFF); } }
1312 property bool IsNull { bool get() { return (Value & 0xFF000000) == 0; } }
1313
1315 static const Color KBlack = Color(0xFF000000);
1317 static const Color KDarkGray = Color(0xFF555555);
1319 static const Color KDarkRed = Color(0xFF000080);
1321 static const Color KDarkGreen = Color(0xFF008000);
1323 static const Color KDarkYellow = Color(0xFF008080);
1325 static const Color KDarkBlue = Color(0xFF800000);
1327 static const Color KDarkMagenta = Color(0xFF800080);
1329 static const Color KDarkCyan = Color(0xFF808000);
1331 static const Color KRed = Color(0xFF0000FF);
1333 static const Color KGreen = Color(0xFF00FF00);
1335 static const Color KYellow = Color(0xFF00FFFF);
1337 static const Color KBlue = Color(0xFFFF0000);
1339 static const Color KMagenta = Color(0xFFFF00FF);
1341 static const Color KCyan = Color(0xFFFFFF00);
1343 static const Color KGray = Color(0xFFAAAAAA);
1345 static const Color KWhite = Color(0xFFFFFFFF);
1346
1348 static const Color KTransparentBlack = Color(0x00000000);
1349
1351 property int Value;
1352 };
1353
1358public ref class BlendStyle
1359 {
1360 public:
1365 property String^ Styles;
1367 property Color MainColor;
1369 property Color BorderColor;
1371 property Color TextColor;
1373 property Color TextGlowColor;
1375 property Color IconColor;
1376 };
1377
1382public ref class BlendStyleSet: List<BlendStyle^>
1383 {
1384 };
1385
1388 {
1389 public:
1391 property int FromCount { int get(); };
1393 property int ToCount { int get(); };
1395 int Time(int aFromIndex,int aToIndex);
1397 int Distance(int aFromIndex,int aToIndex);
1398
1399 protected:
1401
1402 internal:
1403 TimeAndDistanceMatrix(CartoTypeCore::TimeAndDistanceMatrix* aMatrix);
1405
1406 CartoTypeCore::TimeAndDistanceMatrix* m_matrix = nullptr;
1407 };
1408
1416public ref class Framework
1417 {
1418 public:
1420 Framework(String^ aMapFileName,String^ aStyleSheetFileName,String^ aFontFileName,
1421 int aViewWidth,int aViewHeight);
1423 Framework(String^ aMapFileName,String^ aStyleSheetFileName,String^ aFontFileName,
1424 int aViewWidth,int aViewHeight,array<Byte>^ aEncryptionKey);
1427
1428 ~Framework();
1429
1431 Result License(String^ aKey);
1433 Result License(array<Byte>^ aKey);
1435 property String^ Licensee { String^ get(); };
1437 property String^ ExpiryDate { String^ get(); };
1439 property String^ AppBuildDate { String^ get(); };
1441 property String^ Copyright { String^ get(); };
1445 void SetCopyrightNotice(String^ aCopyright);
1447 void SetLegend(Legend^ aLegend,double aWidth,String^ aUnit,NoticePosition aPosition);
1449 void SetLegend(Legend^ aLegend,double aWidth,String^ aUnit,ExtendedNoticePosition^ aPosition);
1451 property bool LegendEnabled { bool get(); void set(bool); }
1453 void SetScaleBar(bool aMetricUnits,double aWidth,String^ aUnit,NoticePosition aPosition);
1455 void SetScaleBar(bool aMetricUnits,double aWidth,String^ aUnit,ExtendedNoticePosition^ aPosition);
1457 property bool ScaleBarEnabled { bool get(); void set(bool); }
1459 Result SetTurnInstructions(bool aMetricUnits,bool aAbbreviate,double aWidth,String^ aWidthUnit,NoticePosition aPosition,double aTextSize,String^ aTextSizeUnit);
1461 Result SetTurnInstructions(bool aMetricUnits,bool aAbbreviate,double aWidth,String^ aWidthUnit,ExtendedNoticePosition^ aPosition,double aTextSize,String^ aTextSizeUnit);
1463 property bool TurnInstructionsEnabled { bool get(); void set(bool); }
1471 void SetTurnInstructionText(String^ aText);
1476 property String^ TurnInstructionText { String^ get(); };
1478 void DrawNoticesAutomatically(bool aEnable);
1480 property bool HasNotices { bool get(); }
1484 Result Configure(String^ aConfigFileName);
1486 Result LoadMap(String^ aMapFileName);
1488 Result LoadMap(String^ aMapFileName,array<Byte>^ aEncryptionKey);
1492 Result CreateWritableMap(WritableMapType aType,String^ aFileName);
1499 Result SaveMap(int aHandle,String^ aFileName,FileType aFileType);
1506 Result ReadMap(int aHandle,String^ aFileName,FileType aFileType);
1512 Result SaveMap(int aHandle,array<Byte>^ aData,FindParam^ aFindParam);
1518 Result ReadMap(int aHandle,array<Byte>^ aData);
1524 Result WriteMapImage(String^ aFileName,FileType aFileType,bool aCompress);
1526 bool MapIsEmpty(int aHandle);
1528 property int MapCount { int get(); }
1530 int MapHandle(int aIndex);
1532 bool MapIsWritable(int aIndex);
1541 void EnableMapByHandle(int aHandle,bool aEnable);
1545 property int LastMapHandle { int get(); }
1547 property int MainMapHandle { int get(); }
1549 property int MemoryMapHandle { int get(); }
1551 Result LoadFont(String^ aFontFileName);
1553 Result LoadFont(array<Byte>^ aData);
1559 Result SetStyleSheet(String^ aStyleSheetFileName,int aIndex);
1567 Result SetStyleSheet(array<Byte>^ aData,int aIndex);
1582 void AppendStyleSheet(String^ aStyleSheetFileName);
1587 void AppendStyleSheet(array<Byte>^ aData);
1597 void EnableLayer(String^ aLayerName,bool aEnable);
1599 bool LayerIsEnabled(String^ aLayerName);
1601 property List<String^>^ LayerNames { List<String^>^ get(); }
1603 Result Resize(int aViewWidth,int aViewHeight);
1605 property double ResolutionDpi { double get(); void set(double); };
1607 property double ScaleDenominator { double get(); void set(double); };
1609 property double ScaleDenominatorInView { double get(); void set(double); };
1611 double DistanceInMeters(double aX1,double aY1,double aX2,double aY2,CoordType aCoordType);
1616 double ScaleDenominatorFromZoomLevel(double aZoomLevel,int aImageSizeInPixels);
1621 double ZoomLevelFromScaleDenominator(double aScaleDenominator,int aImageSizeInPixels);
1623 property bool Perspective { bool get(); void set(bool); }
1627 property bool Draw3DBuildings { bool get(); void set(bool); }
1629 Result Zoom(double aZoomFactor);
1631 property bool AnimateTransitions { bool get(); void set(bool); }
1633 property double LabelFPS { double get(); void set(double); }
1635 property bool FixedLabels { bool get(); void set(bool); }
1637 property double LabelUpAngle { double get(); void set(double); }
1648 Result ZoomAt(double aZoomFactor,double aX,double aY,CoordType aCoordType);
1650 Result Rotate(double aAngle);
1652 Result RotateAt(double aAngle,double aX,double aY,CoordType aCoordType);
1654 property double Rotation { double get(); void set(double); }
1656 Result SetRotationAt(double aAngle,double aX,double aY,CoordType aCoordType);
1658 Result RotateAndZoom(double aAngle,double aZoomFactor,double aX,double aY,CoordType aCoordType);
1660 void Pan(int aDx,int aDy);
1662 Result Pan(double aFromX,double aFromY,CoordType aFromCoordType,
1663 double aToX,double aToY,CoordType aToCoordType);
1665 Result SetViewCenter(double aX,double aY,CoordType aCoordType);
1667 Result SetView(double aX1,double aY1,double aX2,double aY2,CoordType aCoordType,int aMarginInPixels,int aMinScaleDenominator);
1669 void SetView(MapObject^ aMapObject,int aMarginInPixels,int aMinScaleDenominator);
1671 Result SetView(MapObjectList^ aObjectList,int aMarginInPixels,int aMinScaleDenominator);
1673 Result SetView(Geometry^ aGeometry,int aMarginInPixels,int aMinScaleDenominator);
1675 Result SetViewToRoute(int aRouteIndex,int aMarginInPixels,int aMinScaleDenominator);
1688 Result SetViewLimits(double aMinScaleDenominator,double aMaxScaleDenominator,Geometry^ aPanArea);
1689
1691 Result GetView(Rect^ aView,CoordType aCoordType);
1693 Result GetMapExtent(Rect^ aExtent,CoordType aCoordType);
1695 property String^ ProjectionAsProj4Param { String^ get(); }
1697 property ViewState^ ViewState { CartoType::ViewState^ get(); void set(CartoType::ViewState^); }
1698
1708 Result InsertMapObject(int aMapHandle,String^ aLayerName,Geometry^ aGeometry,
1709 String^ aStringAttributes,FeatureInfo^ aFeatureInfo,Int64% aId,bool aReplace);
1718 Result InsertPointMapObject(int aMapHandle,String^ aLayerName,double aX,double aY,
1719 CoordType aCoordType,String^ aStringAttributes,FeatureInfo^ aFeatureInfo,Int64% aId,bool aReplace);
1730 Result InsertCircleMapObject(int aMapHandle,String^ aLayerName,
1731 double aCenterX,double aCenterY,CoordType aCenterCoordType,double aRadius,CoordType aRadiusCoordType,
1732 String^ aStringAttributes,FeatureInfo^ aFeatureInfo,Int64% aId,bool aReplace);
1743 Result InsertEllipseMapObject(int aMapHandle,String^ aLayerName,double aCenterX,double aCenterY,CoordType aCenterCoordType,
1744 double aRadiusX,double aRadiusY,CoordType aRadiusCoordType,double aRotationDegrees,String^ aStringAttributes,FeatureInfo^ aFeatureInfo,Int64% aId,bool aReplace);
1755 Result InsertEnvelopeMapObject(int aMapHandle,String^ aLayerName,Geometry^ aGeometry,
1756 double aRadius,CoordType aRadiusCoordType,
1757 String^ aStringAttributes,FeatureInfo^ aFeatureInfo,Int64% aId,bool aReplace);
1758
1778 Result InsertPushPin(double aX,double aY,CoordType aCoordType,String^ aStringAttributes,String^ aColor,int aIconCharacter,Int64% aId);
1779
1789 Result InsertCopyOfMapObject(int aMapHandle,String^ aLayerName,MapObject^ aObject,double aEnvelopeRadius,
1790 CoordType aRadiusCoordType,Int64% aId,bool aReplace);
1791
1796 Result DeleteMapObjects(int aMapHandle,Int64 aStartId,Int64 aEndId,Int64% aDeletedCount,String^ aCondition);
1801 MapObject^ LoadMapObject(int aMapHandle,Int64 aId);
1810 Result ReadGpx(int aMapHandle,String^ aFileName);
1819 Geometry^ Range(RouteProfile^ aProfile,double aX,double aY,CoordType aCoordType,double aTimeOrDistance,bool aIsTime);
1828 TimeAndDistanceMatrix^ TimeAndDistanceMatrix(Result% aResult,array<PointValue>^ aFrom,array<PointValue>^ aTo,CoordType aCoordType);
1839 bool MutuallyAccessible(Result% aResult,array<PointValue>^ aPointArray,CoordType aCoordType,array<int>^ aGroupArray);
1847 Result GetAreaAndLength(Geometry^ aGeometry,double% aArea,double% aLength);
1855 Result GetContourAreaAndLength(Geometry^ aGeometry,int aContourIndex,double% aArea,double% aLength);
1857 Result ConvertCoords(Geometry^ aGeometry,CoordType aToCoordType);
1859 Result ConvertPoint(Point^ aPoint,CoordType aFromCoordType,CoordType aToCoordType);
1861 double PixelsToMeters(double aPixels);
1863 double MetersToPixels(double aMeters);
1865 property String^ DataSetName { String^ get(); };
1866
1874 Result EditNewLineObject(double aX,double aY);
1876 Result EditNewPolygonObject(double aX,double aY);
1878 Result EditMoveCurrentPoint(double aX,double aY);
1891 Result EditSelectNearestPoint(double aX,double aY,double aRadiusInMillimeters);
1899 Result EditInsertCurrentObject(String^ aLayer,Int64% aId,bool aReplace);
1901 Result EditSetCurrentObjectStringAttribute(String^ aKey,String^ aValue);
1909 Result EditGetCurrentObjectAreaAndLength(double% aArea,double% aLength);
1910
1912 Drawing::Bitmap^ MapBitmap();
1914 Drawing::Bitmap^ MemoryDataBaseMapBitmap();
1923 void DrawMemoryDataBase(bool aEnable);
1924
1926 Drawing::Bitmap^ TileBitmap(int aTileSizeInPixels,int aZoom,int aX,int aY);
1927
1936 bool ClipBackgroundToMapBounds(bool aEnable);
1937
1954
1955 // adding and removing style sheet icons loaded from files
1969 Result LoadIcon(String^ aFileName,String^ aId,int aHotSpotX,int aHotSpotY,int aLabelX,int aLabelY);
1971 void UnloadIcon(String^ aId);
1972
1973 // finding map objects
1983 Result FindInDisplay(MapObjectList^ aObjectList,int aMaxObjectCount,double aX,double aY,double aRadius);
1985 Result FindAddress(MapObjectList^ aObjectList,int aMaxObjectCount,Address^ aAddress,bool aFuzzy);
1997 Result FindAddressAsync(FindAsyncDelegate^ aDelegate,int aMaxObjectCount,Address^ aAddress,bool aFuzzy,bool aOverride);
1999 Result FindInLayer(MapObjectList^ aObjectList,int aMaxObjectCount,String^ aLayer,double aMinX,double aMinY,double aMaxX,double aMaxY,CoordType aCoordType);
2008 Result FindText(MapObjectList^ aObjectList,int aMaxObjectCount,String^ aText,StringMatchMethod aMatchMethod,String^ aLayers,String^ aAttrib);
2013 Result Find(MapObjectList^ aObjectList,FindParam^ aFindParam);
2020 Result Find(MapObjectGroupList^ aObjectGroupList,FindParam^ aFindParam);
2022 Result Find(MapObjectList^ aObjectList,FindNearbyParam^ aFindNearbyParam);
2036 Result FindAsync(FindAsyncDelegate^ aDelegate,FindParam^ aFindParam,bool aOverride);
2053 Result FindAsync(FindAsyncGroupDelegate^ aDelegate,FindParam^ aFindParam,bool aOverride);
2054
2072 Result FindPointsInPath(MapObjectList^ aObjectList,Geometry^ aPath,FindParam^ aFindParam);
2083 int Height(double aX,double aY,CoordType aCoordType);
2094 Result GetHeights(array<double>^ aX,array<double>^ aY,array<int>^ aTerrainHeightArray,CoordType aCoordType);
2095
2096 // style sheet variables
2098 void SetStyleSheetVariable(String^ aVariableName,String^ aValue);
2100 void SetStyleSheetVariable(String^ aVariableName,int aValue);
2101
2102 // night mode and color blending
2104 property bool NightMode { bool get(); void set(bool); }
2115 property Color NightModeColor { Color get(); void set(Color); }
2122
2123 // geocoding
2132 String^ GeoCodeSummary(MapObject^ aMapObject);
2139 Result GetAddress(Address^ aAddress,MapObject^ aMapObject);
2140
2145 Result GetAddressFast(Address^ aAddress,MapObject^ aMapObject);
2146
2155 String^ GeoCodeSummary(double aX,double aY,CoordType aCoordType);
2156
2163 Result GetAddress(Address^ aAddress,double aX,double aY,CoordType aCoordType);
2164
2165 // navigation
2176 property RouterType PreferredRouterType { RouterType get(); void set(RouterType); }
2190 property RouterType ActualRouterType { RouterType get(); }
2199 Result StartNavigation(array<double>^ aX,array<double>^ aY,CoordType aCoordType);
2201 Result StartNavigation(double aStartX,double aStartY,CoordType aStartCoordType,
2202 double aEndX,double aEndY,CoordType aEndCoordType);
2204 Route^ CreateRoute(Result% aResult,RouteProfile^ aProfile,RouteCoordSet^ aCoordSet);
2212 Result CreateRouteAsync(RouterAsyncDelegate^ aDelegate,RouteProfile^ aProfile,RouteCoordSet^ aCoordSet,bool aOverride);
2214 Route^ CreateRoute(Result% aResult,RouteProfile^ aProfile,array<double>^ aX,array<double>^ aY,CoordType aCoordType);
2239 bool aStartFixed,bool aEndFixed,int aIterations);
2252 bool aStartFixed,bool aEndFixed,int aIterations,bool aOverride);
2254 Route^ CreateBestRoute(Result% aResult,RouteProfile^ aProfile,array<double>^ aX,array<double>^ aY,CoordType aCoordType,
2255 bool aStartFixed,bool aEndFixed,int aIterations);
2256
2257
2266 Route^ CreateRouteFromXml(Result% aResult,RouteProfile^ aProfile,String^ aFilenameOrData);
2267
2282 Result UseRoute(Route^ aRoute,bool aReplace);
2284 String^ RouteInstructions(Route^ aRoute);
2295 property bool NavigationEnabled { bool get(); void set(bool); }
2328 RouteProfile^ Profile(int aIndex);
2334 property int BuiltInProfileCount { int get(); }
2375 Result ChooseRoute(int aRouteIndex);
2380 Result DisplayRoute(bool aEnable);
2382 property int RouteCount { int get(); }
2384 Route^ Route(int aRouteIndex);
2403 Result ReadRouteFromXml(String^ aFileNameOrData,bool aReplace);
2405 Result WriteRouteAsXml(CartoType::Route^ aRoute,String^ aFileName,FileType aFileType);
2452 Result Navigate(int aValidity,double aTime,double aLong,double aLat,double aSpeed,double aBearing,double aHeight);
2461 property Turn^ FirstTurn { Turn^ get(); }
2469 property Turn^ SecondTurn { Turn^ get(); }
2478 property Turn^ ContinuationTurn { Turn^ get(); }
2493 property int NavigationMinimumFixDistance { int get(); void set(int); }
2495 property int NavigationTimeOffRouteTolerance { int get(); void set(int); }
2497 property int NavigationDistanceOffRouteTolerance { int get(); void set(int); }
2517 int SetNearbyObjectWarning(int aId,String^ aLayer,String^ aCondition,double aMaxDistance,int aMaxObjectCount);
2533 int SetVehicleTypeWarning(double aMaxDistance,int aMaxObjectCount);
2541 property double DistanceToDestination { double get(); }
2543 property double EstimatedTimeToDestination { double get(); }
2553 Result FindNearestRoad(NearestRoadInfo^ aInfo,double aX,double aY,CoordType aCoordType,
2554 double aHeadingInDegrees,bool aDisplayPosition);
2564 Result DisplayPositionOnNearestRoad(double aLong,double aLat,double aHeadingInDegrees,NearestRoadInfo^ aInfo);
2570 void SetVehiclePosOffset(double aXOffset,double aYOffset);
2575
2581 property String^ Locale { String^ get(); void set(String^); }
2582
2584 String^ DistanceToString(double aDistanceInMeters,bool aMetricUnits,bool aAbbreviate);
2585
2587 String^ TimeToString(double aTimeInSeconds);
2588
2595 String^ SetCase(String^ aString,LetterCase aCase);
2596
2616 Result AddTrafficInfo(Int64% aId,TrafficInfo^ aTrafficInfo,LocationRef^ aLocationRef);
2617
2641 Result AddPolygonSpeedLimit(Int64% aId,Geometry^ aPolygon,double aSpeed,int aVehicleTypes);
2642
2670 Result AddLineSpeedLimit(Int64% aId,Geometry^ aLine,double aSpeed,int aVehicleTypes);
2671
2698 Result AddClosedLineSpeedLimit(Int64% aId,Geometry^ aLine,double aSpeed,int aVehicleTypes);
2699
2712 Result AddForbiddenArea(Int64% aId,Geometry^ aPolygon);
2713
2726
2729
2733 property bool TrafficInfoEnabled { bool get(); void set(bool); }
2734
2741
2744
2747
2749 property bool Tracking { bool get(); }
2750
2752 property bool DisplayTrack { bool get(); void set(bool); }
2757 property Geometry^ Track { Geometry^ get(); }
2758
2760 property double TrackLengthInMeters { double get(); }
2761
2763 Result WriteTrackAsXml(String^ aFileName);
2764
2766 property String^ TrackAsXmlString { String^ get(); }
2767
2769 static const int KMaxRoutesDisplayed = 16;
2770
2771 // server
2772
2790 array<Byte>^ HandleQuery(String^ aQuery,array<Byte>^ aData);
2791
2792 protected:
2793 !Framework();
2794
2795 internal:
2796 auto GetFramework() { return m_framework; }
2797 List<FindAsyncHelper^>^ m_find_async_helper_list = gcnew List<FindAsyncHelper^>();
2798 List<FindAsyncGroupHelper^>^ m_find_async_group_helper_list = gcnew List<FindAsyncGroupHelper^>();
2799 List<CreateRouteAsyncHelper^>^ m_create_route_async_helper_list = gcnew List<CreateRouteAsyncHelper^>();
2800
2801 private:
2802 Result CreateRouteAsync(RouterAsyncDelegate^ aDelegate,bool aBest,RouteProfile^ aProfile,RouteCoordSet^ aCoordSet,
2803 bool aStartFixed,bool aEndFixed,int aIterations,bool aOverride);
2804
2805 CartoTypeCore::Framework* m_framework = nullptr;
2806 Drawing::Bitmap^ m_bitmap = nullptr;
2807 Drawing::Bitmap^ m_memory_database_bitmap = nullptr;
2808 Drawing::Bitmap^ m_tile_bitmap = nullptr;
2809 };
2810
2812public enum class Align
2813 {
2815 Center,
2817 Standard,
2819 Reverse,
2821 Left,
2823 Right
2824 };
2825
2839public ref class Legend
2840 {
2841 public:
2843 Legend(Framework^ aFramework);
2844 ~Legend();
2845
2847 void Clear();
2848
2867 Drawing::Bitmap^ CreateLegend(double aWidth,String^ aUnit,double aScaleDenominator,double aScaleDenominatorInView,BlendStyleSet^ aBlendStyleSet);
2868
2873 void AddMapObjectLine(MapObjectType aType,String^ aLayer,FeatureInfo^ aFeatureInfo,String^ aStringAttrib,String^ aLabel);
2874
2878 void AddMapObjectLine(MapObjectType aType,String^ aLayer,FeatureType aFeatureType,String^ aStringAttrib,String^ aLabel);
2879
2881 void AddTextLine(String^ aText);
2882
2887 void AddScaleLine(bool aMetricUnits);
2888
2893 void AddTurnLine(bool aMetricUnits,bool aAbbreviate);
2894
2896 void SetMainStyleSheet(array<Byte>^ aData);
2897
2905 void SetExtraStyleSheet(array<Byte>^ aData);
2906
2909
2911 void SetBorder(Color aColor,double aStrokeWidth,double aRadius,String^ aUnit);
2912
2914 void SetMarginWidth(double aMarginWidth,String^ aUnit);
2915
2917 void SetMinLineHeight(double aLineHeight,String^ aUnit);
2918
2920 void SetLabelWrapWidth(double aWrapWidth,String^ aUnit);
2921
2923 void SetFontFamily(String^ aFontFamily);
2924
2926 void SetFontSize(double aFontSize,String^ aUnit);
2927
2929 void SetTextColor(Color aTextColor);
2930
2932 void SetDiagramColor(Color aDiagramColor);
2933
2935 void SetAlignment(Align aAlignment);
2936
2938 void SetPolygonRotation(double aDegrees);
2939
2942
2947 void SetTurnInstruction(String^ aText);
2948
2954
2955 protected:
2956 !Legend();
2957
2958 internal:
2959 CartoTypeCore::Legend* GetLegend() { return m_legend; }
2960
2961 private:
2962 CartoTypeCore::Legend* m_legend = nullptr;
2963 };
2964
2966public ref class Util abstract sealed
2967 {
2968 public:
2970 static String^ Description();
2972 static String^ Version();
2974 static String^ Build();
2975
2977 static double SphericalPolygonArea(array<double>^ aX,array<double>^ aY);
2979 static double Length(array<double>^ aX,array<double>^ aY);
2981 static double GreatCircleDistanceInMeters(double aLong1,double aLat1,double aLong2,double aLat2);
2986 static double AzimuthInDegrees(double aLong1,double aLat1,double aLong2,double aLat2);
2988 static Point^ PointAtAzimuth(double aLong,double aLat,double aDir,double aDistanceInMeters);
2993 static double DistanceFromPoint(array<double>^ aX,array<double>^ aY,bool aIsPolygon,double aPointX,double aPointY,Point^ aNearestPoint);
3004 static String^ SetAttribute(String^ aString,String^ aKey,String^ aValue);
3006 static String^ ErrorString(Result aError);
3007 };
3008
3009}
A structured address. Any field may be empty or null, but at least one field should be non-empty for ...
Definition: CartoTypeWrapper.h:873
String^ Feature
The name of a feature or place of interest.
Definition: CartoTypeWrapper.h:885
String^ Country
The country.
Definition: CartoTypeWrapper.h:899
String^ PostCode
The postal code.
Definition: CartoTypeWrapper.h:901
String^ Building
The name or number of the building.
Definition: CartoTypeWrapper.h:883
String^ AdminArea
The administrative area: state, province, etc.
Definition: CartoTypeWrapper.h:897
String ^ ToString(bool aFull)
Returns the address as a string. If aFull is true, supplies the main administrative division (state,...
String^ Locality
The village, town or city.
Definition: CartoTypeWrapper.h:891
String^ Island
The island.
Definition: CartoTypeWrapper.h:893
String^ SubLocalty
The suburb, neighborhood, quarter or other subdivision of the locality.
Definition: CartoTypeWrapper.h:889
String^ SubAdminArea
The subsidiary administrative area: district, parish, etc.
Definition: CartoTypeWrapper.h:895
String^ Street
The street, road or other highway.
Definition: CartoTypeWrapper.h:887
A rule to modify a certain style or styles. The colors are blended with colors in a style,...
Definition: CartoTypeWrapper.h:1359
Color MainColor
The color to be blended with the colors in the style.
Definition: CartoTypeWrapper.h:1367
Color IconColor
If not null, the forced color for icons.
Definition: CartoTypeWrapper.h:1375
Color BorderColor
If not null, the color to be blended with border colors.
Definition: CartoTypeWrapper.h:1369
Color TextColor
If not null, the color to be blended with text colors.
Definition: CartoTypeWrapper.h:1371
String^ Styles
A space or comma separated list of wild-card style names. The special name '[legend]' is used for the...
Definition: CartoTypeWrapper.h:1365
Color TextGlowColor
If not null, the color to be blended with text glow colors.
Definition: CartoTypeWrapper.h:1373
A set of rules for modifying style sheet colors, for example to add contrast, lighten or darken....
Definition: CartoTypeWrapper.h:1383
A color>
Definition: CartoTypeWrapper.h:1285
static const Color KMagenta
Opaque magenta.
Definition: CartoTypeWrapper.h:1339
static const Color KYellow
Opaque yellow.
Definition: CartoTypeWrapper.h:1335
static const Color KBlack
Opaque black.
Definition: CartoTypeWrapper.h:1315
int Green
The green component as a value in the range 0...255.
Definition: CartoTypeWrapper.h:1304
static const Color KDarkRed
Opaque dark red.
Definition: CartoTypeWrapper.h:1319
static const Color KGray
Opaque gray.
Definition: CartoTypeWrapper.h:1343
static const Color KRed
Opaque red.
Definition: CartoTypeWrapper.h:1331
static const Color KDarkCyan
Opaque dark cyan.
Definition: CartoTypeWrapper.h:1329
static const Color KTransparentBlack
The 'null color' transparent black.
Definition: CartoTypeWrapper.h:1348
Color(int aRed, int aGreen, int aBlue)
Creates a color from red, green, and blue values.
Definition: CartoTypeWrapper.h:1290
int Value
The color value as a 32-bit integer.
Definition: CartoTypeWrapper.h:1351
static const Color KDarkYellow
Opaque dark yellow.
Definition: CartoTypeWrapper.h:1323
bool IsNull
Returns true if the colour is null.
Definition: CartoTypeWrapper.h:1312
int Alpha
The alpha (transparency) level as a value in the range 0...255: 0 = transparent, 255 = opaque.
Definition: CartoTypeWrapper.h:1310
int Red
The red component as a value in the range 0...255.
Definition: CartoTypeWrapper.h:1302
static const Color KDarkGray
Opaque dark gray.
Definition: CartoTypeWrapper.h:1317
Color(int aValue)
Creates a color from an integer value.
Definition: CartoTypeWrapper.h:1288
static const Color KGreen
Opaque green.
Definition: CartoTypeWrapper.h:1333
int Blue
The blue component as a value in the range 0...255.
Definition: CartoTypeWrapper.h:1306
static const Color KWhite
Opaque white.
Definition: CartoTypeWrapper.h:1345
static const Color KBlue
Opaque blue.
Definition: CartoTypeWrapper.h:1337
static const Color KDarkGreen
Opaque dark green.
Definition: CartoTypeWrapper.h:1321
static const Color KDarkBlue
Opaque dark blue.
Definition: CartoTypeWrapper.h:1325
static const Color KCyan
Opaque cyan.
Definition: CartoTypeWrapper.h:1341
static const Color KDarkMagenta
Opaque dark magenta.
Definition: CartoTypeWrapper.h:1327
int Gray
The gray level (average of red, green and blue levels) as a value in the range 0.....
Definition: CartoTypeWrapper.h:1308
Color(int aRed, int aGreen, int aBlue, int aAlpha)
Creates a color from red, green, blue and alpha values.
Definition: CartoTypeWrapper.h:1295
Positions for notices like the legend or scale bar.
Definition: CartoTypeWrapper.h:1093
ExtendedNoticePosition(NoticePosition aBasePosition)
Creates an ExtendedNoticePosition from a base position.
ExtendedNoticePosition(NoticePosition aBasePosition, double aXInset, String^ aXInsetUnit, double aYInset, String^ aYInsetUnit)
Creates an ExtendedNoticePosition from a base position, insets, and units in which the insets are def...
Feature information for a map object, represented internally as a 32-bit value.
Definition: CartoTypeFeatureInfo.h:390
Parameters for finding nearby places.
Definition: CartoTypeWrapper.h:136
FeatureType Type
The type of place to search for. The value FeatureType::Invalid causes Text only to be used.
Definition: CartoTypeWrapper.h:141
String^ Text
The name, full or partial, of the place.
Definition: CartoTypeWrapper.h:143
Geometry^ Location
The location of interest.
Definition: CartoTypeWrapper.h:145
Parameters for the general Find function.
Definition: CartoTypeWrapper.h:150
Geometry^ Location
The current location. If it is non-empty, objects in or near this region are preferred.
Definition: CartoTypeWrapper.h:161
double TimeOut
The maximum time in seconds allowed for a find operation. Find operations are not guaranteed to retur...
Definition: CartoTypeWrapper.h:189
StringMatchMethod StringMatchMethod
The string matching method used for text searching; default = StringMatchExact.
Definition: CartoTypeWrapper.h:177
String^ Attributes
Attributes used in text searching (if Text is not empty). If Attributes is empty, all attributes are ...
Definition: CartoTypeWrapper.h:170
String^ Layers
A list of layer names separated by spaces or commas. If it is null or empty all layers are searched....
Definition: CartoTypeWrapper.h:163
Geometry^ Clip
The clip path; no clipping is done if Clip is null or empty.
Definition: CartoTypeWrapper.h:159
bool Merge
If Merge is true adjoining objects with the same name and attributes may be merged into a single obje...
Definition: CartoTypeWrapper.h:184
String^ Text
The text to search for. Unless null or empty, restricts the search to objects containing Text in one ...
Definition: CartoTypeWrapper.h:175
int MaxObjectCount
The maximum number of objects to return; default = INT32_MAX.
Definition: CartoTypeWrapper.h:157
String^ Condition
Unless null or empty, a style sheet condition (e.g., "@sub_type=2") which must be fulfilled by all th...
Definition: CartoTypeWrapper.h:182
The Framework class provides a high-level API for CartoType, through which map data can be loaded,...
Definition: CartoTypeWrapper.h:1417
void EnableMapByHandle(int aHandle, bool aEnable)
Enables or disables a map, selecting it by handle.
void SetStyleSheetVariable(String^ aVariableName, String^ aValue)
Sets a style sheet variable to a string value.
array< Byte > ^ HandleQuery(String^ aQuery, array< Byte >^ aData)
Handles a query sent over a communication system such as HTTP. The query requests data from the main ...
Result 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,...
void AppendStyleSheet(String^ aStyleSheetFileName)
Loads an extra style sheet from a file. Extra style sheets are compiled after the main style sheet.
Framework(String^ aMapFileName, String^ aStyleSheetFileName, String^ aFontFileName, int aViewWidth, int aViewHeight, array< Byte >^ aEncryptionKey)
Creates a CartoType framework with an encrypted map, style sheet, font, and view size in pixels.
double MetersToPixels(double aMeters)
Converts a distance in map meters (projected meters) to pixels.
double TrackLengthInMeters
Returns the length of the current track in meters.
Definition: CartoTypeWrapper.h:2760
int RouteCount
The number of routes; zero if not navigating.
Definition: CartoTypeWrapper.h:2382
TimeAndDistanceMatrix ^ TimeAndDistanceMatrix(Result% aResult, array< PointValue >^ aFrom, array< PointValue >^ aTo, CoordType aCoordType)
Returns a vector of route times in seconds and distances in metres from aFrom to all points in aTo.
Result Rotate(double aAngle)
Rotates the map by an angle given in degrees.
Result InsertCopyOfMapObject(int aMapHandle, String^ aLayerName, MapObject^ aObject, double aEnvelopeRadius, CoordType aRadiusCoordType, Int64% aId, bool aReplace)
Inserts an object by copying an existing object.
Result FindPolygonsContainingPath(MapObjectList^ aObjectList, Geometry^ aPath, FindParam^ aFindParam)
Finds all polygon objects containing a certain path.
Geometry^ Track
Returns the current track as a geometry object with coordinates in degrees. Each segment of the track...
Definition: CartoTypeWrapper.h:2757
Result StartNavigation(double aStartX, double aStartY, CoordType aStartCoordType, double aEndX, double aEndY, CoordType aEndCoordType)
Starts navigating between the specified points. Call Navigate as needed to supply the vehicle positio...
int NavigationDistanceOffRouteTolerance
Sets the maximum time off route in seconds before a new route is calculated.
Definition: CartoTypeWrapper.h:2497
Result FindAsync(FindAsyncDelegate^ aDelegate, FindParam^ aFindParam, bool aOverride)
Performs a general find operation asynchronously.
Result CreateWritableMap(WritableMapType aType)
Creates a writable (editable) map of the specified type and loads it.
bool TurnInstructionsEnabled
Enables or disables the drawing of a turn instruction notice that has been supplied using SetTurnInst...
Definition: CartoTypeWrapper.h:1463
NavigationState NavigationState
The current navigation state.
Definition: CartoTypeWrapper.h:2480
MapObjectList ^ CopyNearbyObjects()
Returns copies of all the objects for which nearby object warnings exist.
String^ Copyright
Returns the copyright string stored in the main map database.
Definition: CartoTypeWrapper.h:1441
void SetCopyrightNotice()
Sets the copyright notice displayed at the bottom-right corner of the map to that of the main map dat...
bool DisplayTrack
Whether the track is displayed.
Definition: CartoTypeWrapper.h:2752
Result ConvertPoint(Point^ aPoint, CoordType aFromCoordType, CoordType aToCoordType)
Converts a point between display pixels, map coordinates and degrees longitude and latitude.
Result LoadMap(String^ aMapFileName)
Loads a map to be overlaid on the current map.
double LabelFPS
The number of frames per second used when drawing labels. Clamped to the range 1.....
Definition: CartoTypeWrapper.h:1633
Result SetViewToWholeMap()
Shows the whole map, zooming out as far as necessary.
void SetCopyrightNotice(String^ aCopyright)
Sets the copyright notice displayed at the bottom-right corner of the map.
String^ DataSetName
Returns the name of the data in the main map database.
Definition: CartoTypeWrapper.h:1865
Color NightModeColor
The night mode color, which should be a dark color (although this is not enforced).
Definition: CartoTypeWrapper.h:2115
Result GetAddressFast(Address^ aAddress, MapObject^ aMapObject)
Creates an address for a map object, using attributes of the object only. Returns ErrorNotFound if th...
void Pan(int aDx, int aDy)
Moves the map by aDx pixels horizontally and aDy pixels vertically.
String ^ WriteRouteAsXmlString(CartoType::Route^ aRoute, FileType aFileType)
Writes a route as XML string in the format selected by aFileType: CartoTypeRoute or Gpx.
bool DeleteNearbyObjectWarning(int aId)
Deletes the nearby object warning or vehicle type warning with an ID of aId and returns true if any s...
Drawing::Bitmap ^ MemoryDataBaseMapBitmap()
Returns a bitmap containing a map drawn using objects from the in-memory database only,...
Route ^ Route(int aRouteIndex)
Returns one of the current routes. Returns null if not navigating.
Result ConvertCoords(Geometry^ aGeometry, CoordType aToCoordType)
Converts the coordinates of a geometry object to another coordinate type.
Result CreateBestRouteAsync(RouterAsyncDelegate^ aDelegate, RouteProfile^ aProfile, RouteCoordSet^ aCoordSet, bool aStartFixed, bool aEndFixed, int aIterations, bool aOverride)
An asynchronous version of CreateBestRoute.
void AppendStyleSheet(array< Byte >^ aData)
Loads an extra style sheet from data in memory. Extra style sheets are compiled after the main style ...
Result ChooseRoute(int aRouteIndex)
Chooses one among a set of alternative routes.
String^ ExpiryDate
Returns the expiry date of the license in the form YYYY-MM-DD.
Definition: CartoTypeWrapper.h:1437
NavigatorParam^ NavigatorParam
Parameters affecting the working of the navigation system.
Definition: CartoTypeWrapper.h:2482
Result LoadFont(String^ aFontFileName)
Loads a font in addition to those already loaded.
void DrawNoticesAutomatically(bool aEnable)
Controls whether notices (the scale bar, legend and copyright notice) are drawn automatically....
String ^ GeoCodeSummary(double aX, double aY, CoordType aCoordType)
Returns a string summarizing a geocode for a geographical location.
int NavigationMinimumFixDistance
Sets the minimum distance between location fixes in metres that is taken as an actual move.
Definition: CartoTypeWrapper.h:2493
static const int KMaxRoutesDisplayed
The maximum number of different routes which can be calculated using route profiles and displayed sim...
Definition: CartoTypeWrapper.h:2769
double ResolutionDpi
The display resolution used by CartoType in dots per inch. It has to be set correctly for map scaling...
Definition: CartoTypeWrapper.h:1605
Result 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 degree...
void SetView(MapObject^ aMapObject, int aMarginInPixels, int aMinScaleDenominator)
Sets the view to show a single map object, with a margin in pixels, and at a minimum scale.
Result InsertCircleMapObject(int aMapHandle, String^ aLayerName, double aCenterX, double aCenterY, CoordType aCenterCoordType, double aRadius, CoordType aRadiusCoordType, String^ aStringAttributes, FeatureInfo^ aFeatureInfo, Int64% aId, bool aReplace)
Inserts a circle map object into one of the maps, identifying the map by its handle....
Result ReloadStyleSheet(int aIndex)
Reloads a sheet from the file it was originally loaded from.
Framework(FrameworkParam^ aParam)
Creates a CartoType framework from parameters contained in a FrameworkParam object.
Result DeleteStyleSheet(int aIndex)
Deletes the style sheet with the specified index.
Drawing::Bitmap ^ TileBitmap(int aTileSizeInPixels, int aZoom, int aX, int aY)
Returns a bitmap containing a tile specified by zoom, x and y coordinates using the OSM tile scheme.
Result AddPolygonSpeedLimit(Int64% aId, Geometry^ aPolygon, double aSpeed, int aVehicleTypes)
Adds a speed limit in kph, to be used when calculating routes, to all roads in a certain polygon.
bool FixedLabels
True if labels are drawn, as far as possible, in fixed positions, and not moved when the map is panne...
Definition: CartoTypeWrapper.h:1635
Result GetContourAreaAndLength(Geometry^ aGeometry, int 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 m...
bool ScaleBarEnabled
Enables or disables the drawing of a scale bar that has been supplied using SetScale.
Definition: CartoTypeWrapper.h:1457
Result SetStyleSheet(array< Byte >^ aData, int aIndex)
Sets a style sheet by loading it from data in memory.
void SetLegend(Legend^ aLegend, double aWidth, String^ aUnit, NoticePosition aPosition)
Sets the legend: map key or scale or both.
Result EditInsertCurrentObject(String^ aLayer, Int64% aId, bool aReplace)
Inserts the currently edited object into a chosen layer.
Result ReadMap(int aHandle, String^ aFileName, FileType aFileType)
Reads map data from aFileName in the format given by aFileType and merge it into the map identified b...
Result SetViewToRoute(int aRouteIndex, int aMarginInPixels, int aMinScaleDenominator)
Sets the view to show a route selected by its index (0 for the main route), with a margin in pixels,...
double ZoomLevelFromScaleDenominator(double aScaleDenominator, int aImageSizeInPixels)
Calculates the Open Street Map zoom level (0 maps the length of the equator to aImageSizeInPixels pix...
Result InsertPushPin(double aX, double aY, CoordType aCoordType, String^ aStringAttributes, String^ aColor, int aIconCharacter, Int64% aId)
Inserts a pushpin: a point object belonging to the 'pushpin' layer. The pushpin is inserted into the ...
bool AnimateTransitions
Whether transitions are smoothly animated in graphics-accelerated drawing.
Definition: CartoTypeWrapper.h:1631
String ^ SetCase(String^ aString, LetterCase aCase)
Sets the letter case of a string.
Result Find(MapObjectList^ aObjectList, FindParam^ aFindParam)
A general search function, allowing any combination of clip rectangle, choice of layers,...
String ^ TimeToString(double aTimeInSeconds)
Returns a time duration as a string containing locale-dependent words for hours, minutes and seconds.
bool TrafficInfoEnabled
Whether traffic information is used when routing.
Definition: CartoTypeWrapper.h:2733
Result FindAddress(MapObjectList^ aObjectList, int aMaxObjectCount, Address^ aAddress, bool aFuzzy)
Finds objects matching the specified address, which must have at least one field that is not empty.
Result EditNewPolygonObject(double aX, double aY)
Creates a new editable polygon object starting at the specified point in display coordinates.
double EstimatedTimeToDestination
Returns the estimated time to the destination in seconds. Return zero if there is no route.
Definition: CartoTypeWrapper.h:2543
Result UnloadMapByHandle(int aHandle)
Unloads a map, selecting it by handle. It is illegal to unload the main map database or the in-memory...
String^ TrackAsXmlString
Writes the current track to a string as XML in GPX format.
Definition: CartoTypeWrapper.h:2766
Turn^ FirstTurn
The first turn during navigation.
Definition: CartoTypeWrapper.h:2461
double Rotation
The angle of the map in degrees, measured clockwise from north-up.
Definition: CartoTypeWrapper.h:1654
Result WriteMapImage(String^ aFileName, FileType aFileType, bool aCompress)
Writes a map image to a file of the specified type. Only the PNG file type is supported....
Result Zoom(double aZoomFactor)
Zooms the map by the specified factor: positive to zoom in, negative to zoom out.
void EndTracking()
Stops tracking (storing and displaying track points). Does not delete the current track.
RouteProfile ^ BuiltInProfile(int aIndex)
Returns a built-in routing profile selected by its index, or null if the index is out of range.
double DistanceInMeters(double aX1, double aY1, double aX2, double aY2, CoordType aCoordType)
Returns the great-circle distance in meters, assuming a spherical earth, between two points.
void StartTracking()
Starts tracking (storing and displaying track points) and starts a new track segment....
Result GetMapExtent(Rect^ aExtent, CoordType aCoordType)
Returns the extent of the map in display pixels, map coordinates or degrees longitude and latitude.
RouteProfile ^ Profile(int aIndex)
Returns one of the active route profiles, or null if the index is out of range. The index 0 always wo...
int BuiltInProfileCount
Returns the number of built-in routing profiles owned by the router.
Definition: CartoTypeWrapper.h:2334
Result DeleteRoutes()
Deletes all routes.
BlendStyleSet^ BlendStyleSet
The blend style. To remove the current blend style, set it to null or empty.
Definition: CartoTypeWrapper.h:2121
Result AddForbiddenArea(Int64% aId, Geometry^ aPolygon)
Marks a certain polygon as forbidden for routing.
Result StartNavigation(RouteCoordSet^ aCoordSet)
Starts navigating through a series of at least two points. Call Navigate as needed to supply the vehi...
Result GetAddress(Address^ aAddress, MapObject^ aMapObject)
Creates an address for a map object.
Result EditDeleteCurrentObject()
Deletes the current editable object.
Result SetMainProfile(RouteProfile^ aProfile)
Sets the main routing profile.
Result AddTrafficInfo(Int64% aId, TrafficInfo^ aTrafficInfo, LocationRef^ aLocationRef)
Adds traffic information, such as a speed restriction, prohibition on the use of a route,...
Result GetAreaAndLength(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 met...
Result InsertPointMapObject(int aMapHandle, String^ aLayerName, double aX, double aY, CoordType aCoordType, String^ aStringAttributes, FeatureInfo^ aFeatureInfo, Int64% aId, bool aReplace)
Inserts a point object into one of the writable maps, identifying it by its handle....
bool Draw3DBuildings
Whether buildings are drawn in 3D where data is available.
Definition: CartoTypeWrapper.h:1627
Result GetView(Rect^ aView, CoordType aCoordType)
Returns the view rectangle in display pixels, map coordinates or degrees longitude and latitude.
Result EditDeleteCurrentPoint()
Deletes the editable object's current point unless that would result in a line object of fewer than 2...
Framework(String^ aMapFileName, String^ aStyleSheetFileName, String^ aFontFileName, int aViewWidth, int aViewHeight)
Creates a CartoType framework with a map, style sheet, font, and view size in pixels.
bool MapIsEmpty(int aHandle)
Return true if a map, identified by its handle, is known to be empty or does not exist.
Result LoadMap(String^ aMapFileName, array< Byte >^ aEncryptionKey)
Loads an encrypted map to be overlaid on the current map.
int Height(double aX, double aY, CoordType aCoordType)
Returns the height in metres at a single point, or -32768 if it is unavailable.
double ScaleDenominatorFromZoomLevel(double aZoomLevel, int aImageSizeInPixels)
Calculates the scale denominator at the equator for a certain Open Street Map zoom level (0 maps the ...
int MemoryMapHandle
The handle of the in-memory map used for routing.
Definition: CartoTypeWrapper.h:1549
Result DeleteTrafficInfo(Int64 aId)
Deletes traffic information: a speed limit, forbidden area, or other information, referring to it by ...
int NavigationTimeOffRouteTolerance
Sets the maximum distance from the route in metres before the vehicle is deemed off-route.
Definition: CartoTypeWrapper.h:2495
Result SetBuiltInProfile(int aIndex)
Selects a built-in routing profile by its index.
Result EditSelectNearestPoint(double aX, double aY, double aRadiusInMillimeters)
Selects an editable object by selecting the nearest point of any editable object within a given radiu...
Result EditSetCurrentObjectStringAttribute(String^ aKey, String^ aValue)
Sets a string attribute in the currently edited object. If aKey is empty, sets the label....
RouterType ActualRouterType
The actual router type.
Definition: CartoTypeWrapper.h:2190
Result StartNavigation(array< double >^ aX, array< double >^ aY, CoordType aCoordType)
A version of StartNavigation taking separate arrays of X and Y coords.
Result WriteTrackAsXml(String^ aFileName)
Writes the current track to a file as XML in GPX format.
Result FindInLayer(MapObjectList^ aObjectList, int aMaxObjectCount, String^ aLayer, double aMinX, double aMinY, double aMaxX, double aMaxY, CoordType aCoordType)
Finds all objects in a named layer or list of layers (space or comma separated), within specified bou...
Result DisplayPositionOnNearestRoad(double aLong, double aLat, double aHeadingInDegrees, NearestRoadInfo^ aInfo)
Moves the route position object and the route vector object to the nearest point on a road.
Result SetViewLimits(double aMinScaleDenominator, double aMaxScaleDenominator, Geometry^ aPanArea)
Sets the limits to zooming and panning.
bool LegendEnabled
Enables or disables the drawing of a legend that has been supplied using SetLegend.
Definition: CartoTypeWrapper.h:1451
LocationMatchParam^ LocationMatchParam
The current location match parameters.
Definition: CartoTypeWrapper.h:2491
void SetVehiclePosOffset(double aXOffset, double aYOffset)
Sets the vehicle position when navigating as an offset from the center of the display,...
Result EditGetCurrentObjectAreaAndLength(double% aArea, double% aLength)
Returns the area and length of the currently edited object. For line objects returns 0 and the length...
double LabelUpAngle
The up direction for labels as an angle in degrees measured clockwise from straight up.
Definition: CartoTypeWrapper.h:1637
void DeleteTrack()
Deletes the current track. Does not affect whether tracking is on or off.
Result LoadNavigationData()
Loads navigation data for the current map.
Result FindText(MapObjectList^ aObjectList, int aMaxObjectCount, String^ aText, StringMatchMethod aMatchMethod, String^ aLayers, String^ aAttrib)
Finds objects with attributes matching aText.
Result GetNavigationPosition(Point^ aPos, CoordType aCoordType)
Gets the current position used by the navigation system. This may be an extrapolated position.
Result Find(MapObjectGroupList^ aObjectGroupList, FindParam^ aFindParam)
A search function to make interactive searching easier. It returns map objects grouped by names which...
Result ReadMap(int aHandle, array< Byte >^ aData)
Reads map data from aData in CTMS format and merges it into the map identified by aHandle,...
Route ^ CreateRoute(Result% aResult, RouteProfile^ aProfile, RouteCoordSet^ aCoordSet)
Creates a route without starting navigation, supplying a route profile and waypoints.
Result 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.
Result EditSetWritableMap(int aMapHandle)
Sets the map used to store editable objects. Does not affect objects already created....
Result Find(MapObjectList^ aObjectList, FindNearbyParam^ aFindNearbyParam)
Finds nearby objects, allowing a choice of point of interest type, name and location.
bool LayerIsEnabled(String^ aLayerName)
Returns the enabled status of a named layer. When a layer is disabled it is not drawn but is still se...
void ClearTrafficInfo()
Deletes all speed restrictions, forbidden areas and other traffic information.
Result EditMoveCurrentPoint(double aX, double aY)
Moves the editable object's current point if any to the specified point in display coordinates.
Route ^ CreateRouteFromXml(Result% aResult, RouteProfile^ aProfile, String^ aFilenameOrData)
Creates a route by reading it from XML data in GPX or CartoType route format.
Result CreateWritableMap(WritableMapType aType, String^ aFileName)
Creates a writable (editable) map of the specified type, supplying a filename, and loads it.
int SetNearbyObjectWarning(int aId, String^ aLayer, String^ aCondition, double aMaxDistance, int aMaxObjectCount)
Adds or replaces a nearby object warning.
String^ TurnInstructionText
The instruction to be displayed for the current turn. This property returns an empty string if turn i...
Definition: CartoTypeWrapper.h:1476
Result FindAddressAsync(FindAsyncDelegate^ aDelegate, int aMaxObjectCount, Address^ aAddress, bool aFuzzy, bool aOverride)
An asynchronous address finding function.
Result Resize(int aViewWidth, int aViewHeight)
Sets the map to a new size in pixels.
Result ReverseRoutes()
Reverses the order of the current route points, recreates the route or routes, and displays them on t...
Result EditAddCurrentPoint()
Adds a new point to the editable object by copying the current point.
bool ClipBackgroundToMapBounds(bool aEnable)
Enables or disables clipping the map background to the map bounds.
Result DisplayRoute(bool aEnable)
If enabled, displays the current route and a maximum of 2 alternative routes. If not,...
Route ^ CreateRoute(Result% aResult, RouteProfile^ aProfile, array< double >^ aX, array< double >^ aY, CoordType aCoordType)
A version of CreateRoute taking separate arrays of X and Y coords.
Result InsertEnvelopeMapObject(int aMapHandle, String^ aLayerName, Geometry^ aGeometry, double aRadius, CoordType aRadiusCoordType, String^ aStringAttributes, FeatureInfo^ aFeatureInfo, Int64% aId, bool aReplace)
Inserts a map object that is an envelope around some geometry, at a radius of aRadius; it can also be...
void EnableLayer(String^ aLayerName, bool aEnable)
Enables or disables a named map layer.
Result LoadIcon(String^ aFileName, String^ aId, int aHotSpotX, int aHotSpotY, int aLabelX, int aLabelY)
Loads an icon from a file. It will be used whenever the ID aId is referenced in the style sheet,...
bool ClearNearbyObjectWarnings()
Clears all nearby object warnings, and the objects themselves, and returns true if any objects were d...
void SetScaleBar(bool aMetricUnits, double aWidth, String^ aUnit, NoticePosition aPosition)
Creates a scale bar in either metric or imperial units, with a specified width and position in the di...
void EndNavigation()
Stops navigating. Current routes remain in existence. Navigation can be resumed using startNavigation...
void UnloadIcon(String^ aId)
Unloads an icon previously loaded using LoadIcon.
MapMetaData ^ MapMetaData(int aIndex)
Returns the metadata for a map, identified by its index, if available. Returns null if no metadata is...
Geometry ^ Range(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 distan...
Result SetViewCenter(double aX, double aY, CoordType aCoordType)
Sets the center of the view to a point given in display pixels, map coordinates or degrees longitude ...
Result EditSetCurrentObjectFeatureInfo(FeatureInfo^ aFeatureInfo)
Sets the feature info of the currently edited object. If aFeatureInfo is null the default feature is ...
Result SaveMap(int aHandle, String^ aFileName, FileType aFileType)
Saves a map identified by its handle by writing it the specified format. Only writable map databases ...
Result Configure(String^ aConfigFileName)
Configures the CartoType framework by reading an XML configuration file.
Result UseRoute(Route^ aRoute, bool aReplace)
Use an existing route and display it.
Turn^ ContinuationTurn
The continuation turn during navigation.
Definition: CartoTypeWrapper.h:2478
Result DeleteMapObjects(int aMapHandle, Int64 aStartId, Int64 aEndId, Int64% aDeletedCount, String^ aCondition)
Deletes map objects with IDs in the range aStartId...aEndId inclusive. If aCondition is non-null,...
Result SetView(double aX1, double aY1, double aX2, double aY2, CoordType aCoordType, int aMarginInPixels, int aMinScaleDenominator)
Sets the view to show a certain rectangle, with a margin in pixels, and at a minimum scale.
bool Perspective
Perspective mode: on or off.
Definition: CartoTypeWrapper.h:1623
Result LoadFont(array< Byte >^ aData)
Loads a font from data in memory.
void DrawMemoryDataBase(bool aEnable)
Enables or disables the drawing of the in-memory database when the rest of the map is drawn.
MapObject ^ LoadMapObject(int aMapHandle, Int64 aId)
Loads a map object, identifying it by its map handle and ID. Returns null if the object does not exis...
int SetTileOverSizeZoomLevels(int aLevels)
The number of zoom levels by which to zoom out when creating a tile bitmap returned by TileBitmap().
PositionedBitmap ^ NoticeBitmap()
Returns a bitmap containing notices (legend and copyright notice). Turns off automatic drawing of not...
String^ AppBuildDate
Returns the date on which the application was built in the form YYYY-MM-DD.
Definition: CartoTypeWrapper.h:1439
bool MutuallyAccessible(Result% aResult, array< PointValue >^ aPointArray, CoordType aCoordType, array< int >^ aGroupArray)
Determines the mutual accessibility of a set of points for routing purposes, using the current routin...
Result AddProfile(RouteProfile^ aProfile)
Adds a new routing profile.
double DistanceToDestination
Returns the distance to the destination in metres. Return zero if there is no route.
Definition: CartoTypeWrapper.h:2541
int MapHandle(int aIndex)
Returns the handle of one of the currently loaded maps. Returns 0 if aIndex is out of range.
Result RotateAt(double aAngle, double aX, double aY, CoordType aCoordType)
Rotates the map about a specified point by an angle given in degrees.
Result License(String^ aKey)
Licenses the CartoType framework by supplying a key.
Result AddLineSpeedLimit(Int64% aId, Geometry^ aLine, double aSpeed, int aVehicleTypes)
Adds a speed limit in kph, to be used when calculating routes, to a route defined by a series of poin...
Result InsertEllipseMapObject(int aMapHandle, String^ aLayerName, double aCenterX, double aCenterY, CoordType aCenterCoordType, double aRadiusX, double aRadiusY, CoordType aRadiusCoordType, double aRotationDegrees, String^ aStringAttributes, FeatureInfo^ aFeatureInfo, Int64% aId, bool aReplace)
Inserts an ellipse map object into one of the maps, identifying the map by its handle....
bool NavigationEnabled
Whether navigation is enabled. When navigation is disabled, the follow modes work but no navigation i...
Definition: CartoTypeWrapper.h:2295
int MainMapHandle
The handle of the main map.
Definition: CartoTypeWrapper.h:1547
bool MapIsWritable(int aIndex)
Returns true if the indexed map is writable.Returns false if aIndex is out of range.
Result AddClosedLineSpeedLimit(Int64% aId, Geometry^ aLine, double aSpeed, int aVehicleTypes)
Adds a speed limit in kph, to be used when calculating routes, to a polygon which is the interior of ...
double ScaleDenominatorInView
The scale denominator for the current view, adjusting for any projection distortion: for example,...
Definition: CartoTypeWrapper.h:1609
Result FindInDisplay(MapObjectList^ aObjectList, int aMaxObjectCount, double aX, double aY, double aRadius)
Finds all objects within aRadius of the point aX,aY on the display.
Result Navigate(int aValidity, double aTime, double aLong, double aLat, double aSpeed, double aBearing, double aHeight)
Updates the vehicle position and, if navigating, updates the navigation state.
bool Tracking
Returns true if tracking (storing and displaying track points) is on.
Definition: CartoTypeWrapper.h:2749
String ^ GeoCodeSummary(MapObject^ aMapObject)
Returns a string summarizing a geocode for a map object.
Result SaveMap(int aHandle, array< Byte >^ aData, FindParam^ aFindParam)
Saves selected objects to a map identified by its handle by writing them as an array of bytes in CTMS...
Result SetTurnInstructions(bool aMetricUnits, bool aAbbreviate, double aWidth, String^ aWidthUnit, NoticePosition aPosition, double aTextSize, String^ aTextSizeUnit)
Creates turn instructions in either metric or imperial units, with a specified width and position in ...
Route ^ CreateBestRoute(Result% aResult, RouteProfile^ aProfile, array< double >^ aX, array< double >^ aY, CoordType aCoordType, bool aStartFixed, bool aEndFixed, int aIterations)
A version of CreateBestRoute taking separate arrays of X and Y coords.
Result WriteRouteAsXml(CartoType::Route^ aRoute, String^ aFileName, FileType aFileType)
Writes a route as XML in the format selected by aFileType: CartoTypeRoute or Gpx.
Turn^ SecondTurn
The second turn during navigation.
Definition: CartoTypeWrapper.h:2469
Result FindPointsInPath(MapObjectList^ aObjectList, Geometry^ aPath, FindParam^ aFindParam)
Finds all point objects contained in a certain path.
Result SetStyleSheet(String^ aStyleSheetFileName, int aIndex)
Sets a style sheet by loading it from a file. The index aIndex determines which style sheet to replac...
String^ Licensee
The name of the licensee. It is "no licensee: for evaluation only" if there is no licensee.
Definition: CartoTypeWrapper.h:1435
Result GetHeights(array< double >^ aX, array< double >^ aY, array< int >^ aTerrainHeightArray, CoordType aCoordType)
Finds the heights of a set of points in the specified coordinate type. Heights are returned in metres...
Result ReadRouteFromXml(String^ aFileNameOrData, bool aReplace)
Reads a route from XML (a GPX file or a CartoType route file) and displays it.
String ^ DistanceToString(double aDistanceInMeters, bool aMetricUnits, bool aAbbreviate)
Returns a distance as a string containing locale-dependent words for kilometres, metres,...
bool HasNotices
Returns true if any notices such as a scale bar, legend or copyright notice exist.
Definition: CartoTypeWrapper.h:1480
Drawing::Bitmap ^ MapBitmap()
Returns a bitmap containing the current map.
RouterType PreferredRouterType
The preferred type of router to be used for calculating routes.
Definition: CartoTypeWrapper.h:2176
bool NightMode
In night mode the map is shaded dark blue and roads are made brighter than other features.
Definition: CartoTypeWrapper.h:2104
void SetTurnInstructionText(String^ aText)
Sets the instruction to be displayed for the current turn, overriding automatically generated instruc...
Result ReadGpx(int aMapHandle, String^ aFileName)
Reads route and track objects from a GPX file and inserts them into the map identified by aMapHandle....
List< String^>^ LayerNames
Returns the names of all the layers in the map data.
Definition: CartoTypeWrapper.h:1601
Result SetView(MapObjectList^ aObjectList, int aMarginInPixels, int aMinScaleDenominator)
Sets the view to show a group of map objects, with a margin in pixels, and at a minimum scale.
String^ ProjectionAsProj4Param
Returns the current map projection as a proj.4 parameter string if possible. If not returns the empty...
Definition: CartoTypeWrapper.h:1695
void EnableAllMaps()
Enables all currently loaded maps.
Result CreateRouteAsync(RouterAsyncDelegate^ aDelegate, RouteProfile^ aProfile, RouteCoordSet^ aCoordSet, bool aOverride)
Creates a route asynchronously and calls aCallback (from a different thread) with the created route a...
Route ^ CreateBestRoute(Result% aResult, RouteProfile^ aProfile, RouteCoordSet^ aCoordSet, bool aStartFixed, bool aEndFixed, int aIterations)
Creates an optimized route to visit a series of waypoints in any order.
int LastMapHandle
The handle of the map most recently loaded.
Definition: CartoTypeWrapper.h:1545
Result StartNavigationDeferred(RouteCoordSet^ aCoordSet)
Starts navigating through a series of at least two points. Call Navigate as needed to supply the vehi...
int SetVehicleTypeWarning(double aMaxDistance, int aMaxObjectCount)
Adds a vehicle type warning and returns its ID. Road sections illegal for the current vehicle weight,...
Result 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,...
double ScaleDenominator
The current scale denominator. Use the denominator 50000 for a scale of 1:50,000.
Definition: CartoTypeWrapper.h:1607
Result SetTurnInstructions(bool aMetricUnits, bool aAbbreviate, double aWidth, String^ aWidthUnit, ExtendedNoticePosition^ aPosition, double aTextSize, String^ aTextSizeUnit)
Creates turn instructions in either metric or imperial units, with a specified width and position in ...
double PixelsToMeters(double aPixels)
Converts a distance in pixels to map meters (projected meters).
Result InsertMapObject(int aMapHandle, String^ aLayerName, Geometry^ aGeometry, String^ aStringAttributes, FeatureInfo^ aFeatureInfo, Int64% aId, bool aReplace)
Inserts a map object into one of the writable maps. The type of the map object (point,...
String^ Locale
The locale used when getting the names of map objects when routing, geocoding, etc....
Definition: CartoTypeWrapper.h:2581
int MapCount
Returns the number of maps currently loaded, including the main map and the in-memory map.
Definition: CartoTypeWrapper.h:1528
Result EditNewLineObject(double aX, double aY)
Creates a new editable line object starting at the specified point in display coordinates.
Result Pan(double aFromX, double aFromY, CoordType aFromCoordType, double aToX, double aToY, CoordType aToCoordType)
Pans (slides) the map so that the position aFrom moves to aTo.
String ^ RouteInstructions(Route^ aRoute)
Returns instructions for a route in the language of the current locale, or in English if that languag...
Result FindAsync(FindAsyncGroupDelegate^ aDelegate, FindParam^ aFindParam, bool aOverride)
An asynchronous find function to make interactive searching easier.
Result SetView(Geometry^ aGeometry, int aMarginInPixels, int aMinScaleDenominator)
Sets the view to show a certain geometry, with a margin in pixels, and at a minimum scale.
Parameters for creating a Framework object when more detailed control is needed. For example,...
Definition: CartoTypeWrapper.h:1242
String^ StyleSheetFileName
The style sheet. If this string is null or empty, the style sheet must be supplied in m_style_sheet_t...
Definition: CartoTypeWrapper.h:1253
int MaxFileBufferCount
The maximum number of file buffers. If it is zero or less the default value is used.
Definition: CartoTypeWrapper.h:1267
String^ EncryptionKey
If non-null, an encryption key to be used when loading the map.
Definition: CartoTypeWrapper.h:1263
String^ MapFileName
The map. Must not be null or empty.
Definition: CartoTypeWrapper.h:1251
String^ FontFileName
The font. If it is null or empty a small default font is used.
Definition: CartoTypeWrapper.h:1257
int ViewHeight
The height of the map in pixels. Must be greater than zero.
Definition: CartoTypeWrapper.h:1261
int TextIndexLevels
The number of levels of the text index to load into RAM. Use values from 1 to 5 to save RAM but make ...
Definition: CartoTypeWrapper.h:1274
String^ StyleSheetText
The style sheet text. Used if m_style_sheet_filename is null or empty.
Definition: CartoTypeWrapper.h:1255
int ViewWidth
The width of the map in pixels. Must be greater than zero.
Definition: CartoTypeWrapper.h:1259
int FileBufferSizeinBytes
The file buffer size in bytes. If it is zero or less the default value is used.
Definition: CartoTypeWrapper.h:1265
A geometry class for creating map objects and specifying view areas. There are also functions for the...
Definition: CartoTypeGeometry.h:205
The Legend class is used to specify legends, scales, copyright notices and turn instructions.
Definition: CartoTypeWrapper.h:2840
void SetDiagramColor(Color aDiagramColor)
Sets the diagram color, used for scale bars and turn diagrams, for subsequently added lines.
void AddTextLine(String^ aText)
Adds a line of text, using the current font family, font size, text color and minimum line height.
void SetBorder(Color aColor, double aStrokeWidth, double aRadius, String^ aUnit)
Sets the border color and corner radius for the whole legend. Transparent border colors are allowed.
void AddScaleLine(bool aMetricUnits)
Adds a scale bar line, using the current font family, font size, alignment, text color and minimum li...
void Clear()
Deletes all legend lines (map objects, text lines and scale bars).
void SetMainStyleSheet(array< Byte >^ aData)
Sets the main style sheet, replacing the style sheet copied from the Framework parameter to the Legen...
String ^ TurnInstruction()
Returns the instruction to be displayed for the current turn, overriding automatically generated inst...
void AddTurnLine(bool aMetricUnits, bool aAbbreviate)
Adds a turn line, using the current font family, font size, alignment, text color and minimum line he...
void SetFontSize(double aFontSize, String^ aUnit)
Sets the font size for subsequently added lines.
void SetExtraStyleSheet(array< Byte >^ aData)
Sets the extra style sheet.
bool HasTurnInstruction()
Returns true if any of the lines of this legend object is a turn instruction.
void SetFontFamily(String^ aFontFamily)
Sets the font family for subsequently added lines.
void SetLabelWrapWidth(double aWrapWidth, String^ aUnit)
Sets the label wrap width for subsequently added lines. Values of zero or less prevent wrapping.
Legend(Framework^ aFramework)
Creates a Legend object with the same fonts and style sheet as aFramework.
void SetMarginWidth(double aMarginWidth, String^ aUnit)
Sets the margin width for the whole legend.
void SetMinLineHeight(double aLineHeight, String^ aUnit)
Sets the minimum line height for subsequently added lines.
void AddMapObjectLine(MapObjectType aType, String^ aLayer, FeatureType aFeatureType, String^ aStringAttrib, String^ aLabel)
Adds a line containing a map object, with an optional label to the left of it.
void AddMapObjectLine(MapObjectType aType, String^ aLayer, FeatureInfo^ aFeatureInfo, String^ aStringAttrib, String^ aLabel)
Adds a line containing a map object, with an optional label to the left of it. If aFeatureInfo is nul...
Drawing::Bitmap ^ CreateLegend(double aWidth, String^ aUnit, double aScaleDenominator, double aScaleDenominatorInView, BlendStyleSet^ aBlendStyleSet)
Creates a legend bitmap for the current set of map objects, text lines and scale bars.
void SetPolygonRotation(double aDegrees)
Sets the amount in degrees by which rectangles drawn for polygon legend lines are rotated,...
void SetTextColor(Color aTextColor)
Sets the text color for subsequently added lines.
void SetBackgroundColor(Color aColor)
Sets the background color. Transparent colors are allowed.
void SetAlignment(Align aAlignment)
Sets the alignment for labels and scale bars.
void SetTurnInstruction(String^ aText)
Sets the instruction to be displayed for the current turn, overriding automatically generated instruc...
Parameters used when matching a road or other feature to a location.
Definition: CartoTypeWrapper.h:397
double MaxRoadDistanceInMeters
The expected maximum distance of a road from the current location. It is clamped to the range 5 ....
Definition: CartoTypeWrapper.h:416
double LocationAccuracyInMeters
The accuracy of a location fix given as a range error with 95% probability. It is clamped to the rang...
Definition: CartoTypeWrapper.h:404
double HeadingAccuracyInDegrees
The accuracy of a heading or course given as an angular error in degrees with 95% probability....
Definition: CartoTypeWrapper.h:410
Parameters used for a location reference when writing traffic information.
Definition: CartoTypeWrapper.h:1037
LocationRef(LocationRefType aType, CoordType aCoordType)
Creates a location reference of a given type and coordinate type.
double RadiusInMeters
The radius, if this is a circle.
Definition: CartoTypeWrapper.h:1049
Geometry^ Geometry
The point or points.
Definition: CartoTypeWrapper.h:1047
String^ Id
The arbitrary ID of the location reference; may be null.
Definition: CartoTypeWrapper.h:1045
RoadOrientation RoadOrientation
The road orientation, if relevant.
Definition: CartoTypeWrapper.h:1053
SideOfRoad SideOfRoad
The side of the road, if relevant.
Definition: CartoTypeWrapper.h:1051
LocationRefType Type
The type of this location reference.
Definition: CartoTypeWrapper.h:1043
Metadata describing a CTM1 map file.
Definition: CartoTypeMetaData.h:96
A group of map objects with the same name, as used in a list of found objects.
Definition: CartoTypeWrapper.h:1122
MapObjectList^ MapObjectList
The list of map objects.
Definition: CartoTypeWrapper.h:1127
String^ Name
The name shared by all the map objects.
Definition: CartoTypeWrapper.h:1125
A type for lists of map object groups returned by search functions.
Definition: CartoTypeWrapper.h:1132
A map object: a point, linear object, polygon object, or array (texture).
Definition: CartoTypeWrapper.h:210
Int64 Id
The ID of the object.
Definition: CartoTypeWrapper.h:223
String ^ StringAttribute(String^ aName)
Returns a string attribute. If aName is empty this function is the same as Label.
virtual int PointCount(int aContourIndex)
Returns the number of points in a contour.
double Area
The area of the map object in square meters. Returns 0 if it is a point or a line.
Definition: CartoTypeWrapper.h:229
MapObjectType Type
The type of the object.
Definition: CartoTypeWrapper.h:225
MapObjectMatch ^ Match(String^ aText, StringMatchMethod aMatchMethod, String^ aAttributes, bool aPhrase)
Finds the first string attribute matching aText, using aMatchMethod, and returns information about it...
Rect^ BoundsInDegrees
Returns the bounding box of a map object in degrees.
Definition: CartoTypeWrapper.h:249
Rect^ Bounds
Returns the axis-aligned bounding box of a map object, in map coordinates.
Definition: CartoTypeWrapper.h:253
Point^ Center
Returns the center of a map object in map coordinates.
Definition: CartoTypeWrapper.h:238
double LengthOrPerimeter
The length or perimeter of the map object in meters. Returns 0 if it is a point.
Definition: CartoTypeWrapper.h:231
virtual PathPoint ^ Point(int aContourIndex, int aPointIndex)
Returns a point, specifying it by contour index and point index.
virtual int ContourCount()
Returns the number of contours in the path.
SortedDictionary< String^, String^> ^ StringAttributes()
Returns all the string attributes as key-value pairs; an empty key refers to the label attribute.
String^ Label
The label or name of the object.
Definition: CartoTypeWrapper.h:215
Point^ CenterInDegrees
Returns the center of a map object in degrees.
Definition: CartoTypeWrapper.h:247
String^ LayerName
The object's layer.
Definition: CartoTypeWrapper.h:227
Geometry^ GeometryInDegrees
Returns the bounding box of a map object in degrees.
Definition: CartoTypeWrapper.h:251
A type for lists of map objects returned by search functions.
Definition: CartoTypeWrapper.h:984
Information returned by MapObject.Match.
Definition: CartoTypeWrapper.h:194
int End
The end position of the matched text within the value.
Definition: CartoTypeWrapper.h:205
int Start
The start position of the matched text within the value.
Definition: CartoTypeWrapper.h:203
String^ Value
The value of the attribute in which the matched text was found.
Definition: CartoTypeWrapper.h:201
String^ Key
The name of the attribute in which the matched text was found.
Definition: CartoTypeWrapper.h:199
bool Found
True if the text was found.
Definition: CartoTypeWrapper.h:197
A class to draw a map using OpenGL ES.
Definition: CartoTypeWrapper.h:297
MapRenderer(Framework^ aFramework, IntPtr aWindowHandle)
Creates a MapRenderer object by providing a Framework and the handle of the window into which the map...
void Draw()
Draws the map using OpenGL ES.
bool Enable(bool aEnable)
Enables or disables drawing by a separate thread. Returns the previous state.
bool Valid()
Returns true if this MapRenderer is valid. If false is returned, graphics acceleration is not enabled...
Parameters governing navigation behaviour.
Definition: CartoTypeWrapper.h:1212
int RouteDistanceTolerance
Maximum distance from the route in metres before the vehicle is deemed off-route.
Definition: CartoTypeWrapper.h:1225
int MinimumFixDistance
Minimum distance between location fixes in metres that is taken as an actual move.
Definition: CartoTypeWrapper.h:1223
int RouteTimeTolerance
Maximum time off route in seconds before a new route needs to calculated.
Definition: CartoTypeWrapper.h:1227
bool NavigationEnabled
If true, and if there is a route, the position on route is updated and turn information is created wh...
Definition: CartoTypeWrapper.h:1232
Information about the nearest road to a certain point.
Definition: CartoTypeWrapper.h:919
String^ Ref
The road reference of the road.
Definition: CartoTypeWrapper.h:926
double HeadingVectorY
The y coordinate of the heading of the nearest segment as a unit vector.
Definition: CartoTypeWrapper.h:938
SideOfRoad SideOfRoad
The side of the road on which the selected point lies, or SideOfRoad.None if the vehicle heading is n...
Definition: CartoTypeWrapper.h:944
double Distance
The distance from the chosen point to the nearest point in meters.
Definition: CartoTypeWrapper.h:932
FeatureInfo^ FeatureInfo
The feature info of the road.
Definition: CartoTypeWrapper.h:922
double NearestPointY
The y coordinate of the nearest point on the road, in map coordinates, to the chosen point.
Definition: CartoTypeWrapper.h:930
double HeadingVectorX
The x coordinate of the heading of the nearest segment as a unit vector.
Definition: CartoTypeWrapper.h:936
double NearestPointX
The x coordinate of the nearest point on the road, in map coordinates, to the chosen point.
Definition: CartoTypeWrapper.h:928
String^ Name
The standard name of the road.
Definition: CartoTypeWrapper.h:924
double HeadingInDegrees
The heading of the nearest segment in degrees.
Definition: CartoTypeWrapper.h:934
Information about the nearest route segment to a point.
Definition: CartoTypeWrapper.h:690
double TimeAlongRoute
The estimated time of the nearest point, along the route, in seconds.
Definition: CartoTypeWrapper.h:709
double Heading
The heading of the nearest line as a map angle taken anti-clockwise from rightwards.
Definition: CartoTypeWrapper.h:713
int LineIndex
The index of the line within the segment's path: line N goes from point N to point N + 1.
Definition: CartoTypeWrapper.h:697
double NearestPointX
The point in the segment's path nearest to the other point, in map coordinates.
Definition: CartoTypeWrapper.h:699
double TimeAlongSegment
The estimated time within the current segment, in seconds.
Definition: CartoTypeWrapper.h:711
double DistanceToRoute
The distance from the other point to iNearestPoint in meters.
Definition: CartoTypeWrapper.h:703
double DistanceAlongSegment
The distance within the current segment in meters.
Definition: CartoTypeWrapper.h:707
double NearestPointY
The point in the segment's path nearest to the other point, in map coordinates.
Definition: CartoTypeWrapper.h:701
double DistanceAlongRoute
The distance of the nearest point along the route in meters.
Definition: CartoTypeWrapper.h:705
int SegmentIndex
The index of the segment in the Route object, or -1 if there were no segments.
Definition: CartoTypeWrapper.h:695
An on-curve or off-curve point for use in paths.
Definition: CartoTypeGeometry.h:62
Parameters giving detailed control of the perspective view.
Definition: CartoTypeWrapper.h:1146
double FieldOfViewDegrees
The camera's field of view in degrees.
Definition: CartoTypeWrapper.h:1178
double HeightMeters
The height of the camera above the terrain. The value 0 causes a default value to be used,...
Definition: CartoTypeWrapper.h:1168
Result ReadFromXml(String^ aText)
Reads a perspective parameter object from its XML form.
String ^ ToXml()
Creates a string representing a perspective parameter object in XML.
double DeclinationDegrees
The declination of the camera downward from the horizontal plane. Values are clamped to the range -90...
Definition: CartoTypeWrapper.h:1174
double PositionDegreesY
The latitude of the position of the point on the terrain below the camera, in degrees longitude (x) a...
Definition: CartoTypeWrapper.h:1164
double RotationDegrees
The amount by which the camera is rotated about its axis, after applying the declination,...
Definition: CartoTypeWrapper.h:1176
double AzimuthDegrees
The azimuth of the camera in degrees going clockwise, where 0 is N, 90 is E, etc.
Definition: CartoTypeWrapper.h:1170
double PositionDegreesX
The longitude of the position of the point on the terrain below the camera, in degrees longitude (x) ...
Definition: CartoTypeWrapper.h:1162
bool AutoAzimuth
If true, ignore AzimuthDegrees and use the current map orientation.
Definition: CartoTypeWrapper.h:1172
bool AutoPosition
If true, ignore PositionDegreesX and PositionDegreesY, and set the camera position so that the locati...
Definition: CartoTypeWrapper.h:1166
A 2D point using floating-point coordinates.
Definition: CartoTypeGeometry.h:26
A bitmap and a position to draw it. Used when drawing notices on the map.
Definition: CartoTypeWrapper.h:1110
Drawing::Bitmap^ Bitmap
The bitmap.
Definition: CartoTypeWrapper.h:1113
int X
The X coordinate of the position at which to draw the top-left corner of the bitmap.
Definition: CartoTypeWrapper.h:1115
int Y
The Y coordinate of the position at which to draw the top-left corner of the bitmap.
Definition: CartoTypeWrapper.h:1117
A grid-aligned rectangle with double-precision coordinates suitable for map points.
Definition: CartoTypeGeometry.h:84
A set of points for creating a route, with optional heading and accuracy information.
Definition: CartoTypeWrapper.h:747
CartoType::CoordType CoordType
The coordinate type of the route points.
Definition: CartoTypeWrapper.h:755
Information about an entire route.
Definition: CartoTypeWrapper.h:811
NearestSegmentInfo ^ NearestSegment(double aX, double aY, int aSection, double aPreviousDistanceAlongRoute)
Returns information about the nearest route segment to a point given in map coordinates.
double TollRoadDistance
Returns the total distance in metres of the parts of the route that are on toll roads.
Definition: CartoTypeWrapper.h:830
virtual int PointCount(int aContourIndex)
Returns the number of points in a contour.
virtual int ContourCount()
Returns the number of contours (sub-paths).
double Distance
The distance of the route in metres.
Definition: CartoTypeWrapper.h:822
NearestSegmentInfo ^ PointAtDistance(double aDistanceInMeters)
Returns information about a point a certain distance along a route.
RouteProfile^ Profile
The profile used to create this route.
Definition: CartoTypeWrapper.h:820
RouteSegment ^ RouteSegment(int aIndex)
Returns a route segment.
NearestSegmentInfo ^ PointAtTime(double aTimeInSeconds)
Returns information about a point a certain estimated time along a route.
double Time
The estimated time taken to traverse the route in seconds.
Definition: CartoTypeWrapper.h:824
int RouteSegmentCount
The number of route segments.
Definition: CartoTypeWrapper.h:826
virtual PathPoint ^ Point(int aContourIndex, int aPointIndex)
Returns a point given its contour and point indexes.
A point on a route, with its heading and location match parameters.
Definition: CartoTypeWrapper.h:721
LocationMatchParam^ LocationMatchParam
Parameters used when matching the point to a road or other routable segment. If null,...
Definition: CartoTypeWrapper.h:732
double Y
The X coordinate.
Definition: CartoTypeWrapper.h:726
double X
The X coordinate.
Definition: CartoTypeWrapper.h:724
double Heading
The heading in degrees clockwise from north.
Definition: CartoTypeWrapper.h:728
bool HeadingKnown
True if the heading is known.
Definition: CartoTypeWrapper.h:730
A type for lists of route points: see RouteCoordSet.
Definition: CartoTypeWrapper.h:737
A routing profile: parameters determining the type of route, including road speeds,...
Definition: CartoTypeWrapper.h:554
double Length
The vehicle's length in meters. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:596
int TurnTime
The estimated time in seconds taken for any turn at a junction that is not a slight turn or simply go...
Definition: CartoTypeWrapper.h:620
double TripleAxleLoad
The vehicle's triple axle load in metric tons. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:587
bool HazMat
True if the vehicle is carrying hazardous materials.
Definition: CartoTypeWrapper.h:599
double Height
The vehicle's height in meters. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:590
array< double > ^ Bonus
Bonuses or penalties in notional km per hour to be added to road types to make them more or less like...
Definition: CartoTypeWrapper.h:608
double AxleLoad
The vehicle's axle load in metric tons. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:581
array< double > ^ GradientSpeed
Speeds added to roads with a particular gradient.
Definition: CartoTypeWrapper.h:672
String^ XmlString
Creates an XML string representing the route profile.
Definition: CartoTypeWrapper.h:566
RouteProfile(RouteProfileType aProfileType)
Creates a RouteProfile of one of the standard types.
double DoubleAxleLoad
The vehicle's double axle load in metric tons. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:584
bool Shortest
Set this flag to true to get the shortest route by distance or time, ignoring weightings....
Definition: CartoTypeWrapper.h:646
int GradientFlags
Flags indicating which roads are affected by gradient speeds and bonuses; normally steps,...
Definition: CartoTypeWrapper.h:681
double TollPenalty
The penalty applied to toll roads as a number between zero and one.
Definition: CartoTypeWrapper.h:661
array< double > ^ GradientBonus
Bonuses applied to roads with a particular gradient.
Definition: CartoTypeWrapper.h:675
int CrossTrafficTurnTime
The estimated time in seconds taken for a turn across the traffic: that is, a left turn in drive-on-r...
Definition: CartoTypeWrapper.h:635
int VehicleType
Flags taken from the access flags defined in FeatureInfo indicating the vehicle type....
Definition: CartoTypeWrapper.h:575
int TrafficLightTime
The estimated delay in seconds caused by traffic lights.
Definition: CartoTypeWrapper.h:640
double Width
The vehicle's width in meters. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:593
Result ReadFromXmlString(String^ aString)
Reads the route profile from a string in XML format.
Result ReadFromXmlFile(String^ aFileName)
Reads the route profile from an file in XML format.
bool ShortestByTime
Set this flag to true if Shortest should produce the shortest route by time rather than distance.
Definition: CartoTypeWrapper.h:649
int UTurnTime
The estimated time in seconds taken for a U-turn, defined as a turn very close to 180 degrees (within...
Definition: CartoTypeWrapper.h:626
array< int > ^ RestrictionOverride
This array of bit masks allows restrictions to be overridden for certain types of road.
Definition: CartoTypeWrapper.h:614
double Weight
The vehicle's weight in metric tons. Values of zero or less mean 'unknown'.
Definition: CartoTypeWrapper.h:578
array< double > ^ Speed
Speeds along roads in kilometres per hour.
Definition: CartoTypeWrapper.h:602
String^ Name
The optional name of the profile.
Definition: CartoTypeWrapper.h:569
Result WriteAsXmlFile(String^ aFileName)
Writes the route profile to a file in XML format.
Part of a route, consisting of a turn and the section of the route from that turn to the next one.
Definition: CartoTypeWrapper.h:765
virtual int PointCount(int aContourIndex)
Returns the number of points in a contour.
double TurnAngle
Returns the turn angle.
Definition: CartoTypeWrapper.h:786
double Distance
Returns the distance in metres.
Definition: CartoTypeWrapper.h:774
String^ Ref
Returns the road reference of the object of which this segment is a part.
Definition: CartoTypeWrapper.h:772
int Section
Returns the route section this segment belongs to.
Definition: CartoTypeWrapper.h:792
virtual PathPoint ^ Point(int aContourIndex, int aPointIndex)
Returns a point given its contour and point indexes.
virtual int ContourCount()
Returns the number of contours (sub-paths). It is always 1 for this class.
Definition: CartoTypeWrapper.h:795
double Time
Returns the estimated time taken to traverse the segment in seconds, including the turn time returned...
Definition: CartoTypeWrapper.h:776
double TurnTime
Returns the estimated time taken by the turn at the start of the segment; this is included in the val...
Definition: CartoTypeWrapper.h:778
int Choices
Returns the number of choices at this turning if known; 0 if not known.
Definition: CartoTypeWrapper.h:790
bool IsContinue
Returns true if this is a 'continue' turn, false if not.
Definition: CartoTypeWrapper.h:782
int ExitNumber
Returns the exit number, counting the current junction as 0, if this junction is part of a roundabout...
Definition: CartoTypeWrapper.h:788
String^ Name
Returns the standard name of the object of which this segment is a part.
Definition: CartoTypeWrapper.h:770
A matrix of route times and distances between sets of points.
Definition: CartoTypeWrapper.h:1388
int Time(int aFromIndex, int aToIndex)
Returns the time in seconds taken to travel on the best route from one of the 'from' points to one of...
int FromCount
The number of 'from' points.
Definition: CartoTypeWrapper.h:1391
int ToCount
Returns the number of 'to' points.
Definition: CartoTypeWrapper.h:1393
int Distance(int aFromIndex, int aToIndex)
Returns the distance in metres along the best route from one of the 'from' points to one of the 'to' ...
Traffic information. This information is normally used in combination with a location reference.
Definition: CartoTypeWrapper.h:992
literal double NoSpeedLimit
Speeds of this value or greater mean there is no speed limit.
Definition: CartoTypeWrapper.h:997
double Speed
Permitted or expected speed in kph: NoSpeedLimit or greater means no speed limit; 0 or less means the...
Definition: CartoTypeWrapper.h:1002
int VehicleTypes
Vehicle types affected by this information, taken from the FeatureInfo literals.
Definition: CartoTypeWrapper.h:1000
Information about a turn through a junction.
Definition: CartoTypeWrapper.h:494
bool IsContinue
True if this turn is a continuation of the current road and no notification is needed.
Definition: CartoTypeWrapper.h:504
void Clear()
Clears the data from a Turn object, returning it to its newly constructed state.
RoundaboutState RoundaboutState
The roundabout state.
Definition: CartoTypeWrapper.h:506
int ExitNumber
The junction to take, counting the current junction as 0, if this junction is part of a roundabout.
Definition: CartoTypeWrapper.h:510
double Time
The estimated time to the turn in seconds.
Definition: CartoTypeWrapper.h:514
String^ FromName
The name of the road before the turn.
Definition: CartoTypeWrapper.h:516
String^ FromRef
The reference code (e.g., B4009) of the road before the turn.
Definition: CartoTypeWrapper.h:518
double Distance
The distance to the turn in metres.
Definition: CartoTypeWrapper.h:512
String^ Instructions
Instructions for the turn, in the current locale's language.
Definition: CartoTypeWrapper.h:524
Turn()
Creates a Turn object.
String^ ToRef
The reference code (e.g., B4009) of the road after the turn.
Definition: CartoTypeWrapper.h:522
double TurnAngle
The turn angle: 0 = straight ahead; negative = left, positive = right.
Definition: CartoTypeWrapper.h:508
String^ ToName
The name of the road after the turn.
Definition: CartoTypeWrapper.h:520
TurnType Type
The turn type: ahead, left, right, etc.
Definition: CartoTypeWrapper.h:502
General utility functions
Definition: CartoTypeWrapper.h:2967
static String ^ Version()
Returns the current CartoType version as a string of the form MAJOR.MINOR.
static double DistanceFromPoint(array< double >^ aX, array< double >^ aY, bool aIsPolygon, double aPointX, double aPointY, Point^ aNearestPoint)
Returns the distance from a line of points (if aPolygon is false) or a polygon (if aPolygon is true) ...
static String ^ SetAttribute(String^ aString, String^ aKey, String^ aValue)
Sets an attribute in a string to be used when creating a map object.
static String ^ ErrorString(Result aError)
Returns a short description of an error, given its code.
static double AzimuthInDegrees(double aLong1, double aLat1, double aLong2, double aLat2)
Returns the azimuth (direction along a great circle) in degrees from (aLong1,aLat1) to (aLong2,...
static String ^ Description()
Returns a Git description of the current CartoType version as a string of the form MAJOR....
static Point ^ PointAtAzimuth(double aLong, double aLat, double aDir, double aDistanceInMeters)
Finds the point in degrees at a certain distance and azimuth direction from a starting point....
static double SphericalPolygonArea(array< double >^ aX, array< double >^ aY)
Returns the area of a spherical polygon in square metres. The polygon is defined in degrees of latitu...
static String ^ Build()
Returns the current CartoType build as a string.
static double Length(array< double >^ aX, array< double >^ aY)
Returns the length of a line, in meters, defined by points of latitude (y) and longitude (x),...
static double GreatCircleDistanceInMeters(double aLong1, double aLat1, double aLong2, double aLat2)
Returns the great-circle distance in meters between (aLong1,aLat1) and (aLong2,aLat2)....
The view state, which can be retrieved or set so that maps can be recreated.
Definition: CartoTypeWrapper.h:1183
int WidthInPixels
The display width in pixels.
Definition: CartoTypeWrapper.h:1193
int HeightInPixels
The display height in pixels.
Definition: CartoTypeWrapper.h:1195
double ScaleDenominator
The denominator of the scale fraction; e.g., 50000 for 1:50000.
Definition: CartoTypeWrapper.h:1201
String ^ ToXml()
Creates a string representing a view state in XML.
PerspectiveParam^ PerspectiveParam
The parameters to be used for perspective mode; if null, default parameters are used.
Definition: CartoTypeWrapper.h:1207
Result ReadFromXml(String^ aText)
Reads a view state from its XML form.
double ViewCenterDegreesX
The X coordinate (longitude) of the view center in map coordinates.
Definition: CartoTypeWrapper.h:1197
double RotationDegrees
The clockwise rotation of the view in degrees.
Definition: CartoTypeWrapper.h:1203
double ViewCenterDegreesY
The Y coordinate (latitude) of the view center in map coordinates.
Definition: CartoTypeWrapper.h:1199
bool Perspective
True if perspective mode is on.
Definition: CartoTypeWrapper.h:1205
A path defining a set of open and closed curves.
Definition: CartoTypeGeometry.h:116
Definition: CartoTypeWrapper.h:41
ValidityFlag
Bit flags used in Framework.Navigate to indicate which information is valid.
Definition: CartoTypeWrapper.h:361
@ Course
A flag used in Framework.Navigate to indicate that the course is valid.
@ Speed
A flag used in Framework.Navigate to indicate that the speed is valid.
@ Position
A flag used in Framework.Navigate to indicate that the position is valid.
@ Time
A flag used in Framework.Navigate to indicate that the time is valid.
@ Height
A flag used in Framework.Navigate to indicate that the height is valid.
RouterType
Types of router; used when selecting a router type.
Definition: CartoTypeWrapper.h:421
@ TECH
Turn-expanded contraction hierarchy.
@ StandardAStar
The A* router, which gives fast performance but takes a lot of memory and cannot create a route going...
@ StandardContractionHierarchy
The contraction hierarchy router is intended where less RAM is available: for example with large maps...
@ Default
This router type causes the default router to be selected: the one for which serialized data is avail...
@ TurnExpandedAStar
A version of the A* router with road nodes and turn arcs; slower than StandardAStar,...
public delegate void RouterAsyncDelegate(Result, Route^)
A delegate type for the asynchronous routing functions.
CoordType
Coordinate types.
Definition: CartoTypeGeometry.h:127
@ Degree
Longitude (X) and latitude (Y) in degrees. X increases to the east and Y increases to the north.
LetterCase
Definition: CartoTypeWrapper.h:120
@ Upper
The case of the letters 'A', 'B', 'C, etc.
@ None
A code used when the letter case is to be left as it is, or is irrelevant.
@ Lower
The case of the letters 'a', 'b', c', etc.
@ Title
The case of letters like U+01C8 'Lj' and a few others; also indicates that the first letter of each w...
public delegate void FindAsyncGroupDelegate(MapObjectGroupList^)
A delegate type for the asynchronous find function for map object groups.
Result
Result codes returned by CartoType API functions.
Definition: CartoTypeResult.h:15
StringMatchMethod
Flags and constants used when finding text.
Definition: CartoTypeWrapper.h:90
@ Loose
Loose matching: ignore non-alphanumerics and fold accents and case.
@ Exact
Strings must match exactly.
@ Fuzzy
Allow fuzzy matches: ignore non-alphanumerics, fold accents and allow imperfect matches.
@ Prefix
The search term must be an exact match or a prefix of the found string.
@ FoldCaseFlag
A flag to fold letter case.
@ FoldAccentsFlag
A flag to match accented and unaccented letters.
@ PrefixFlag
A flag to match all strings for which the search term is a perfect match or a prefix.
@ IgnoreNonAlphanumerics
Ignore all characters that are not letters or digits.
@ FuzzyFlag
A flag to allow imperfect matches with a small number of omitted, incorrect or extra characters.
@ IgnoreWhitespaceFlag
A flag to ignore whitespace when matching.
@ FoldCase
Fold case when matching strings.
@ IgnoreSymbolsFlag
A flag to ignore all characters that are not letters, digits or whitespace when matching.
FeatureType
Every map object has a feature type.
Definition: CartoTypeFeatureInfo.h:30
TurnType
Turn types on a route. Turns at junctions are classified by dividing the full circle into 45-degree s...
Definition: CartoTypeWrapper.h:446
@ BearRight
A turn between 22.5 degrees and 67.5 degrees right or a turn through a smaller angle which is the rig...
@ SharpRight
A turn between 112.5 degrees and 180 degrees right.
@ Ahead
A turn of less than 22.5 degrees left or right, unless this is a fork with two choices,...
@ None
No turn exists or is needed. This turn type is used at the start of a route.
@ Right
A turn between 67.5 degrees and 112.5 degrees right.
@ Left
A turn between 67.5 degrees and 112.5 degrees left.
@ Around
This turn type is use for U-turns: turns back along the same road.
@ SharpLeft
A turn between 112.5 degrees and 180 degrees left.
@ BearLeft
A turn between 22.5 degrees and 67.5 degrees left. or a turn through a smaller angle which is the lef...
FollowFlag
Bit flags used by the FollowMode constants.
Definition: CartoTypeWrapper.h:335
@ Heading
A flag to rotate the map to the user's heading.
@ Zoom
A flag to set the map to a suitable zoom level for the user's speed.
@ Location
A flag to make the center of the map follow the user's location.
Align
Text alignments.
Definition: CartoTypeWrapper.h:2813
@ Center
Center the text.
@ Reverse
Align to the right for left-to-right text, to the left for right-to-left text.
@ Right
Align to the right and leave space on the left.
@ Left
Align to the left and leave space on the right.
@ Standard
Align to the left for left-to-right text, to the right for right-to-left text.
LocationRefType
The type of a location reference used for traffic information.
Definition: CartoTypeWrapper.h:1016
@ GeoCoordinate
A point on the earth's surface.
@ PointAlongLine
A point on a line in the route network.
@ Circle
A circle defined as a point and a radius.
@ ClosedLine
A closed line in the route network.
@ Line
A line in the route network.
@ Polygon
A polygon defined using a set of points.
@ PointWithAccessPoint
A point on the route network providing access to a nearby POI: the first point is the point on the li...
@ Rectangle
A rectangle aligned to the grid of latitude and longitude: it is defined using two points at opposite...
FollowMode
Flags controlling the way the map follows the user location and heading and automatically zooms.
Definition: CartoTypeWrapper.h:346
@ LocationHeading
The map is centred on the user's location and rotated to the user's heading.
@ LocationZoom
The map is centred on the user's location and zoomed to a suitable level for the user's speed.
@ None
The map does not follow the user's location or heading.
@ Location
The map is centred on the user's location.
@ LocationHeadingZoom
The map is centred on the user's location, rotated to the user's heading, and zoomed to a suitable le...
SideOfRoad
The side of the road: used in traffic information.
Definition: CartoTypeWrapper.h:910
public delegate void FindAsyncDelegate(MapObjectList^)
A delegate type for the asynchronous find function.
RoundaboutState
Turns involving roundabouts are marked as such so that exit numbers can be counted
Definition: CartoTypeWrapper.h:481
@ None
This junction does not involve a roundabout.
@ Continue
This junction continues around a roundabout.
@ Enter
This junction enters a roundabout.
@ Exit
This junction exits a roundabout.
RouteProfileType
Constants used to select frequently-used profiles.
Definition: CartoTypeWrapper.h:532
@ Hike
A profile type for walking, preferring off-road paths.
@ Cycle
A profile type for cycling.
@ Walk
A profile type for walking.
@ Ski
A profile type for downhill skiing.
@ Car
A profile type for private car navigation.
FileType
File types of interest to CartoType.
Definition: CartoTypeWrapper.h:961
@ Jpeg
JPEG (Joint Photographic Expert Group) image files.
@ Tiff
TIFF (Tagged Image File Format) image files.
@ Ctm1
CTM1 (CartoType Map Data Type 1) map data files.
@ Gpx
GPX (GPS Exchange) files.
@ Ctsql
CTSQL (CartoType SQLite format) map data files.
@ Kml
KML (Keyhole Markup Language) map data files.
@ CartoTypeRoute
CTROUTE (CartoType XML route) files.
@ Ctms
CTMS (CartoType Map Data, Serialized) map data files.
@ Png
PNG (Portable Network Graphics) image files.
NoticePosition
Positions for notices like the legend or scale bar. Use functions taking an ExtendedNoticePosition fo...
Definition: CartoTypeWrapper.h:1058
@ TopRight
The top right corner of the display.
@ Bottom
The center of the bottom edge of the display.
@ Center
The center of the display.
@ BottomRight
The bottom right corner of the display.
@ Right
The center of the right side of the display.
@ Left
The center of the left side of the display.
@ BottomLeft
The bottom left corner of the display.
@ Top
The center of the top edge of the display.
@ TopLeft
The top left corner of the display.
MapObjectType
An enumerated type for map objects.
Definition: CartoTypeWrapper.h:75
@ Point
A point in two-dimensional space.
@ Array
Information arranged as an array of values, such as an image or height data. Essentially a texture in...
@ Line
A line in two-dimensional space, consisting of one or more open contours.
@ Polygon
A polygon in two-dimensional space, consisting of one or more closed contours.
@ TypeCount
The total number of map object types. This is not an actual type.
RoadOrientation
The orientation of a path along a road: used in traffic information.
Definition: CartoTypeWrapper.h:1007
WritableMapType
Types of writable maps.
Definition: CartoTypeWrapper.h:952
@ Memory
A writable map stored in memory.
@ SQLite
A writable map stored in an SQLite database.
NavigationState
States of the navigation system.
Definition: CartoTypeWrapper.h:376
@ NewRoute
A new route has been calculated.
@ OffRoute
The current position is off the route.
@ None
No route has been created, or navigation is disabled.
@ Turn
The current position is on the route and turn information is available.
@ Routing
Route calculation is in progress.
@ Arrival
The latest position is on the route and very close to the destination.
@ TurnRound
The latest position is on the route but a U-turn is needed.
@ NoPosition
There is a route but no position has been supplied.