Navigation SDK Documentation

Functions

Functions

SDK_ERROR SDK_API SDK_InitMapView (SDK_INT4 WndHandle, SDK_INT4 *pHandle)
 
SDK_ERROR SDK_API SDK_InitMapViewFB (SDK_UINT2 *pixelData, SDK_UINT2 width, SDK_UINT2 height, SDK_BOOL upsideDown, SDK_INT4 *pHandle)
 
SDK_ERROR SDK_API SDK_InitMapViewGL (SDK_UINT2 width, SDK_UINT2 height, SDK_INT4 *pHandlek)
 
SDK_ERROR SDK_API SDK_InitMapDC (SDK_INT4 hdc, SDK_INT4 paintLeft, SDK_INT4 paintRight, SDK_INT4 paintTop, SDK_INT4 paintBottom, SDK_INT4 *pHandle)
 
SDK_ERROR SDK_API SDK_ReleaseMapView (SDK_INT4 MapView)
 
SDK_ERROR SDK_API SDK_SendMapViewEvent (SDK_INT4 MapView, const SDK_NavigationInformation *pNavigationInformation, const SDK_MapViewEventData *pMapViewEvent, void *pixelData)
 
SDK_ERROR SDK_API SDK_GetMapViewParameter (SDK_INT4 MapView, SDK_INT4 *pCenterX, SDK_INT4 *pCenterY, SDK_INT4 *pScale, SDK_INT4 *pOrientation, SDK_BOOL *pMode3d, SDK_INT4 *pPitch)
 
SDK_ERROR SDK_API SDK_SetMapViewParameter (SDK_INT4 MapView, SDK_INT4 Mask, SDK_INT4 CenterX, SDK_INT4 CenterY, SDK_INT4 Scale, SDK_INT4 Orientation, SDK_BOOL Mode3d, SDK_INT4 Pitch)
 
SDK_ERROR SDK_API SDK_Zoom2Trace (SDK_INT4 MapView, SDK_INT4 TraceId, SDK_INT4 TranslateX, SDK_INT4 TranslateY)
 
SDK_ERROR SDK_API SDK_SetMapViewColorsFromFile (SDK_INT4 MapView, const SDK_WCHAR_T *Filename, SDK_BOOL IsDay)
 
SDK_ERROR SDK_API SDK_TranslateMapByPixelPos (SDK_INT4 MapView, SDK_INT4 x1, SDK_INT4 y1, SDK_INT4 x2, SDK_INT4 y2)
 
SDK_ERROR SDK_API SDK_SetMapViewStyles (SDK_INT4 MapView, SDK_BOOL RenderHouseNr, SDK_BOOL RenderStreetNames)
 
SDK_ERROR SDK_API SDK_GetMapViewStyles (SDK_INT4 MapView, SDK_BOOL *pRenderHouseNr, SDK_BOOL *pRenderStreetNames)
 
SDK_ERROR SDK_API SDK_GetMapViewBrightness (SDK_INT4 MapView, SDK_INT4 *pBrightness)
 
SDK_ERROR SDK_API SDK_SetMapViewBrightness (SDK_INT4 MapView, SDK_INT4 Brightness)
 
SDK_ERROR SDK_API SDK_GetMapViewDayNight (SDK_INT4 MapView, SDK_INT4 *pFactor)
 
SDK_ERROR SDK_API SDK_SetMapViewDayNight (SDK_INT4 MapView, SDK_INT4 Factor)
 
SDK_ERROR SDK_API SDK_GetMapViewBackgroundColor (SDK_UINT2 *bgColor)
 
SDK_ERROR SDK_API SDK_SetMapViewGrayMode (SDK_INT4 MapView, SDK_BOOL GrayMode)
 
SDK_ERROR SDK_API SDK_GetMapViewGrayMode (SDK_INT4 MapView, SDK_BOOL *GrayMode)
 
SDK_ERROR SDK_API SDK_SetMapViewElements (SDK_INT4 MapView, SDK_UINT4 AddElements, SDK_UINT4 RemoveElements)
 
SDK_ERROR SDK_API SDK_GetMapViewFixPoint (SDK_INT4 MapView, SDK_INT4 *pRelPosX, SDK_INT4 *pRelPosY)
 
SDK_ERROR SDK_API SDK_SetMapViewFixPoint (SDK_INT4 MapView, SDK_INT4 RelPosX, SDK_INT4 RelPosY)
 
SDK_ERROR SDK_API SDK_SetMapMarker (SDK_INT4 MapView, SDK_INT4 CenterX, SDK_INT4 CenterY, SDK_INT4 Orientation, SDK_BOOL bNorthenAdjusted, SDK_INT4 Style)
 
SDK_ERROR SDK_API SDK_GetMapMarker (SDK_INT4 MapView, SDK_INT4 *pCenterX, SDK_INT4 *pCenterY, SDK_INT4 *pOrientation, SDK_BOOL *pUp, SDK_INT4 *pStyle)
 
