MapTrip SDK Android Manual 9.10.8
 
Loading...
Searching...
No Matches
Mapviewer Class Reference

The mapviewer is used to visualize the map, routes, pois etc.
More...

+ Inheritance diagram for Mapviewer:

Public Member Functions

final ApiError disableCoiZoom ()
 
final ApiError disableRealityView ()
 
final ApiError disableSignPost ()
 
final ApiError disableSpeedDependentZoom ()
 
final ApiError enableCoiZoom ()
 
final ApiError enableLocationTracking (final boolean enable, final int mSecToPauseAfterTouch)
 
final ApiError enableRealityView ()
 
final ApiError enableRotation (final boolean enable)
 
final ApiError enableSignPost ()
 
final ApiError enableSpeedDependentZoom ()
 
boolean equals (Object o)
 
final native boolean extendedSoftVehicleAttributesAreVisible ()
 
final native boolean extendedVehicleAttributesAreVisible ()
 
final native int getActiveRefreshInterval ()
 
final double getCarIconLookAheadRatio2D ()
 
final double getCarIconLookAheadRatio3DLandscape ()
 
final double getCarIconLookAheadRatio3DPortrait ()
 
final Position getCarIconPosition ()
 
final Position getCenterPoint ()
 
final String getColorProfile ()
 
final Position getFrameCoordFromGeoCoord (final Position pos)
 
final Position getGeoCoordFromFrameCoord (final Position frame)
 
final int getGesturingRefreshInterval ()
 
final double getGroundResolution ()
 
final Position getMapCenterOffsetLandscape ()
 
final Position getMapCenterOffsetPortrait ()
 
final native MapContent getMapContent ()
 
final MapPerspective getPerspective ()
 
final long getRouteColor (final RouteColor mode)
 
final boolean getRouteGuidanceMode ()
 
final int getTrackingRefreshInterval ()
 
final native double getViewingDistance ()
 
final double getViewingDistanceForRadius (final double radiusInMeters)
 
final double getViewingDistanceForRegion (final Position pos1, final Position pos2)
 
final void hideAllWaypoints ()
 
final native boolean isCoiZoomEnabled ()
 
final boolean isLayerVisible (final String layerName)
 
final boolean isLocationTrackingEnabled ()
 
final native boolean isPoiCategoryVisible (PoiCategory poicategory)
 
final native boolean isPoiSourceVisible (PoiSource poisource)
 
final native boolean isRealityViewActive ()
 
final native boolean isRealityViewEnabled ()
 
final boolean isRotationEnabled ()
 
final boolean isSignPostActive ()
 
final native boolean isSignPostEnabled ()
 
final native boolean isSpeedDependentZoomEnabled ()
 
final native boolean isVehicleIconVisible ()
 
 Mapviewer ()
 
final ApiError pauseLocationTracking ()
 
final native boolean residentialStreetsAreVisible ()
 
final ApiError resumeLocationTracking ()
 
final ApiError setCarIconLookAheadRatio (final double lookAheadRatio2D, final double lookAheadRatio3DPortrait, final double lookAheadRatio3DLandscape)
 
final ApiError setCenterPoint (final Position pos)
 
final ApiError setColorForAllProfiles (final long red, final long green, final long blue, final long alpha, final String colorName)
 
final ApiError setColorForProfile (final long red, final long green, final long blue, final long alpha, final String colorName, final String profileName)
 
final ApiError setColorProfile (final String colorProfile)
 
final ApiError setCurrentColor (final long red, final long green, final long blue, final long alpha, final String colorName)
 
final ApiError setIconPath (final String path)
 
final ApiError setMapCenterOffsets (final double centerOffsetLandscapeX, final double centerOffsetLandscapeY, final double centerOffsetPortraitX, final double centerOffsetPortraitY)
 
final ApiError setMapContent (final MapContent mapContent)
 
final ApiError setMinZoomHeight (final double minZoomHeight)
 
