Functions

The following functions are available globally.

  • Changes map marker style

    Declaration

    Objective-C

    void GLMapMarkerSetStyle(GLMapMarkerData _Nonnull data, unsigned int style)

    Parameters

    data

    Marker object to be changed

    style

    Style identifier

  • Sets text for map marker.

    Declaration

    Objective-C

    void GLMapMarkerSetText(GLMapMarkerData _Nonnull data, NSString *_Nonnull text,
                            CGPoint offset, GLMapVectorStyle *_Nonnull style)

    Parameters

    data

    Marker object to be changed

    text

    Text for marker object

    offset

    offset on screen in points

    style

    Text style

  • Checks if it’s error or success code

    Declaration

    Objective-C

    static inline _Bool GLMapIsSuccess(GLMapError v)
  • Creates GLMapTilePos

    Declaration

    Objective-C

    static inline GLMapTilePos GLMapTilePosMake(int x, int y, int z)

    Parameters

    x

    X coordinate

    y

    Y coordinate

    z

    Z coordinate

    Return Value

    New tile position

  • Creates new GLMapGeoPoint.

    Declaration

    Objective-C

    static inline GLMapGeoPoint GLMapGeoPointMake(double lat, double lon)

    Parameters

    lat

    Latitude

    lon

    Longitude

    Return Value

    New geo point

  • Checks equality of two geo points

    Declaration

    Objective-C

    static inline _Bool GLMapGeoPointEqual(GLMapGeoPoint a, GLMapGeoPoint b)

    Parameters

    a

    First geo point

    b

    Second geo point

    Return Value

    true if map points is equal

  • Creates new GLMapPoint

    Declaration

    Objective-C

    static inline GLMapPoint GLMapPointMake(double x, double y)

    Parameters

    x

    X coordinate

    y

    Y coordinate

    Return Value

    New map point

  • Checks equality of two map points

    Declaration

    Objective-C

    static inline _Bool GLMapPointEqual(GLMapPoint a, GLMapPoint b)

    Parameters

    a

    First map point

    b

    Second map point

    Return Value

    true if map points is equal

  • 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)

    Parameters

    r

    Red channel value

    g

    Green channel value

    b

    Blue channel value

    a

    Alpha channel value

    Return Value

    Returns new color object

  • 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)

    Parameters

    r

    Red channel value

    g

    Green channel value

    b

    Blue channel value

    a

    Alpha channel value

    Return Value

    Returns new color object

  • Declaration

    Objective-C

    static inline uint8_t GLMapColorGetRed(GLMapColor color)

    Parameters

    color

    Input color

    Return Value

    Returns red channel value

  • Declaration

    Objective-C

    static inline uint8_t GLMapColorGetGreen(GLMapColor color)

    Parameters

    color

    Input color

    Return Value

    Returns green channel value

  • Declaration

    Objective-C

    static inline uint8_t GLMapColorGetBlue(GLMapColor color)

    Parameters

    color

    Input color

    Return Value

    Returns blue channel value

  • Declaration

    Objective-C

    static inline uint8_t GLMapColorGetAlpha(GLMapColor color)

    Parameters

    color

    Input color

    Return Value

    Returns alpha channel value

  • Creates UIColor object from our GLMapColor

    Declaration

    Objective-C

    UIColor *_Nullable UIColorFromGLMapColor(GLMapColor color)

    Parameters

    color

    Initial color

    Return Value

    New UIColor object

  • Convert UIColor to GLMapColor

    Declaration

    Objective-C

    GLMapColor GLMapColorMakeFromUIColor(UIColor *_Nonnull color)

    Parameters

    color

    color to conver @- returns: converted value

  • Converts NSData objects into GLMapResources.

    Declaration

    Objective-C

    GLMapResource GLMapResourceWithData(NSData *_Nonnull data)

    Parameters

    data

    Data 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)
  • Adds point into existing bounding box.

    Declaration

    Objective-C

    static inline GLMapBBox GLMapBBoxAddPoint(GLMapBBox bbox, GLMapPoint point)

    Parameters

    bbox

    Bounding box

    point

    Point to add into bounding box

  • Checks if the bbox contains the point

    Declaration

    Objective-C

    static inline _Bool GLMapBBoxContains(GLMapBBox bbox, GLMapPoint point)

    Parameters

    bbox

    Bounding box

    point

    Point 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)

    Parameters

    origin

    Origin point

    width

    Width

    height

    Height

    Return Value

    New bounding box

  • Checks equality of two bounding boxes

    Declaration

    Objective-C

    static inline _Bool GLMapBBoxEqual(GLMapBBox a, GLMapBBox b)

    Parameters

    a

    First bounding box

    b

    Second bounding box

    Return Value

    true if bounding boxes is equal

  • Returns center of bbox

    Declaration

    Objective-C

    static inline GLMapPoint GLMapBBoxCenter(GLMapBBox a)

    Return Value

    center of bbox

  • Computes distance from bounding box to point

    Declaration

    Objective-C

    double GLMapBBoxDistanceToPoint(GLMapBBox bbox, GLMapPoint point)

    Parameters

    bbox

    Bounding box

    point

    Point

    Return Value

    Distance in internal coordinates

  • Checks if two bbox have any common point

    Declaration

    Objective-C

    static inline _Bool GLMapBBoxIntersects(GLMapBBox a, GLMapBBox b)

    Parameters

    a

    First bounding bbox

    b

    Second bounding bbox

    Return Value

    true if bbox intersecs other bbox

  • Creates map point from geo coordinates

    Declaration

    Objective-C

    GLMapPoint GLMapPointMakeFromGeoCoordinates(double lat, double lon)

    Parameters

    lat

    Latitude

    lon

    Longitude

    Return Value

    New map point

  • Creates map point from geo point

    Declaration

    Objective-C

    GLMapPoint GLMapPointFromMapGeoPoint(GLMapGeoPoint point)

    Parameters

    point

    Geo point

    Return Value

    New point

  • Creates map point from tile position

    Declaration

    Objective-C

    GLMapPoint GLMapPointFromMapTilePos(GLMapTilePos tilePos)

    Parameters

    tilePos

    Tile position

    Return Value

    New point

  • Creates geo point from map coordinates

    - parameter: point Map point
    - returns: New geo point
    

    Declaration

    Objective-C

    GLMapGeoPoint GLMapGeoPointFromMapPoint(GLMapPoint point)
  • Calculates distance between two points on map

    Declaration

    Objective-C

    double GLMapDistanceBetweenPoints(GLMapPoint a, GLMapPoint b)

    Parameters

    a

    First point on map

    b

    Second point on map

    Return Value

    Distance in meters

  • Calculates distance between two points. Сontains internal conversion to GLMapGeoPoint.

    Declaration

    Objective-C

    double GLMapDistanceBetweenGeoPoints(GLMapGeoPoint a, GLMapGeoPoint b)

    Parameters

    a

    First geo point

    b

    Second geo point

    Return Value

    Distance in meters

  • Calculates bearing between two geo points.

    Declaration

    Objective-C

    double GLMapBearingBetweenPoints(GLMapPoint a, GLMapPoint b)

    Parameters

    a

    First point

    b

    Second point

    Return Value

    bearing angle in degrees

  • Calculates bearing between two points. Сontains internal conversion to GLMapGeoPoint.

    Declaration

    Objective-C

    double GLMapBearingBetweenGeoPoints(GLMapGeoPoint a, GLMapGeoPoint b)

    Parameters

    a

    First geo point

    b

    Second geo point

    Return Value

    bearing angle in degrees

  • Creates new empty set *

    Declaration

    Objective-C

    GLMapPointSet _Nonnull GLMapPointSetCreate()
  • Destroys set

    Declaration

    Objective-C

    void GLMapPointSetDestroy(GLMapPointSet _Nonnull set)

    Parameters

    set

    set to destroy *

  • Adds new point to set. Can add many points with same coordinates.

    Declaration

    Objective-C

    void GLMapPointSetInsert(GLMapPointSet _Nonnull set, GLMapPoint point)

    Parameters

    set

    set to modify

    point

    point to add *

  • Inserts new point to set.

    Declaration

    Objective-C

    _Bool GLMapPointSetInsertUnique(GLMapPointSet _Nonnull set, GLMapPoint point)

    Parameters

    set

    set to modify

    point

    point to insert.

    Return Value

    true if point is inserted. false if point with same coordinates already in set. *

  • Removes point from set

    Declaration

    Objective-C

    _Bool GLMapPointSetRemove(GLMapPointSet _Nonnull set, GLMapPoint point)

    Parameters

    set

    set to modify

    point

    point 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)

    Parameters

    set

    set to test

    point

    point 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)

    Parameters

    set

    object created by GLMapPointSetCreate

    point

    reference point to calculate distance

    Return Value

    Nearest point in set *