SDK_ERROR SDK_API SDK_CreateBuddy (const SDK_WCHAR_T *pBitmapName, const SDK_WCHAR_T *pBuddypName, SDK_INT4 *pBuddyId)
 
SDK_ERROR SDK_API SDK_PositionBuddy (SDK_INT4 BuddyId, SDK_INT4 CenterX, SDK_INT4 CenterY)
 
SDK_ERROR SDK_API SDK_DeleteBuddy (SDK_INT4 BuddyId)
 
SDK_ERROR SDK_API SDK_GetBuddyCount (SDK_INT4 *pBuddyCount)
 
SDK_ERROR SDK_API SDK_AddBuddyAlert (SDK_INT4 BuddyId, SDK_INT4 *pBuddyAlertId, SDK_INT4 Distance, SDK_INT4 AlertTyp)
 
SDK_ERROR SDK_API SDK_DeleteBuddyAlert (SDK_INT4 BuddyId, SDK_INT4 BuddyAlertId)
 
SDK_ERROR SDK_API SDK_CheckBuddyAlerts (SDK_INT4 CenterX, SDK_INT4 CenterY, SDK_BuddyAlertState **pAlertState)
 
SDK_ERROR SDK_API SDK_FreeBuddyAlertState (SDK_BuddyAlertState *pAlertState)
 
SDK_ERROR SDK_API SDK_AddImage (const SDK_WCHAR_T *pBitmapName, const SDK_WCHAR_T *pText, const SDK_Position *Position, SDK_INT4 *pImageId)
 
SDK_ERROR SDK_API SDK_PositionImage (SDK_INT4 ImageId, const SDK_Position *Position)
 
SDK_ERROR SDK_API SDK_HilightImage (SDK_INT4 ImageId, SDK_INT4 Duration)
 
SDK_ERROR SDK_API SDK_DeleteImage (SDK_INT4 ImageId)
 
SDK_ERROR SDK_API SDK_DeleteImages ()
 
SDK_ERROR SDK_API SDK_SetStandardTraceParameters (SDK_INT4 MapView, SDK_UINT1 LineWidth, SDK_COLOR InnerColor, SDK_COLOR OuterColor, SDK_INT4 TraceID)
 
SDK_ERROR SDK_API SDK_AddTrace (SDK_INT4 MapView, SDK_BOOL BeforeRouteTrace, SDK_INT4 PolyCount, const SDK_Position *pPolyPoints, SDK_COLOR InnerColor, SDK_COLOR OuterColor, SDK_INT4 LineStyle, SDK_INT4 LineWidth, SDK_INT4 *pTraceID)
 
SDK_ERROR SDK_API SDK_RemoveTrace (SDK_INT4 MapView, SDK_INT4 TraceID)
 
SDK_ERROR SDK_API SDK_SetAutoZoomSpeedScales (SDK_BOOL TrackingMode, SDK_UINT4 *MarginalSpeeds, SDK_UINT4 *scaleFactor2d, SDK_UINT4 *scaleFactor3d)
 
SDK_ERROR SDK_API SDK_SetAutoZoomScaleMargins (SDK_UINT4 minZoomSlow2d, SDK_UINT4 minZoomFast2d, SDK_UINT4 maxZoom2d, SDK_UINT4 minZoomSlow3d, SDK_UINT4 minZoomFast3d, SDK_UINT4 maxZoom3d)
 
SDK_ERROR SDK_API SDK_SetAutoZoomSteppingValues (SDK_FLOAT stepOut, SDK_FLOAT stepIn)
 
SDK_ERROR SDK_API SDK_DoAutoZoom (SDK_INT4 MapView, const SDK_NavigationInformation *NavInfo, const SDK_GPSData *GPSData, SDK_BOOL DoSmoothZoom)
 

Detailed Description

Functions to control the mapviews.

Function Documentation

SDK_ERROR SDK_API SDK_InitMapView ( SDK_INT4  WndHandle,
SDK_INT4 pHandle 
)

Initializes a new Mapview (only under Windows)

Attention: This method works only under Windows (not UWP) with a given HWND!