final ApiError setPerspective (final MapPerspective viewMode)
 
final ApiError setRefreshInterval (final int mSecTracking, final int mSecGesture)
 
final ApiError setRouteGuidanceMode (final boolean enable)
 
final boolean setSignPostOffset (final int xOffset, final int yOffset)
 
final ApiError setVehicleIconBaseName (final String vehicleIconBaseName, final double vehicleIconSizeInCM)
 
final ApiError setViewingDistance (final double distanceInMeters, final boolean animatedZoom)
 
final ApiError showDynamicLayer (final String contentName, final String shapeFile, final boolean doShow)
 
final ApiError showExtendedSoftVehicleAttributes (final boolean doShow)
 
final ApiError showExtendedVehicleAttributes (final boolean doShow)
 
final ApiError showLayer (final String layerName, final boolean doShow)
 
final ApiError showPoiCategory (final PoiCategory poicategory, final boolean doShow)
 
final ApiError showPoiSource (final PoiSource poisource, final boolean doShow)
 
final ApiError showRoute (final Navigation route, final boolean doShow, final long color, final long borderColor)
 
final ApiError showRouteComparison (final RouteComparison routeComparison, final boolean doShow, final long colorOldRoute, final long borderColorOldRoute, final long colorNewRoute, final long borderColorNewRoute)
 
final ApiError showSelection (final Selection selHandle, final boolean doShow, final String fillColor, final String borderColor, final String iconFileName)
 
final native ApiError showVehicleIcon (boolean show)
 
final ApiError showWaypoint (final Waypoint poi, final boolean doShow)
 
final ApiError zoomToExtend (final Polygon plg)
 
final ApiError zoomToFollowMeRoute (final FollowMeRoute followMeRoute)
 

Static Public Member Functions

final static native DayNightMode getActiveDayNightStatus ()
 
final static native DayNightMode getDayNightMode ()
 
static final ApiError setDayNightMode (final DayNightMode mode)
 

Protected Member Functions

void addMapviewerListener (MapviewerListener listener)
 
final String getName ()
 
void removeAllMapviewerListeners ()
 
void removeMapviewerListener (MapviewerListener listener)
 

Detailed Description

The SDK utility class ApiHelper provides the method getGLSurfaceView() to obtain the Mapviewer View. This can be attached to a frame layout. See the quickstart manual for a source code example.

The viewer is organized in layers for visualizing groups of different items like POI's specific roads or GPS logs. Layers are configured and specified in mapservices.xml file.

Constructor & Destructor Documentation

◆ Mapviewer()

Mapviewer ( )

create new mapviewer

Member Function Documentation

◆ addMapviewerListener()

void addMapviewerListener ( MapviewerListener  listener)
protected

◆ disableCoiZoom()

final ApiError disableCoiZoom ( )

Disable COI (crossing of interest) zoom (default setting). See Mapviewer.enableCoiZoom()

Returns
Errorcode

◆ disableRealityView()

final ApiError disableRealityView ( )

This function disables the RealityView. No Reality View pictures will be shown.

Returns
Errorcode

◆ disableSignPost()

final ApiError disableSignPost ( )

With this function you can disable the display of signposts.

Returns
Errorcode

◆ disableSpeedDependentZoom()

final ApiError disableSpeedDependentZoom ( )

Disable automatic zooming based on driving speed (default setting)

Returns
Errorcode

◆ enableCoiZoom()

final ApiError enableCoiZoom ( )

Enable COI (crossing of interest) zoom. Zooms automatically at crossings that are relevant for navigation along the route.

Returns
Errorcode

◆ enableLocationTracking()

final ApiError enableLocationTracking ( final boolean  enable,
final int  mSecToPauseAfterTouch 
)

Center map to the current position with every location update. If the mapcenter is changed due to a gesture, the tracking will be paused until the passed timeout is reached. If the tracking should be resumed earlier, call mta_map_resumeLocationTracking

