Functions
The following functions are available globally.
-
Blend colors with overlay function
Declaration
Objective-C
GLMapColor BlendColorsOverlay(GLMapColor tint, GLMapColor color)Swift
func blendOverlay(color: GLMapColor) -> GLMapColorParameters
tinttint color
colorcolor to blend
-
Creates new color from int chanel values 0 - 255
Declaration
Objective-C
static inline GLMapColor GLMapColorMake(uint8_t r, uint8_t g, uint8_t b, uint8_t a)Swift
/*not inherited*/ init(red r: UInt8, green g: UInt8, blue b: UInt8, alpha a: UInt8)Parameters
rRed channel value
gGreen channel value
bBlue channel value
aAlpha channel value
Return Value
Returns new color object
-
Declaration
Objective-C
static inline uint8_t GLMapColorGetRed(GLMapColor color)Swift
var red: UInt8 { get set }Parameters
colorInput color
Return Value
Returns red channel value
-
Declaration
Objective-C
static inline uint8_t GLMapColorGetGreen(GLMapColor color)Swift
var green: UInt8 { get set }Parameters
colorInput color
Return Value
Returns green channel value
-
Declaration
Objective-C
static inline uint8_t GLMapColorGetBlue(GLMapColor color)Swift
var blue: UInt8 { get set }Parameters
colorInput color
Return Value
Returns blue channel value
-
Declaration
Objective-C
static inline uint8_t GLMapColorGetAlpha(GLMapColor color)Swift
var alpha: UInt8 { get set }Parameters
colorInput color
Return Value
Returns alpha channel value
-
Declaration
Objective-C
static inline void GLMapColorSetRed(GLMapColor *_Nonnull color, uint8_t value)Parameters
colorInput color
valuenew red value
-
Declaration
Objective-C
static inline void GLMapColorSetGreen(GLMapColor *_Nonnull color, uint8_t value)Parameters
colorInput color
valuenew green value
-
Declaration
Objective-C
static inline void GLMapColorSetBlue(GLMapColor *_Nonnull color, uint8_t value)Parameters
colorInput color
valuenew blue value
-
Declaration
Objective-C
static inline void GLMapColorSetAlpha(GLMapColor *_Nonnull color, uint8_t value)Parameters
colorInput color
valuenew alpha value
-
Creates new color from float chanel values 0.0 - 1.0
Declaration
Objective-C
static inline GLMapColor GLMapColorMakeF(float r, float g, float b, float a)Swift
func GLMapColorMakeF(_ r: Float, _ g: Float, _ b: Float, _ a: Float) -> GLMapColorParameters
rRed channel value
gGreen channel value
bBlue channel value
aAlpha channel value
Return Value
Returns new color object
-
Declaration
Objective-C
static inline float GLMapColorGetRedF(GLMapColor color)Swift
var redF: Float { get }Parameters
colorInput color
Return Value
Returns red channel value
-
Declaration
Objective-C
static inline float GLMapColorGetGreenF(GLMapColor color)Swift
var greenF: Float { get }Parameters
colorInput color
Return Value
Returns green channel value
-
Declaration
Objective-C
static inline float GLMapColorGetBlueF(GLMapColor color)Swift
var blueF: Float { get }Parameters
colorInput color
Return Value
Returns blue channel value
-
Declaration
Objective-C
static inline float GLMapColorGetAlphaF(GLMapColor color)Swift
var alphaF: Float { get }Parameters
colorInput color
Return Value
Returns alpha channel value
-
Creates
CGColorobject from ourGLMapColorDeclaration
Objective-C
struct CGColor *_Nullable CGColorFromGLMapColor(GLMapColor color)Swift
func CGColorFromGLMapColor(_ color: GLMapColor) -> OpaquePointer?Parameters
colorInitial color
Return Value
New
CGColorobject -
Checks if it’s error or success code
Declaration
Objective-C
static inline _Bool GLMapIsSuccess(GLMapError v)Swift
var isSuccess: Bool { get } -
Creates
GLMapTilePosDeclaration
Objective-C
static inline GLMapTilePos GLMapTilePosMake(int x, int y, int z)Swift
/*not inherited*/ init(x: Int32, y: Int32, z: Int32)Parameters
xX coordinate
yY coordinate
zZ coordinate
Return Value
New tile position
-
Creates
NSColorobject from ourGLMapColorDeclaration
Objective-C
NSColor *_Nullable NSColorFromGLMapColor(GLMapColor color)Swift
var nsColor: NSColor? { get }Parameters
colorInitial color
Return Value
New
NSColorobject -
Converts
NSDataobjects intoGLMapResources.Declaration
Objective-C
GLMapResource GLMapResourceWithData(NSData *_Nonnull data)Swift
/*not inherited*/ init(data: Data)Parameters
dataData object to convert.
Return Value
Created resource object.
-
Creates route point
Declaration
Objective-C
static inline GLRoutePoint GLRoutePointMake(GLMapGeoPoint pt, double heading, _Bool isStop, _Bool allowUTurn)Swift
/*not inherited*/ init(pt: GLMapGeoPoint, heading: Double, isStop: Bool, allowUTurn: Bool) -
Adds point into existing bounding box.
Declaration
Objective-C
static inline GLMapBBox GLMapBBoxAddPoint(GLMapBBox bbox, GLMapPoint point)Swift
func adding(_ point: GLMapPoint) -> GLMapBBoxParameters
bboxBounding box
pointPoint to add into bounding box
-
Adds a point into an existing bounding box, ensuring correct handling when points are on both sides of the 180th meridian.
Declaration
Objective-C
static inline GLMapBBox GLMapBBoxSafeAddPoint(GLMapBBox bbox, GLMapPoint point)Swift
func safeAdding(_ point: GLMapPoint) -> GLMapBBoxParameters
bboxThe bounding box to which the point will be added.
pointThe point to add into the bounding box.
Return Value
The updated bounding box after adding the point.
-
Checks if the bbox contains the point
Declaration
Objective-C
static inline _Bool GLMapBBoxContains(GLMapBBox bbox, GLMapPoint point)Swift
func contains(_ point: GLMapPoint) -> BoolParameters
bboxBounding box
pointPoint to check
Return Value
true if point is in bbox
-
Creates new bounding box
Declaration
Objective-C
static inline GLMapBBox GLMapBBoxMake(GLMapPoint origin, double width, double height)Swift
/*not inherited*/ init(origin: GLMapPoint, width: Double, height: Double)Parameters
originOrigin point
widthWidth
heightHeight
Return Value
New bounding box
-
Returns center of bbox
Declaration
Objective-C
static inline GLMapPoint GLMapBBoxCenter(GLMapBBox a)Swift
var center: GLMapPoint { get }Return Value
center of bbox
-
Rotates an existing bounding box around its center by a given angle.
Declaration
Swift
func rotating(angle: Double) -> GLMapBBoxParameters
bboxThe bounding box to be rotated
angleThe angle in degrees by which the bounding box should be rotated
Return Value
The rotated bounding box
-
Computes distance from bounding box to point
Declaration
Objective-C
double GLMapBBoxDistanceToPoint(GLMapBBox bbox, GLMapPoint point)Swift
func distanceTo(_ point: GLMapPoint) -> DoubleParameters
bboxBounding box
pointPoint
Return Value
Distance in internal coordinates
-
Creates map point from geo coordinates
Declaration
Objective-C
GLMapPoint GLMapPointMakeFromGeoCoordinates(double lat, double lon)Swift
/*not inherited*/ init(lat: Double, lon: Double)Parameters
latLatitude
lonLongitude
Return Value
New map point
-
Creates map point from geo point
Declaration
Objective-C
GLMapPoint GLMapPointFromMapGeoPoint(GLMapGeoPoint point)Swift
/*not inherited*/ init(geoPoint point: GLMapGeoPoint)Parameters
pointGeo point
Return Value
New point
-
Creates map point from tile position
Declaration
Objective-C
GLMapPoint GLMapPointFromMapTilePos(GLMapTilePos tilePos)Swift
/*not inherited*/ init(tilePos: GLMapTilePos)Parameters
tilePosTile position
Return Value
New point
-
Creates geo point from map coordinates
Declaration
Objective-C
GLMapGeoPoint GLMapGeoPointFromMapPoint(GLMapPoint point)Swift
/*not inherited*/ init(point: GLMapPoint)Parameters
pointMap point
Return Value
New geo point
-
Calculates distance between two points on map
Declaration
Objective-C
double GLMapDistanceBetweenPoints(GLMapPoint a, GLMapPoint b)Swift
func distanceTo(_ b: GLMapPoint) -> DoubleParameters
aFirst point on map
bSecond point on map
Return Value
Distance in meters
-
Calculates bearing between two geo points.
Declaration
Objective-C
double GLMapBearingBetweenPoints(GLMapPoint a, GLMapPoint b)Swift
func bearingTo(_ b: GLMapPoint) -> DoubleParameters
aFirst point
bSecond point
Return Value
bearing angle in degrees
-
Creates new empty set
Declaration
Objective-C
GLMapPointSet _Nonnull GLMapPointSetCreate(void)Swift
func GLMapPointSetCreate() -> GLMapPointSet -
Destroys set
Declaration
Objective-C
void GLMapPointSetDestroy(GLMapPointSet _Nonnull set)Swift
func GLMapPointSetDestroy(_ set: GLMapPointSet)Parameters
setset to destroy
-
Adds new point to set. Can add many points with same coordinates.
Declaration
Objective-C
void GLMapPointSetInsert(GLMapPointSet _Nonnull set, GLMapPoint point)Swift
func GLMapPointSetInsert(_ set: GLMapPointSet, _ point: GLMapPoint)Parameters
setset to modify
pointpoint to add
-
Inserts new point to set.
Declaration
Objective-C
_Bool GLMapPointSetInsertUnique(GLMapPointSet _Nonnull set, GLMapPoint point)Swift
func GLMapPointSetInsertUnique(_ set: GLMapPointSet, _ point: GLMapPoint) -> BoolParameters
setset to modify
pointpoint to insert.
Return Value
trueif point is inserted.falseif point with same coordinates already in set. -
Removes point from set
Declaration
Objective-C
_Bool GLMapPointSetRemove(GLMapPointSet _Nonnull set, GLMapPoint point)Swift
func GLMapPointSetRemove(_ set: GLMapPointSet, _ point: GLMapPoint) -> BoolParameters
setset to modify
pointpoint to remove
Return Value
YES if point was removed
-
Checks if set have given point
Declaration
Objective-C
_Bool GLMapPointSetContains(GLMapPointSet _Nonnull set, GLMapPoint point)Swift
func GLMapPointSetContains(_ set: GLMapPointSet, _ point: GLMapPoint) -> BoolParameters
setset to test
pointpoint to test
Return Value
YES if point is in set
-
Returns nearest point in set
Declaration
Objective-C
GLMapPoint GLMapPointSetNearestPoint(GLMapPointSet _Nonnull set, GLMapPoint point)Swift
func GLMapPointSetNearestPoint(_ set: GLMapPointSet, _ point: GLMapPoint) -> GLMapPointParameters
setobject created by
GLMapPointSetCreatepointreference point to calculate distance
Return Value
Nearest point in set
-
Creates new empty set
Declaration
Objective-C
GLMapBBoxSet _Nonnull GLMapBBoxSetCreate(void)Swift
func GLMapBBoxSetCreate() -> GLMapBBoxSet -
Destroys set
Declaration
Objective-C
void GLMapBBoxSetDestroy(GLMapBBoxSet _Nonnull set)Swift
func GLMapBBoxSetDestroy(_ set: GLMapBBoxSet)Parameters
setset to destroy
-
Test if bbox intersects with any other bbox in set.
Declaration
Objective-C
_Bool GLMapBBoxSetTest(GLMapBBoxSet _Nonnull set, GLMapBBox bbox)Swift
func GLMapBBoxSetTest(_ set: GLMapBBoxSet, _ bbox: GLMapBBox) -> BoolParameters
setset
bboxbbox to test
Return Value
true if intersects
-
Adds new bbox to set.
Declaration
Objective-C
void GLMapBBoxSetInsert(GLMapBBoxSet _Nonnull set, GLMapBBox bbox)Swift
func GLMapBBoxSetInsert(_ set: GLMapBBoxSet, _ bbox: GLMapBBox)Parameters
setset to modify
bboxbbox to add
-
Parse double using fast_float.
Declaration
Objective-C
_Bool ParseDouble(const char *_Nonnull *_Nonnull string, uint32_t length, double *_Nonnull result)Swift
func ParseDouble(_ string: UnsafeMutablePointer<UnsafePointer<CChar>>, _ length: UInt32, _ result: UnsafeMutablePointer<Double>) -> BoolParameters
stringon input - string to parse, on outpur last position wehre parsing stops
lengthlength of string
resulton output - result of parse
Return Value
true if success
-
Parse float using fast_float.
Declaration
Objective-C
_Bool ParseFloat(const char *_Nonnull *_Nonnull string, uint32_t length, float *_Nonnull result)Swift
func ParseFloat(_ string: UnsafeMutablePointer<UnsafePointer<CChar>>, _ length: UInt32, _ result: UnsafeMutablePointer<Float>) -> BoolParameters
stringon input - string to parse, on outpur last position wehre parsing stops
lengthlength of string
resulton output - result of parse
Return Value
true if success
-
Creates new
GLMapGeoPoint.Declaration
Objective-C
static inline GLMapGeoPoint GLMapGeoPointMake(double lat, double lon)Swift
/*not inherited*/ init(lat: Double, lon: Double)Parameters
latLatitude
lonLongitude
Return Value
New geo point
-
Checks equality of two geo points
Declaration
Objective-C
static inline _Bool GLMapGeoPointEqual(GLMapGeoPoint a, GLMapGeoPoint b)Swift
func GLMapGeoPointEqual(_ a: GLMapGeoPoint, _ b: GLMapGeoPoint) -> BoolParameters
aFirst geo point
bSecond geo point
Return Value
trueif map points is equal -
Calculates distance between two points. Сontains internal conversion to GLMapGeoPoint.
Declaration
Objective-C
double GLMapDistanceBetweenGeoPoints(GLMapGeoPoint a, GLMapGeoPoint b)Swift
func distanceTo(_ b: GLMapGeoPoint) -> DoubleParameters
aFirst geo point
bSecond geo point
Return Value
Distance in meters
-
Calculates bearing between two points. Сontains internal conversion to GLMapGeoPoint.
Declaration
Objective-C
double GLMapBearingBetweenGeoPoints(GLMapGeoPoint a, GLMapGeoPoint b)Swift
func bearingTo(_ b: GLMapGeoPoint) -> DoubleParameters
aFirst geo point
bSecond geo point
Return Value
bearing angle in degrees
-
Print message to the stdout.
Declaration
Objective-C
static inline void SendLogMessage(const char *name, ...) -
Changes map marker style
Declaration
Objective-C
void GLMapMarkerSetStyle(GLMapMarkerData _Nonnull data, uint32_t style)Swift
func GLMapMarkerSetStyle(_ data: GLMapMarkerData, _ style: UInt32)Parameters
dataMarker object to be changed
styleStyle identifier
-
Sets text for map marker.
Declaration
Objective-C
void GLMapMarkerSetText(GLMapMarkerData _Nonnull data, GLMapTextAlignment textAlignment, NSString *_Nonnull text, CGPoint offset, GLMapVectorStyle *_Nonnull style)Swift
func GLMapMarkerSetText(_ data: GLMapMarkerData, _ textAlignment: GLMapTextAlignment, _ text: String, _ offset: CGPoint, _ style: GLMapVectorStyle)Parameters
dataMarker object to be changed
textAlignmentalignment of text. If it is
Undefined- alignment will be calculated from offset.textText for marker object
offsetOffset of the text center relative to the marker center
styleText style
-
Creates new
GLMapPointDeclaration
Objective-C
static inline GLMapPoint GLMapPointMake(double x, double y)Swift
/*not inherited*/ init(x: Double, y: Double)Parameters
xX coordinate
yY coordinate
Return Value
New map point
-
Checks equality of two map points
Declaration
Objective-C
static inline _Bool GLMapPointEqual(GLMapPoint a, GLMapPoint b)Swift
func GLMapPointEqual(_ a: GLMapPoint, _ b: GLMapPoint) -> BoolParameters
aFirst map point
bSecond map point
Return Value
trueif map points is equal -
Return sum of point components
Declaration
Objective-C
static inline GLMapPoint GLMapPointAdd(GLMapPoint point, double x, double y)Swift
func add(x: Double, y: Double) -> GLMapPointParameters
pointpoint
xx component
yy component
Return Value
Sum of components
-
Length between two points
Declaration
Objective-C
double GLMapPointLength(GLMapPoint a, GLMapPoint b)Swift
func lengthTo(_ b: GLMapPoint) -> DoubleParameters
aFirst point
bSecond point
Return Value
length (in internal map units)
-
Serialize options to string
Declaration
Objective-C
extern NSString *CostingOptionsAutoSerialize(const CostingOptionsAuto *options)Swift
func serialize() -> String! -
Serialize options to string
Declaration
Objective-C
extern NSString * CostingOptionsBicycleSerialize(const CostingOptionsBicycle *options)Swift
func serialize() -> String! -
Serialize options to string
Declaration
Objective-C
extern NSString * CostingOptionsPedestrianSerialize(const CostingOptionsPedestrian *options)Swift
func serialize() -> String! -
Serialize options to string
Declaration
Objective-C
extern NSString * CostingOptionsStraightSerialize(const CostingOptionsStraight *options)Swift
func serialize() -> String! -
Serialize options to string
Declaration
Objective-C
extern NSString * CostingOptionsMotorcycleSerialize(const CostingOptionsMotorcycle *options)Swift
func serialize() -> String! -
Serialize options to string
Declaration
Objective-C
extern NSString * CostingOptionsTruckSerialize(const CostingOptionsTruck *options)Swift
func serialize() -> String! -
Serialize options to string
Declaration
Objective-C
extern NSString * CostingOptionsMotorScooterSerialize(const CostingOptionsMotorScooter *options)Swift
func serialize() -> String! -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsAutoInit(CostingOptionsAuto *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsBicycleInit(CostingOptionsBicycle *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsPedestrianInit(CostingOptionsPedestrian *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsStraightInit(CostingOptionsStraight *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsMotorcycleInit(CostingOptionsMotorcycle *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsTruckInit(CostingOptionsTruck *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool -
Init from serialized string
Declaration
Objective-C
extern _Bool CostingOptionsMotorScooterInit(CostingOptionsMotorScooter *options, NSString *data)Swift
mutating func read(_ data: String!) -> Bool
Install in Dash
Functions Reference