An application can contain more than one MapView. This allows to show multiple maps in one application. The MapViews are independent from each other. This means they can show different sections of a map at the same time. MapViews have to be released by calling SDK_ReleaseMapView()! Note that MapViews are also memory consuming (a multiple of the amount required just for the internal bitmap representation. So watch the memory footprint and avoid creating too many unused MapViews.

Parameters
[in]WndHandleThe Window Handle of the object the Mapview is displayed on. To offer all functionality the object must be capable of receiving and sending MouseEvents.
[out]pHandleA mapview id (>=0) or value < in case of error
Returns
Error code (Errorcodes). Typical error codes are SDK_ERROR_InvalidParameter or SDK_ERROR_OutOfResources
SDK_ERROR SDK_API SDK_InitMapViewFB ( SDK_UINT2 pixelData,
SDK_UINT2  width,
SDK_UINT2  height,
SDK_BOOL  upsideDown,
SDK_INT4 pHandle 
)

Initializes a new Mapview with frame buffer.

This method initializes a map view and uses the given buffer as the render target. It is independent of the underlying windows system and works on all supported platforms.

Instead of using a window handle like SDK_InitMapView, this version takes a pixel buffer to render the map to. For each pixel, the buffer must contain 2 bytes. The color encoding is 5/6/5 RGB. E.g. if you want a map of size 640x480 you need to allocate a pixel buffer of size 640*480*2 bytes.

Attention: The buffer width and so the width parameter of the function must be a multiple of two to avoid distortions while rendering!

A sample code snippet to initialize the map view would be:

set the internal width of the buffer to a multiple of 2 which is needed by the internal renderer if ((mWidth % 2) != 0) mWidth–;

SDK_INT4 handle; mBuffer = new uchar[mWidth * mHeight * 2]; SDK_InitMapViewFB(mBuffer, mWidth, mHeight, SDK_TRUE, &handle);

The caller has to take care to free the buffer and realloc it when the mapview size should change or when the mapview will be released.

Changing the size is done by freeing and reallocing the buffer to the new size, sending the command SDK_SendMapViewEvent() with parameter SDK_wmSize and the resized buffer along with the new width and height of the buffer.

An application can contain more than one MapView. This allows to show multiple maps in one application. The MapViews are independent from each other. This means they can show different sections of a map at the same time.

MapViews have to be released by calling SDK_ReleaseMapView()! Note that MapViews are also memory consuming (a multiple of the amount required just for the internal bitmap representation). So watch the memory footprint and avoid creating too many unused MapViews.

Parameters
[in]pixelDataThe pixel buffer used for rendering the map to.
[in]widthThe width of the pixel buffer.
[in]heightThe height of the pixel buffer.
[in]upsideDownChange vertical rendering direction
[out]pHandleA mapview id (>=0) or value <0 in case of error
Returns
Error code (Errorcodes). Typical error codes are SDK_ERROR_InvalidParameter or SDK_ERROR_OutOfResources
SDK_ERROR SDK_API SDK_InitMapDC ( SDK_INT4  hdc,
SDK_INT4  paintLeft,
SDK_INT4  paintRight,
SDK_INT4  paintTop,
SDK_INT4  paintBottom,
SDK_INT4 pHandle 
)

Initializes a new MapDC.

Attention: This method works only under Windows (not UWP) with a given HDC!

An application can contain more than one MapDC. This allows to show multiple maps in one application. The MapDCs are independent from each other. This means they can show different sections of a map at the same time. MapDCs have to be released by calling SDK_ReleaseMapView()! Note that MapDCs are also memory consuming (a multiple of the amount required just for the internal bitmap representation). So watch the memory footprint and avoid creating too many unused MapDCs. Note also the map MapDCs should have a dimensions which are each multiple of 4.

Parameters
[in]hdcReference to Device context (dc) To offer all functionality the object must be capable of receiving and sending MouseEvents.
[in]paintLeftLeft coordinate of rect used for painting the map within the map DC
[in]paintRightRight coordinate of rect used for painting the map within the map DC
[in]paintTopTop coordinate of rect used for painting the map within the map DC
[in]paintBottomBottom coordinate of rect used for painting the map within the map DC
[out]pHandleA mapdc id (>=0) or value < in case of error
Returns
Error code (Errorcodes). Typical error codes are SDK_ERROR_InvalidParameter or SDK_ERROR_OutOfResources
SDK_ERROR SDK_API SDK_ReleaseMapView ( SDK_INT4  MapView)

Releases a MapView/MapDC.

Call this to delete a single MapView/MapDC. Other map views of the application remain usable. When the NavigationSDK object is released, all its map views are released.

Parameters
[in]MapViewHandle to the Mapview
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SendMapViewEvent ( SDK_INT4  MapView,
const SDK_NavigationInformation pNavigationInformation,
const SDK_MapViewEventData pMapViewEvent,
void *  pixelData 
)

Sends an event to a particular MapView.

Sends an event like a paint event or a mouse move event to the MapView. See GUI handling for a list of all possible events that can be sent.

This function has multiple purposes:
First it will trigger a map update when the sent event is SDK_wmPAINT. Send this if you want to render the map.
Second, it will resize the MapView if SDK_wmSize is sent (and the correspondent size is set in the SDK_MapViewEventData).
Third, it is used to interact with the MapView standard interactors. The MapView has built in controls for zooming, panning and rotating 
to simplify interactions with the map. Some of these interactors are visible like the rotation control and some are not like the panning control. 
All these interactors can be enabled or disabled by calling \ref SDK_SetMapViewElements. 
The easiest way to use the interactors is to send all mouse events described in \ConstantsGUI to the MapView. 
Internally, the correct interactor will be chosen and the appropriate action will be performed.

Note that interacting with a MapView requires some care on the client side. Some basic UI handling is left up to the developer of the application to ensure all events are retrieved properly. E.g. mouse wheel events are sent to the window which has the focus. The Navigation SDK does not try to steal or set focus.

For convenience, messages which causes the MapView output to change (e.g. zooming by the mouse wheel) will implicitly call the map rendering function (as triggered by SDK_wmPAINT).

Attention: When rendering the map with SDK_wmPAINT, a route trace will only be rendered if pNavigationInformation is not NULL!

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]pNavigationInformationOptional pointer to the NavigationInformation object. If non-NULL and the information belongs to a valid navigation situation the route is painted as a blue trace into the map. If null, a route trace will not be rendered, even if one is available!
[in]pMapViewEventPointer to event structure.
[in]pixelDataPixel buffer, only used when the mapview was initialized by SDK_InitMapViewFB and the event is SDK_wmSize
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewParameter ( SDK_INT4  MapView,
SDK_INT4 pCenterX,
SDK_INT4 pCenterY,
SDK_INT4 pScale,
SDK_INT4 pOrientation,
SDK_BOOL pMode3d,
SDK_INT4 pPitch 
)