Parameters
enable- true to enable tracking
mSecToPauseAfterTouch- how many milliseconds to wait until tracking continues
Returns
Errorcode

◆ enableRealityView()

final ApiError enableRealityView ( )

Reality View mode shows the signage and lanes you must follow. This mode displays until you pass the highway junction. Once past the junction, the map returns to navigation mode. Note: Reality View mode is not available for every highway junction. Availability is dependent on the map data currently in use. When, during navigation, you approach a highway junction, the map changes to Reality View mode.

This function enable the RealityView - appropriate resources have to be installed

Returns
Errorcode

◆ enableRotation()

final ApiError enableRotation ( final boolean  enable)

Parameters
enableif true - rotates the map according to the heading value of the compass
Returns
Errorcode

◆ enableSignPost()

final ApiError enableSignPost ( )

Signposts (e.g. motorway signs) show the direction you have to follow at next junction. Availability is dependent on the map data currently in use. The signposts will be shown for next junction in navigation.

Returns
Errorcode

◆ enableSpeedDependentZoom()

final ApiError enableSpeedDependentZoom ( )

Enable zooming based on driving speed

Returns
Errorcode

◆ equals()

boolean equals ( Object  o)
inherited

◆ extendedSoftVehicleAttributesAreVisible()

final native boolean extendedSoftVehicleAttributesAreVisible ( )

Returns
true if the soft truck restrictions are visible on the map

◆ extendedVehicleAttributesAreVisible()

final native boolean extendedVehicleAttributesAreVisible ( )

Returns
true if the hard truck restrictions are visible on the map

◆ getActiveDayNightStatus()

final static native DayNightMode getActiveDayNightStatus ( )
static

Gets the current state (not the mode) of the day / night mode setting e.g. if the day / night mode is set to DayNightMode.AUTOMATIC_DAY_NIGHT_MODE this function will still return DayNightMode.NIGHT_MODE at night and DayNightMode.DAY_MODE during daytime

Returns
DayNightMode.DAY_MODE or DayNightMode.NIGHT_MODE

◆ getActiveRefreshInterval()

final native int getActiveRefreshInterval ( )

Returns
returns the currently used refresh interval, either TrackingRefreshInterval or GesturingRefreshInterval see Mapviewer.setRefreshInterval()

◆ getCarIconLookAheadRatio2D()

final double getCarIconLookAheadRatio2D ( )

Deprecated:
Will be removed in SDK 10.1. Effectively returns the value of centerOffsetPortraitY.
Returns
car Icon look ahead ration in 2D

◆ getCarIconLookAheadRatio3DLandscape()

final double getCarIconLookAheadRatio3DLandscape ( )

Deprecated:
Will be removed in SDK 10.1. Use Mapviewer.getMapCenterOffsetLandscape() instead. Effectively returns the value of centerOffsetLandscapeY.
Returns
car Icon look ahead ration in 3D landscape

◆ getCarIconLookAheadRatio3DPortrait()

final double getCarIconLookAheadRatio3DPortrait ( )

Deprecated:
Will be removed in SDK 10.1. Use Mapviewer.getMapCenterOffsetPortrait() instead. Effectively returns the value of centerOffsetPortraitY.
Returns
car Icon look ahead ration in 3D Portrait

◆ getCarIconPosition()

final Position getCarIconPosition ( )

Get the last valid position of the Car-Icon or better the last valid "me" position in pixel coordinates.

Returns
Position in pixel coordinates

◆ getCenterPoint()

final Position getCenterPoint ( )

Gets the coordinate of the map that the viewer currently centers.

Returns
Errorcode

◆ getColorProfile()

final String getColorProfile ( )

Return the base name of desired color profile. An empty string means default color profile.

Returns
The active colorprofile

◆ getDayNightMode()

final static native DayNightMode getDayNightMode ( )
static

Returns
current state of day / nightmode configuration

◆ getFrameCoordFromGeoCoord()

final Position getFrameCoordFromGeoCoord ( final Position  pos)

Parameters
pos- geocoordinate to transform
Returns
a frame coordinate for the given Geographical coordinate

◆ getGeoCoordFromFrameCoord()

final Position getGeoCoordFromFrameCoord ( final Position  frame)

Parameters
frameto calculate geocoordinates from
Returns
Geographical coordinates in internal projection (Projection) for given frame coordinate

◆ getGesturingRefreshInterval()

final int getGesturingRefreshInterval ( )

◆ getGroundResolution()

final double getGroundResolution ( )

Returns
- the ground resolution for the current viewing height in meter per pixel,

◆ getMapCenterOffsetLandscape()

final Position getMapCenterOffsetLandscape ( )

Returns the relative position of the current MapCenter for landscape mode. All values are defined as a percentage value from -1 to 1. Don't mistake this for a geo position. For X: -1 is left, 0 is center, 1 is right. For Y: -1 is top, 0 is center, 1 is bottom.

Returns
Position of the CenterOffset for landscape mode in 3D or 2D (not northbound).

◆ getMapCenterOffsetPortrait()

final Position getMapCenterOffsetPortrait ( )

Returns the relative position of the current MapCenter for portrait mode. All values are defined as a percentage value from -1 to 1. Don't mistake this for a geo position. For X: -1 is left, 0 is center, 1 is right. For Y: -1 is top, 0 is center, 1 is bottom.

Returns
Position of the CenterOffset for portrait mode in 3D or 2D (not northbound).

◆ getMapContent()

final native MapContent getMapContent ( )

Attention
offboard only

Returns
the current active map content

◆ getName()

final String getName ( )
protected

Returns
name of this mapviewer. For use of different poi category visibilities in multiple mapviewers.

◆ getPerspective()

final MapPerspective getPerspective ( )

Returns
current active perspective mode MapPerspective

◆ getRouteColor()

final long getRouteColor ( final RouteColor  mode)

Returns the color / border color by day / night of the route defined in mapServices.xml.

Parameters
mode- See RouteColor
Returns
the desired color (RGBA) e.g. 0xA0B0C0D0 (red : A0 , green : B0 , blue : C0 , alpha : D0)

◆ getRouteGuidanceMode()

final boolean getRouteGuidanceMode ( )

Returns
true if mapviewer is in route guidance mode. This mode show reality views, green arrows on next crossing ...

◆ getTrackingRefreshInterval()

final int getTrackingRefreshInterval ( )

◆ getViewingDistance()

final native double getViewingDistance ( )

Returns
Get current viewing distance (height) in meters

◆ getViewingDistanceForRadius()

final double getViewingDistanceForRadius ( final double  radiusInMeters)

Parameters
radiusInMeters- to calculate viewing distance from
Returns
the viewing distance in meters that is needed to show an area of a given radius on the map.

◆ getViewingDistanceForRegion()

final double getViewingDistanceForRegion ( final Position  pos1,
final Position  pos2 
)

get the viewing distance in meters that is needed to show the given region on a map. E.g. show complete route in region, where the bounding box of the route defines the region.

Parameters
pos1- First point of rectangle
pos2- Second point of rectangle
Returns
Viewing distance in meters

◆ hideAllWaypoints()

final void hideAllWaypoints ( )

remove all previously shown waypoints that are shown by Mapviewer.showWaypoint()

◆ isCoiZoomEnabled()

final native boolean isCoiZoomEnabled ( )

Returns
true if automatic zoom in for relevant crossings is enabled

◆ isLayerVisible()

final boolean isLayerVisible ( final String  layerName)

Parameters
layerNameof the layer to check visibility for
Returns
true if the layer is visible

◆ isLocationTrackingEnabled()

final boolean isLocationTrackingEnabled ( )

◆ isPoiCategoryVisible()

final native boolean isPoiCategoryVisible ( PoiCategory  poicategory)

Parameters
poicategory- poicategory to check visibility
Returns
true if visible in given mapviewer