Return a set of parameters of a certain map view.

Retrieve information about the scale, the center of the map and so on.

Parameters
[in]MapViewThe internal number of the MapView/MapDC
[out]pCenterXPointer to variable where the actual x coordinate of the center is stored.
[out]pCenterYPointer to variable where the actual y coordinate of the center is stored.
[out]pScalePointer to variable where the scaling factor is stored. The scaling factor is a multiple of mercator units per pixel.
[out]pOrientationPointer to variable where the orientation is stored.
[out]pMode3dPointer to variable where the 3d flag is stored.
[out]pPitchPointer to variable where the pitch angle is stored.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewParameter ( SDK_INT4  MapView,
SDK_INT4  Mask,
SDK_INT4  CenterX,
SDK_INT4  CenterY,
SDK_INT4  Scale,
SDK_INT4  Orientation,
SDK_BOOL  Mode3d,
SDK_INT4  Pitch 
)

Set variables of a map view.

Set the parameters for a map view like the center of the map, the scale and so on. The bitmask defines which parameters to set.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]MaskBitmask which defines the parameters. Bit 1 sets the center coordinates, bit 2 set the scale, bit 3 set the orientation bit 4 set 2d vs. 3d mode (e.g. a binary number 1101 means that center coordinates and orientation are set, scale is ignored, 2d/3d mode is set). See Map view parameters for a list of pre-defined constants.
[in]CenterXThe x coordinate of the center (Mercator)
[in]CenterYThe y coordinate of the center (Mercator)
[in]ScaleDefines the scaling. The scaling factor is a multiple of mercator units per pixel.
[in]OrientationDefines the orientation. The value sets the rotation of the map (in degrees clockwise, 0 represents top).
[in]Mode3dToggles 3d mode (SDK_FALSE for 2d, SDK_TRUE for 3d)
[in]PitchThe pitch angle for 3d mode in degrees between 0 and 90
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_Zoom2Trace ( SDK_INT4  MapView,
SDK_INT4  TraceId,
SDK_INT4  TranslateX,
SDK_INT4  TranslateY 
)

Zooms to a custom trace. Use TraceId = 1 to zoom to current route trace.

Parameters
[in]MapViewid of the mapview
[in]TraceIdid of the trace
[in]TranslateXtranslate by x pixels
[in]TranslateYtranslate by y pixels
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewColorsFromFile ( SDK_INT4  MapView,
const SDK_WCHAR_T Filename,
SDK_BOOL  IsDay 
)

Set map view colors from file.

Set the colors for day/night from an external file given by filename (as an absolute path). The file is similar to the maprenderer.ini file, except that the color section is called [Colors] and that no other parameters than the colors will be read from the file.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]FilenameName of the file to load.
[in]IsDayIf true, the colors will be set as day colors, otherwise as night colors.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_TranslateMapByPixelPos ( SDK_INT4  MapView,
SDK_INT4  x1,
SDK_INT4  y1,
SDK_INT4  x2,
SDK_INT4  y2 
)

Translate the map by the given screen coordinates.

This function has to be used only when not using the standard map panning interactor (which is by default on). See SDK_SetMapViewElements for details on how to enable and disable map interactors. When the standard panning interactor is disabled, the panning must be done "manually" with this function. For moving the map, call this function with the last pixel position of the cursor in your view and the current position. The map will be moved by the difference of the two positions. Attention: to move correctly in the vertical screen direction, dependend on the vertical render direction set by SDK_InitMapViewFB, you may have to substract the current vertical position from the view height to move in the correct direction.

Parameters
[in]x1previous x-coordinate in screen pixels
[in]y1previous y-coordinate in screen pixels
[in]x2current x-coordinate in screen pixels
[in]y2current y-coordinate in screen pixels
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewStyles ( SDK_INT4  MapView,
SDK_BOOL  RenderHouseNr,
SDK_BOOL  RenderStreetNames 
)

Configure the rendering of house numbers and street names on the map.

This function will enable disable the rendering of streetnames and house numbers.

Parameters
[in]MapViewHandle to the MapView/MapDC
[in]RenderHouseNrDis/enable rendering of house numbers in 2d mode. In 3d they get never rendered.
[in]RenderStreetNamesDis/enable rendering of street names in 2d mode. In 3d they get never rendered.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewStyles ( SDK_INT4  MapView,
SDK_BOOL pRenderHouseNr,
SDK_BOOL pRenderStreetNames 
)

Retrieve information if rendering of house numbers and street names on the map is enabled or disabled.

Parameters
[in]MapViewHandle to the MapView/MapDC
[out]pRenderHouseNrDis/enable rendering of house numbers in 2d mode. In 3d they get never rendered.
[out]pRenderStreetNamesDis/enable rendering of street names in 2d mode. In 3d they get never rendered.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewBrightness ( SDK_INT4  MapView,
SDK_INT4 pBrightness 
)

Retrieve the brightness of the MapView.

Parameters
[in]MapViewHandle to the MapView/MapDC
[out]pBrightnessWill be set to a Number between 0 (dark) and 100 (bright, day)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewBrightness ( SDK_INT4  MapView,
SDK_INT4  Brightness 
)

Configure the brightness of the MapView. See SDK_SetMapViewDayNight() for an alternative.

Parameters
[in]MapViewHandle to the MapView/MapDC
[in]BrightnessNumber between 0 (dark) and 100 (bright, day)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewDayNight ( SDK_INT4  MapView,
SDK_INT4 pFactor 
)

Retrieve day and night mode setting.

Parameters
[in]MapViewHandle to the MapView/MapDC
[out]pFactorWill be set to a number from day colour set (100) to night colour set (0)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewDayNight ( SDK_INT4  MapView,
SDK_INT4  Factor 
)

Switch between day and night mode.

Parameters
[in]MapViewHandle to the MapView/MapDC
[in]FactorGradually switch from day colour set (100) to night colour set (0)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewBackgroundColor ( SDK_UINT2 bgColor)

Retrieve the current background color of the mapview in the current design and mode.

Parameters
[out]bgColorwill be set to the current background color of the mapview
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewGrayMode ( SDK_INT4  MapView,
SDK_BOOL  GrayMode 
)

Configure the graymode of the MapView.

Parameters
[in]MapViewHandle to the MapView/MapDC
[in]GrayModeactivate or deaactivete the gray mode of the MapView
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewGrayMode ( SDK_INT4  MapView,
SDK_BOOL GrayMode 
)

Retrieve gray mode setting.

Parameters
[in]MapViewHandle to the MapView/MapDC
[out]GrayModeis graymode activate or deactivte
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewElements ( SDK_INT4  MapView,
SDK_UINT4  AddElements,
SDK_UINT4  RemoveElements 
)

Enables or disables the built in map interactors.

The interactors are defined in List of map elements. Interactors are some kind of controls to zoom, pan or rotate the map. Some of them are visible, like the rotation and the measure interactor, some are not (like the panning and the wheel zoom interactor). The controls are by default on, but every interactor can be removed from the map. The main purpose of these controls is to make the interaction with the map easier. The only thing the user has to do is to send the mouse events "SDK_wmLBUTTONUP", "SDK_wmLBUTTONDOWN", "SDK_wmMOUSEMOVE" and "SDK_wmWHEEL" along with the position and or the wheel delta with SDK_SendMapViewEvent to the MapView. The SDK will automatically select the correct interactor and trigger the action for it. As you can see in the List of map elements, there are also two interactors for 3D in the list. The switch between the 2D and 3D interactor will be done automatically by the SDK, depending on the viewing mode. Manually activating or deactivating them when switching from 2D to 3D and vice versa is not necessary.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]AddElementsBool sum of elements to be added, e.g. SDK_mapMEASURECTRL|SDK_mapROTATIONCTRL
[in]RemoveElementsBool sum of elements to be removed, e.g. SDK_mapMEASURECTRL|SDK_mapROTATIONCTRL
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapViewFixPoint ( SDK_INT4  MapView,
SDK_INT4 pRelPosX,
SDK_INT4 pRelPosY 
)

Get the fix point of the Map view.

The fix point is the point where the map rotates around.

Parameters
[in]MapViewHandle to the Mapview
[out]pRelPosXPointer to retrieve Position in 100*% of the screen pixel width counting from the center (e.g. offset to left[right] is indicated by -1[1] to -99[99])
[out]pRelPosYPointer to retrieve Position in 100*% of the screen pixel height couting from the center (e.g. offset to lower[higher] is indicated by -1[1] to -39[39])
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapViewFixPoint ( SDK_INT4  MapView,
SDK_INT4  RelPosX,
SDK_INT4  RelPosY 
)

Adjust the fix point of the Map view.

The fix point is the point where the map rotates around.

Parameters
[in]MapViewHandle to the Mapview
[in]RelPosXPosition in 100*% of the screen pixel width counting from the center (e.g. to move left[right], use -1[1] to -99[99])
[in]RelPosYPosition in 100*% of the screen pixel height couting from the center (e.g. to move lower[higher], use -1[1] to -39[39])
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetMapMarker ( SDK_INT4  MapView,
SDK_INT4  CenterX,
SDK_INT4  CenterY,
SDK_INT4  Orientation,
SDK_BOOL  bNorthenAdjusted,
SDK_INT4  Style 
)