◆ isPoiSourceVisible()

final native boolean isPoiSourceVisible ( PoiSource  poisource)

Parameters
poisource- poiSource to check visibility
Returns
true if visible in given mapviewer

◆ isRealityViewActive()

final native boolean isRealityViewActive ( )

With this function you can check if a RealityView picture is shown on screen at the moment. e.g. you can use it to disable other controls on the map area during RealityView.

Returns
true if RealityView picture is shown at the moment, otherwise false

◆ isRealityViewEnabled()

final native boolean isRealityViewEnabled ( )

With this function you can check if RealityView is enabled or not.

Returns
true if RealityView is enabled or false if it is disabled.. (See Mapviewer.enableRealityView())

◆ isRotationEnabled()

final boolean isRotationEnabled ( )

Mapviewer.enableRotation()

Returns
true if Mapviewer rotates by deveices sensors

◆ isSignPostActive()

final boolean isSignPostActive ( )

With this function you can check if a SignPost picture is shown on screen at the moment. e.g. you can use it to disable other controls on the map area during RealityView.

Returns
true if SignPost picture is shown at the moment, otherwise false

◆ isSignPostEnabled()

final native boolean isSignPostEnabled ( )

With this function you can check if Signpost drawing is active or not.

Returns
true if signpost drawing is enabled or false if it is disabled.. (See Mapviewer.enableSignPost())

◆ isSpeedDependentZoomEnabled()

final native boolean isSpeedDependentZoomEnabled ( )

Returns
true if automatic zoom dependent on speed is active

◆ isVehicleIconVisible()

final native boolean isVehicleIconVisible ( )

Shows/Hides the vehicle icon

Returns
true if vehicle icon is enabled or false if it is disabled (See Mapviewer.showVehicleIcon())

◆ pauseLocationTracking()

final ApiError pauseLocationTracking ( )

If location tracking is enabled the tracking will be paused until the location tracking timeout is reached or mta_map_resumeLocationTracking() is called.

Returns
Errorcode

◆ removeAllMapviewerListeners()

void removeAllMapviewerListeners ( )
protected

◆ removeMapviewerListener()

void removeMapviewerListener ( MapviewerListener  listener)
protected

◆ residentialStreetsAreVisible()

final native boolean residentialStreetsAreVisible ( )

Returns
true if the residential streets are visible on the map

◆ resumeLocationTracking()

final ApiError resumeLocationTracking ( )

If location tracking is enabled and the user touched the map or mta_map_pauseLocationTracking() was called, the tracking is paused until the location tracking timeout is reached. This methods interrupts the timeout and resumes the tracking immediately.

Returns
Errorcode

◆ setCarIconLookAheadRatio()

final ApiError setCarIconLookAheadRatio ( final double  lookAheadRatio2D,
final double  lookAheadRatio3DPortrait,
final double  lookAheadRatio3DLandscape 
)

Deprecated:
Use Mapviewer.setMapCenterOffsets() instead. Will be removed in SDK 10.1. This will effectively call setMapCenterOffsets(0.0, lookAheadRatio3DLandscape, 0.0, lookAheadRatio3DPortrait).
Returns
Errorcode

◆ setCenterPoint()

final ApiError setCenterPoint ( final Position  pos)

Sets the viewer to center the map at the given point.

Attention
if the Mapviewer.enableLocationTracking() is enabled, the map will jump back to its GPS pose with the next received position
Parameters
pos- center point of the map in geocoordinates
Returns
Errorcode

◆ setColorForAllProfiles()

final ApiError setColorForAllProfiles ( final long  red,
final long  green,
final long  blue,
final long  alpha,
final String  colorName 
)

Sets the color for given name for all color profiles.

The color will change immediately in the map.

Parameters
redvalue 0 - 255
greenvalue 0 - 255
bluevalue 0 - 255
alphavalue 0 - 255
colorName- name of the defined color value to change
Returns
Errorcode

◆ setColorForProfile()

final ApiError setColorForProfile ( final long  red,
final long  green,
final long  blue,
final long  alpha,
final String  colorName,
final String  profileName 
)

Sets the color for given color name and color profile (defined in mapservices.xml or colors.xml). If the color or the profile does not exist, MTA_ERROR_OBJ_NOT_FOUND will be returned. If the profile is currently active, the color will change immediately in the map.

Parameters
redvalue 0 - 255
greenvalue 0 - 255
bluevalue 0 - 255
alphavalue 0 - 255
colorName- name of the defined color value to change
profileName- name of the defined profileName value to change
Returns
Errorcode

◆ setColorProfile()

final ApiError setColorProfile ( final String  colorProfile)

Set base name of desired color profile. Must be defined in mapservices_xml as "day_xxx" and "night_xxx" xxx stand for color profile base name

Parameters
colorProfile- color profile base name ( without day_ or night_ )
Returns
Errorcode

◆ setCurrentColor()

final ApiError setCurrentColor ( final long  red,
final long  green,
final long  blue,
final long  alpha,
final String  colorName 
)

Sets the color for given name for the current active profile The color will change immediately in the map. If you switch to an other profile, this color will be lost!

Parameters
redvalue 0 - 255
greenvalue 0 - 255
bluevalue 0 - 255
alphavalue 0 - 255
colorName- name of the defined color value to change
Returns
Errorcode

◆ setDayNightMode()

static final ApiError setDayNightMode ( final DayNightMode  mode)
static

Get/Sets the day/night/auto mode of the map engine. The setting is stored in the settings.ini

Parameters
mode- See DayNightMode
Returns
Errorcode

◆ setIconPath()

final ApiError setIconPath ( final String  path)

Set the folder where map related icons like poi icons are located. By default this is ResourcePath/poi_icons

Parameters
path- the new path to set
Returns
Errorcode

◆ setMapCenterOffsets()

final ApiError setMapCenterOffsets ( final double  centerOffsetLandscapeX,
final double  centerOffsetLandscapeY,
final double  centerOffsetPortraitX,
final double  centerOffsetPortraitY 
)

Offsets the target lookat point on the map (not for 2D northbound). It can be changed if GUI controls overlap the car icon. All values are defined as a percentage value from -1 to 1. For X: -1 is left, 0 is center, 1 is right. For Y: -1 is top, 0 is center, 1 is bottom.

Parameters
centerOffsetLandscapeX
centerOffsetLandscapeY
centerOffsetPortraitX
centerOffsetPortraitY
Returns
Errorcode

◆ setMapContent()

final ApiError setMapContent ( final MapContent  mapContent)

Parameters
mapContent- content to set
Returns
Errorcode

◆ setMinZoomHeight()

final ApiError setMinZoomHeight ( final double  minZoomHeight)

Parameters
minZoomHeight- the closest zoom level. Default is 100, minimum 1 and maximum 7000000.0f
Returns
Errorcode

◆ setPerspective()

final ApiError setPerspective ( final MapPerspective  viewMode)

Changes the view mode (2D and 3D) of the map viewer. The setting is stored in the settings.ini

Parameters
viewMode- See MapPerspective
Returns
Errorcode

◆ setRefreshInterval()

final ApiError setRefreshInterval ( final int  mSecTracking,
final int  mSecGesture 
)

Set the framerates of the mapviewer.

Parameters
mSecTracking- defines the framerate when the mapviewer is in tracking mode, e.g. when navigating (default: 100ms, 10frames/sec)
mSecGesture- defines the framerate when the mapviewer is in gesturing mode (default: 40ms, 25frames/sec)

◆ setRouteGuidanceMode()

final ApiError setRouteGuidanceMode ( final boolean  enable)

Parameters
enable- true to show reality views, green arrows on next crossing ...
Returns
Errorcode

◆ setSignPostOffset()

final boolean setSignPostOffset ( final int  xOffset,
final int  yOffset 
)