Position a marker indicating the current position on the map.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]CenterXThe x coordinate of the center (Mercator)
[in]CenterYThe y coordinate of the center (Mercator)
[in]OrientationDefines the orientation of the marker (if suitable). The valus is given in degree clockwise, 0 represents top.
[in]bNorthenAdjustedif set to true the orientation is ignored and the marker is always directed towards the top of the map
[in]StyleDefines which kind marker is being drawn, see Map marker parameters. Use SDK_mm_None to remove the marker
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetMapMarker ( SDK_INT4  MapView,
SDK_INT4 pCenterX,
SDK_INT4 pCenterY,
SDK_INT4 pOrientation,
SDK_BOOL pUp,
SDK_INT4 pStyle 
)

Retrieve information about the position of the marker indicating the current position on the map.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[out]pCenterXThe x coordinate of the center (Mercator)
[out]pCenterYThe y coordinate of the center (Mercator)
[out]pOrientationDefines the orientation of the marker (if suitable). The valus is given in degree clockwise, 0 represents top.
[out]pUpif set to true the orientation is ignored and the marker is always directed towards the top of the map
[out]pStyleDefines which kind marker is being drawn, see Map marker parameters. Use SDK_mm_None to remove the marker
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_CreateBuddy ( const SDK_WCHAR_T pBitmapName,
const SDK_WCHAR_T pBuddypName,
SDK_INT4 pBuddyId 
)

Create an item (buddy) that can be rendered on the map.

Buddies are elements on the map with a custom bitmap (only the "PNG" format is supported) and a name. They can be dynamically positioned on the map. Also, an alert can be added to a buddy to recognize the entering or leaving of a zone around the buddy. The buddy must be positoned by SDK_PositionBuddy to show it on the map. The buddy will be shown on all map views!

Parameters
[in]pBitmapNamePath to a bitmap (only "PNG images are supported). The path can be the full path to the bitmap or a relative path to the application directory set by SDK_Initialize.
[in]pBuddyNameName of the buddy that will be displayed on the map. May be NULL.
[out]pBuddyIdWill be set to unique buddy, or -1 in case of error
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_PositionBuddy ( SDK_INT4  BuddyId,
SDK_INT4  CenterX,
SDK_INT4  CenterY 
)

Position a buddy on the map so it gets rendered at the next map update.

Parameters
[in]BuddyIdValid buddy id
[in]CenterXThe x coordinate of the center (Mercator)
[in]CenterYThe y coordinate of the center (Mercator)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_DeleteBuddy ( SDK_INT4  BuddyId)

Delete buddy.

Delete a previously created buddy.

Parameters
[in]BuddyIdValid buddy id
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetBuddyCount ( SDK_INT4 pBuddyCount)

Get the number of buddy items.

Parameters
[in,out]buddyCountthe number of buddy items.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_AddBuddyAlert ( SDK_INT4  BuddyId,
SDK_INT4 pBuddyAlertId,
SDK_INT4  Distance,
SDK_INT4  AlertTyp 
)

Add an alert to a buddy with the given ID.

Alerts are used to recognize if a circular area around a buddy is entered or leaved. Alert types are SDK_ALERT_IN for entering an area and SDK_ALERT_OUT for leaving an area. The status of the alert must be checked by SDK_CheckBuddyAlerts. A buddy can have multiple alerts like in-alerts at 200, 300 and 400m and out-alerts at 100 and 300m. Attention: An alert will rise only one time, when the position, given in SDK_CheckBuddyAlerts, switches between inside and outside for SDK_ALERT_OUT or vice versa for SDK_ALERT_IN. So, if you get a positive check from SDK_CheckBuddyAlerts for a particular event, this event will not show up anymore, even if the transition situation is the same. You can't use an alert for checking if someone is inside or outside the radius. You only can check, if someone transits the zone. Because the alert will only rise once, you have to create a new one for this buddy if you want to be informed multiple times.

Parameters
BuddyIDthe ID of the buddy to add the alert
[out]pAlertIDthe ID that is assigned to the buddy alert for its lifetime
Distancethe radius of the transit zone around the buddy
AlertTyptype of alert, either SDK_ALERT_IN or SDK_ALERT_OUT
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_DeleteBuddyAlert ( SDK_INT4  BuddyId,
SDK_INT4  BuddyAlertId 
)

Delete an alert with the given BuddyId and AlertID.

Deletes the corresponding alert of the buddy.

Parameters
[in]BuddyIDthe ID of the buddy to delete
[in]AlertIDthe ID of the alert to delete
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_CheckBuddyAlerts ( SDK_INT4  CenterX,
SDK_INT4  CenterY,
SDK_BuddyAlertState **  pAlertState 
)

Check if alerts exists for the given position.

Check if alerts exists and fill pAlertState with the corresponding information. pAlertState allocates memory which needs to be freed with SDK_FreeBuddyAlertState.

Parameters
[in]positioncurrent gps-position
[out]pAlertStatestruct with the state of all buddy alerts needs to be freed with SDK_FreeBuddyAlertState
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_FreeBuddyAlertState ( SDK_BuddyAlertState pAlertState)

Free the memory of pAlertState which was allocated with SDK_CheckBuddyAlerts.

Parameters
[in]pAlertStatepointer to the SDK_BuddyAlertState which needs to be freed
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_AddImage ( const SDK_WCHAR_T pBitmapName,
const SDK_WCHAR_T pText,
const SDK_Position Position,
SDK_INT4 pImageId 
)

Add a png image at the given position to the map.

The image will be shown on all map views!

Parameters
[in]pBitmapNamePath to a bitmap (only the "PNG" format is supported). The path can de the full path to the bitmap or a relative path to the application directory (which was set in SDK_Initialize).
[in]pTexttext centered on image
[in]PositionThe coordinate of the image to be shown (mercator)
outn]pImageId The id of the added image
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_PositionImage ( SDK_INT4  ImageId,
const SDK_Position Position 
)