With this function you can set an offset of the Signpost in pixels to the top left corner

Returns
"MTA_ERROR_OK" if successful

◆ setVehicleIconBaseName()

final ApiError setVehicleIconBaseName ( final String  vehicleIconBaseName,
final double  vehicleIconSizeInCM 
)

Change the vehicle icon symbol. A set of four symbols must be defined: "vehicleIconBaseName"_3d.png : for 3D mode with good gps signal "vehicleIconBaseName"_3d_grey.png : for 3D mode with bad gps signal "vehicleIconBaseName"_2d.png : for 2D mode with bad gps signal "vehicleIconBaseName"_2d_grey.png : for 2D mode with bad gps signal

Parameters
vehicleIconBaseName- base name of the four needed pngs. An empty string means the default carIcon (arrow).
vehicleIconSizeInCM- size of the icon in cm on screen
Returns
Errorcode

◆ setViewingDistance()

final ApiError setViewingDistance ( final double  distanceInMeters,
final boolean  animatedZoom 
)

Parameters
distanceInMetersto set as viewing height
animatedZoom- do animate zoom or jump directly to given distance - Feature is not yet available and prepared for future use
Returns
Errorcode

◆ showDynamicLayer()

final ApiError showDynamicLayer ( final String  contentName,
final String  shapeFile,
final boolean  doShow 
)

Displays or hides a shapefile on a map. The description and displaying options (Shape reader, and layer) have to be defined in the Mapservices.xml file

Parameters
doShow- Show (=true) or hide (=false).
contentName- ID of the content that shall be used to display the shapefile; Specified in the mapsiervices.xml
shapeFile- shapeFile that shall be displayed with the given content
Returns
Errorcode Example: You have a point shape in mercator projection, called MyPoints in a folder, where the SDK is allowed to read from!

Add a shape reader definition to the mapservices.xml in the "SHAPEREADERS" section:

<SHAPEREADER sourceName="MyPoints" path="PathToYourShape/MyPoints" type="1" size="50000.0" cacheSize="23" />
Attention
There must already be a valid shape file at "PathToYourShape/MyPoints"!!!

Add a layer definition to the mapservices.xml in the "LAYERS" section:

<POI zIndex="8401" activate="false" contentName="MyPoints" sourceName="MyPoints" visibilityStart="0" visibilityEnd="10000" billboardingMode="0" maxMapUnitValue="30000.0" iconAlignment="Center" poiIcon="gps_point.png" renderType="DefaultRenderer" />

Now you have finished the configuration of the mapservices for displaying some points!

If you call showDynamicLayer("MyPoints", "PathToYourShape/MyPoints", true); the mapviewer displays your points, using the symbol "gps_point.png"!

Until now, this function is not very dynamic, because you have to define the shape reader and the layer already in the mapservices, and there must already be a valid shape file at the mentioned path!
But if you have a second point shape called "OtherPointsOfMe" at another location, you can switch to the other points by calling:
showDynamicLayer("MyPoints", "OtherPath/OtherPointsOfMe", true);

This is the only thing, that is dynamic here! With this function you can change the source path and file name of an existing shape reader!

If you have a point shape (in ESRII format), the SDK expects the following files now in this folder:

  • MyPoints.dbf
  • MyPoints.shp
  • MyPoints.shx
Attention
The point shape must be in mercator projection!

◆ showExtendedSoftVehicleAttributes()

final ApiError showExtendedSoftVehicleAttributes ( final boolean  doShow)

Show or hide soft restricted vehicle attributes on the map

Parameters
doShow- Show (=true) or hide (=false).
Returns
Errorcode

◆ showExtendedVehicleAttributes()

final ApiError showExtendedVehicleAttributes ( final boolean  doShow)

Show or hide hard restricted vehicle attributes on the map

Parameters
doShow- Show (=true) or hide (=false).
Returns
Errorcode

◆ showLayer()

final ApiError showLayer ( final String  layerName,
final boolean  doShow 
)