(Re)Positions the image with the given id

Parameters
[in]ImageIdThe id of the image to position
[in]PositionThe coordinate of the image to be shown (mercator)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_HilightImage ( SDK_INT4  ImageId,
SDK_INT4  Duration 
)

Hilights the image with the given id.

Parameters
[in]ImageIdThe id of the image to hilight
[in]DurationThe duration in milliseconds the image should be hilighted. 0 for infinite time, negative for removing highlight.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_DeleteImage ( SDK_INT4  ImageId)

Deletes the image with the given id.

Parameters
[in]ImageIdThe id of the image to position
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_DeleteImages ( )

Delete all images set by SDK_AddImage.

Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetStandardTraceParameters ( SDK_INT4  MapView,
SDK_UINT1  LineWidth,
SDK_COLOR  InnerColor,
SDK_COLOR  OuterColor,
SDK_INT4  TraceID 
)

Adjust the visual appearance of traces.

Adjust the visual appearance of some generic trace types, including route and TMC traces.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]LineWidththe absolute size in pixel. For 2d maps that one is constant all over the output, for 3d it is of course scaled according to the projection.
[in]InnerColorColor for the inner of the trace
[in]OuterColorColor for the outer of the trace
[in]TraceIDthe value 1 specifies the route trace, greater IDs specify TMC and/or custom traces. Values lower than 1 are ignored
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_AddTrace ( SDK_INT4  MapView,
SDK_BOOL  BeforeRouteTrace,
SDK_INT4  PolyCount,
const SDK_Position pPolyPoints,
SDK_COLOR  InnerColor,
SDK_COLOR  OuterColor,
SDK_INT4  LineStyle,
SDK_INT4  LineWidth,
SDK_INT4 pTraceID 
)

Add a polyline to the internal rendering data.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]BeforeRouteTraceif SDK_TRUE polyline will be drawn before route trace (if any), else afterwards (e.g. on top)
[in]PolyCountNumber of polygon points
[in]pPolyPointsnon-NULL pointer to route trace
[in]InnerColorColor for the inner of the trace
[in]OuterColorColor for the outer of the trace
[in]LineStyleunsupported
[in]LineWidthIf >0 it is the absolute size in pixel. For 2d maps that one is constant all over the output, for 3d it is of course scaled according to the projection. Negative values are interpreted as an increment by the absolute, i.e. positive, value on top of the maximum street width.
[out]pTraceIDwill be set trace ID to be used for further requests to that object, e.g. calls to SDK_RemoveTrace()
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_RemoveTrace ( SDK_INT4  MapView,
SDK_INT4  TraceID 
)

Remove a trace from the map.

Removes a trace/polyline which was formerly added by SDK_AddTrace.

Parameters
[in]MapViewHandle to the MapView/MapDC.
[in]TraceIDtrace id as obtained by SDK_AddTrace() to be deleted. Use negative values to remove all traces added via AddTrace() to the given Mapview.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetAutoZoomSpeedScales ( SDK_BOOL  TrackingMode,
SDK_UINT4 MarginalSpeeds,
SDK_UINT4 scaleFactor2d,
SDK_UINT4 scaleFactor3d 
)

Set the auto zoom scales for the given speeds for tracking and navigation mode. The auto zoom uses in non maneuver situations the current velocity and the velocity of the current road segment to determine the scale value. There are five speed values at which the scale changes. Each speed value has a correspondent scale value in 2d and 3d. This function sets the speeds and the correspondent scale values.

The values are internally set to suitable values. You only have to call this function if you are not satisfied with these values. The default values are:

MarginalSpeeds [km/h]: | 0 | 30 | 50 | 80 | 110 | scaleFactor2d (TrackingMode == SDK_TRUE): | 32 | 44 | 68 | 220 | 400 | scaleFactor3d (TrackingMode == SDK_TRUE): | 20 | 29 | 56 | 112 | 220 | scaleFactor2d (TrackingMode == SDK_FALSE): | 32 | 40 | 168 | 440 | 720 | scaleFactor3d (TrackingMode == SDK_FALSE): | 24 | 32 | 100 | 280 | 400 |

    \param[in] TrackingMode If set to SDK_TRUE, set the tracking speeds and scales, else the navigation speeds and scales will be set