Parameters
layerName- of the layer that will be shown or hidden
doShow- Show (=true) or hide (=false).
Returns
Errorcode

◆ showPoiCategory()

final ApiError showPoiCategory ( final PoiCategory  poicategory,
final boolean  doShow 
)

Shows or hides of all pois of the given category in the mapviewer.

Parameters
poicategory- Category to show or hide
doShow- Show (=true) or hide (=false).
Returns
Errorcode

◆ showPoiSource()

final ApiError showPoiSource ( final PoiSource  poisource,
final boolean  doShow 
)

Parameters
poisource- source to show or hide
doShow- Show (=true) or hide (=false).
Returns
Errorcode

◆ showRoute()

final ApiError showRoute ( final Navigation  route,
final boolean  doShow,
final long  color,
final long  borderColor 
)

Display or hide a route in the map. Note that during a navigation the route is displayed automatically. The color model is the rgba model in one unsigned int. (e.g. 0xFF00FFFF). The values for each component are in range 0 - 255 (0xFF).

Parameters
route- route that shall be shown
doShow- Show (=true) or hide (=false).
color- RGBA color value (e.g. 0xFF00FFFF means red : 0xFF, green : 0x00, blue : 0xFF, alpha : 0xFF)
borderColor- RGBA border color value (e.g. 0xFF00FFFF means red : 0xFF, green : 0x00, blue : 0xFF, alpha : 0xFF)
Returns
Errorcode

◆ showRouteComparison()

final ApiError showRouteComparison ( final RouteComparison  routeComparison,
final boolean  doShow,
final long  colorOldRoute,
final long  borderColorOldRoute,
final long  colorNewRoute,
final long  borderColorNewRoute 
)

Shows or hide a route comparison with the appropriate routes on the map

Parameters
routeComparison- the comparison to show
doShow- Show (=true) or hide (=false).
colorOldRoute- fill color of the old route
borderColorOldRoute- border color of the old route
colorNewRoute- fill color of the new route
borderColorNewRoute- border color of the new route
Returns
Errorcode

◆ showSelection()

final ApiError showSelection ( final Selection  selHandle,
final boolean  doShow,
final String  fillColor,
final String  borderColor,
final String  iconFileName 
)

Show (or hide) the selection in the map. A selection is visible as long as the object is kept alive or this method is called to hide it explicitly.

Parameters
selHandle- Selection to show or hide.
doShow- Show (=true) or hide (=false).
fillColor- Fill color for highlighted polylines and polygons.
borderColor- Border color for highlighted polylines and polygons.
iconFileName- Png icon filename for highlighted points.
Returns
Errorcode

◆ showVehicleIcon()

final native ApiError showVehicleIcon ( boolean  show)

Parameters
show- if true the vehicle icon is shown on the map
Returns
Errorcode

◆ showWaypoint()

final ApiError showWaypoint ( final Waypoint  poi,
final boolean  doShow 
)

Shows or hides a user defined POI in the mapviewer. The icons bottom - center is aligned with the coordinate when shown. The POI-category-ID of this waypoint is PoiCategoryId.ID_USER_POI. See also Waypoint.getPoiCategory() and PoiCategory.getTypeIdStr().

Parameters
poi- The waypoint that shall be shown
doShow- Show (=true) or hide (=false).
Returns
Errorcode

◆ zoomToExtend()

final ApiError zoomToExtend ( final Polygon  plg)

Zoom the map to the given polygon area.

Parameters
plg- polygon area that should be visible / zoomed to
Returns
Errorcode

◆ zoomToFollowMeRoute()

final ApiError zoomToFollowMeRoute ( final FollowMeRoute  followMeRoute)

This method can be used zoom a follow me route on the map providing a nmea log file. This route only show the route defined in the nmea log and not from the current position which is shown after a call to FollowMeRoute.calculate().

Parameters
followMeRoute- follow me route to zoom to
Returns
Errorcode

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