Parameters
[in]MarginalSpeedsThe speeds at which the scale should change
[in]scaleFactor2dThe scales for the MarginalSpeeds in 2d
[in]scaleFactor3dThe scales for the MarginalSpeeds in 3d
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetAutoZoomScaleMargins ( SDK_UINT4  minZoomSlow2d,
SDK_UINT4  minZoomFast2d,
SDK_UINT4  maxZoom2d,
SDK_UINT4  minZoomSlow3d,
SDK_UINT4  minZoomFast3d,
SDK_UINT4  maxZoom3d 
)

Set the auto zoom scale margins in 2d and 3d. This function sets the minimum and the maximum zoom level the auto zoom can get when zooming is caused by a maneuver. There are two minimum levels for 2d and two minimum levels for 3d. The minZoomSlow2d/minZoomSlow3d will be the lowest scale the auto zoom can reach in a maneuver zoom in 2d/3d if the velocity is lower than 72 km/h. If the velocity is equal or higher than 72 km/h, the values of minZoomFast2d/minZoomFast3d will be used as minimum. The maxZoom2d/maxZoom3d values are the upper limit of the auto zoom in maneuver mode.

The values are internally set to suitable values. You only have to call this function if you are not satisfied with these values. The default values are:

minZoomSlow2d (speed < 72 km/h): 20 minZoomFast2d (speed >= 72 km/h): 50 minZoomSlow3d (speed < 72 km/h): 16 minZoomFast3d (speed >= 72 km/h): 36

maxZoom2d: 30000 maxZoom3d: 2600

    \param[in] minZoomSlow2d Minimum zoom level for velocities < 72 km/h in maneuver zoom (2d)
    \param[in] minZoomFast2d Minimum zoom level for velocities >= 72 km/h in maneuver zoom (2d)
    \param[in] maxZoom2d Maximum zoom level in maneuver zoom (2d)
    \param[in] minZoomSlow3d Minimum zoom level for velocities < 72 km/h in maneuver zoom (3d)              
    \param[in] minZoomFast3d Minimum zoom level for velocities >= 72 km/h in maneuver zoom (3d)             
    \param[in] maxZoom3d Maximum zoom level in maneuver zoom (3d)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SetAutoZoomSteppingValues ( SDK_FLOAT  stepOut,
SDK_FLOAT  stepIn 
)

Set the auto zoom linear approximation stepping values To avoid jumping in or out while zooming, the auto zoom will add or substract at each call to SDK_DoAutoZoom() a stepping value to the current scale until the calculated scale will be reached. The default steppings are 1 for stepping out and 30 for stepping in (for 4 times calling the function per second).

Parameters
[in]stepOutIncremental scale value for stepping out, default is 1
[in]stepInIncremental scale value for stepping in, default is 30
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_DoAutoZoom ( SDK_INT4  MapView,
const SDK_NavigationInformation NavInfo,
const SDK_GPSData GPSData,
SDK_BOOL  DoSmoothZoom 
)

Calculate a scale value that depends on the current velocity, current street type and maneuver situation.

The auto zoom will automatically scale the map by the above parameters. It has two modes:

  • If a maneuver is in front, it will zoom in to get a better view over the maneuver area.
  • If no maneuver is in front, it chooses a scale value that matches the driving situation. If driving fast, it will zoom out to have a better overview, if driving slow, it will zoom in.

The zooming scales in non maneuver mode can be set for five speeds with SDK_SetAutoZoomSpeedScales for 2d and 3d and for tracking and navigation mode separately. To avoid jumping in or out while zooming, the auto zoom will add or substract at each call to SDK_DoAutoZoom() a stepping value to the current scale until the calculated scale will be reached (if DoSmoothZoom is set to SDK_TRUE). This stepping value can be changed by calling SDK_SetAutoZoomSteppingValues. The default steppings are 1 for stepping out and 30 for stepping in (for 4 times calling the function per second). If DoSmoothZoom is set to SDK_FALSE, the calculated scale value for the zoom will be set immediately, which means that the zomm level will jump. This is useful if you changed the auto zoom from the manual to auto zoom. In all other cases, setting the value to SDK_TRUE is the best choice.

This function must be called repeatedly in every navigation loop iteration to function correctly.

Parameters
[in]MapViewThe mapview for which the auto zoom should be calculated
[in]NavInfoThe current navigation information. If valid and a maneuver is in front, the auto zoom will zoom to the maneuver, if null or no maneuver is in front, the auto zoom will zoom to the appropriate value given by the speed/scale tables.
[in]GPSDataThe current gps data
[in]DoSmoothZoomIf set to SDK_TRUE, the internally calculated scale will be approached by adding the stepping values to the current scale at each call of this function until the scale is reached.
Returns
Error code (Errorcodes)

© PTV Group 2019 Generated on Thu Mar 28 2019 02:27:02 for NavigationSDK by doxygen 1.8.8