CartoType Android API  5.8.7, 2019-04-27
for Java development on Android
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.cartotype.Framework Class Reference

Public Member Functions

 Framework (Context aContext, String aMapFileName, String aStyleSheetFileName, String aFontFileName, int aViewWidth, int aViewHeight)
 
 Framework (Context aContext, String aMapFileName, byte[] aMapEncryptionKey, String aStyleSheetFileName, String aFontFileName, int aViewWidth, int aViewHeight)
 
 Framework (Context aContext, FrameworkParam aParam)
 
native void license (String aKey)
 
native String licensee ()
 
native String expiryDate ()
 
String appBuildDate ()
 
native String copyright ()
 
void setCopyrightNotice ()
 
void setCopyrightNotice (String aCopyright)
 
void setLegend (Legend aLegend, double aWidth, String aUnit, NoticePosition aPosition)
 
native void enableLegend (boolean aEnable)
 
void setScaleBar (boolean aMetricUnits, double aWidth, String aUnit, NoticePosition aPosition)
 
native void enableScaleBar (boolean aEnable)
 
void setTurnInstructions (boolean aMetricUnits, boolean aAbbreviate, double aWidth, String aWidthUnit, NoticePosition aPosition, double aTextSize, String aTextSizeUnit)
 
native void enableTurnInstructions (boolean aEnable)
 
native void setTurnInstructionText (String aText)
 
native String turnInstructionText ()
 
native void drawNoticesAutomatically (boolean aEnable)
 
native boolean hasNotices ()
 
int loadMap (String aMapFileName)
 
native int loadMap (String aMapFileName, byte[] aMapEncryptionKey)
 
int createWritableMap (WritableMapType aType)
 
int saveMap (int aHandle, String aFileName, FileType aFileType)
 
int readMap (int aHandle, String aFileName, FileType aFileType)
 
int writeMapImage (String aFileName, FileType aFileType, boolean aCompress)
 
native boolean mapIsEmpty (int aHandle)
 
native int mapCount ()
 
native int unloadMap (int aHandle)
 
native void enableMap (int aHandle, boolean aEnable)
 
native int getLastMapHandle ()
 
native int getMainMapHandle ()
 
native int getMemoryMapHandle ()
 
native int loadFont (String aFontFileName)
 
int setStyleSheet (String aStyleSheetFileName, int aIndex)
 
int setStyleSheet (byte[] aData, int aIndex)
 
native int reloadStyleSheet (int aIndex)
 
void appendStyleSheet (String aStyleSheetFileName)
 
void appendStyleSheet (byte[] aData)
 
native int deleteStyleSheet (int aIndex)
 
void resize (int aViewWidth, int aViewHeight)
 
native String[] layerNames ()
 
native void enableLayer (String aLayerName, boolean aEnable)
 
native void setResolutionDpi (int aDpi)
 
native double resolutionDpi ()
 
native void setScale (int aScale)
 
native int getScale ()
 
native int configure (String aFileName)
 
native void setScaleDenominatorInView (int aScale)
 
native int getScaleDenominatorInView ()
 
double getDistanceInMeters (double aX1, double aY1, double aX2, double aY2, CoordType aCoordType)
 
Bitmap getMap ()
 
Bitmap getMemoryDataBaseMap ()
 
Bitmap getTileBitmap (int aTileSizeInPixels, int aZoom, int aX, int aY)
 
native boolean clipBackgroundToMapBounds (boolean aEnable)
 
native int setTileOverSizeZoomLevels (int aLevels)
 
native void enableDrawingMemoryDataBase (boolean aEnable)
 
native int loadIcon (String aFileName, String aId, int aHotSpotX, int aHotSpotY, int aLabelX, int aLabelY, int aLabelMaxLength)
 
native void unloadIcon (String aId)
 
native void setPerspective (boolean aEnable)
 
void setPerspective (PerspectiveParam aParam)
 
native boolean getPerspective ()
 
native PerspectiveParam getPerspectiveParam ()
 
native boolean setDraw3DBuildings (boolean aEnable)
 
native boolean getDraw3DBuildings ()
 
native boolean setAnimateTransitions (boolean aEnable)
 
native boolean getAnimateTransitions ()
 
native void zoom (double aZoomFactor)
 
int zoomAt (double aZoomFactor, double aX, double aY, CoordType aCoordType)
 
void zoomIn ()
 
void zoomOut ()
 
native void rotate (double aAngle)
 
int rotateAt (double aAngle, double aX, double aY, CoordType aCoordType)
 
native void setRotation (double aAngle)
 
void setRotationAt (double aAngle, double aX, double aY, CoordType aCoordType)
 
native double getRotation ()
 
native void pan (int aDx, int aDy)
 
void panFromTo (double aFromX, double aFromY, CoordType aFromCoordType, double aToX, double aToY, CoordType aToCoordType)
 
native int setViewCenterLatLong (double aLong, double aLat)
 
int setView (double aX1, double aY1, double aX2, double aY2, CoordType aCoordType, int aMarginInPixels, int aMinScaleDenominator)
 
void setView (MapObject aMapObject, int aMarginInPixels, int aMinScaleDenominator)
 
int setView (MapObject[] aMapObjectArray, int aMarginInPixels, int aMinScaleDenominator)
 
int setView (Geometry aGeometry, int aMarginInPixels, int aMinScaleDenominator)
 
int setView (ViewState aViewState)
 
native ViewState getViewState ()
 
native int setViewToRoute (int aRouteIndex, int aMarginInPixels, int aMinScaleDenominator)
 
native int setViewToWholeMap ()
 
void getViewDimensions (double[] aPoint, CoordType aCoordType)
 
void getMapExtent (double[] aPoint, CoordType aCoordType)
 
native String getProjectionAsProj4Param ()
 
long getLastObjectId ()
 
int insertMapObject (int aMapHandle, MapObjectType aMapObjectType, String aLayerName, Geometry aGeometry, String aStringAttributes, int aIntAttribute, long aId, boolean aReplace)
 
int insertPointMapObject (int aMapHandle, String aLayerName, double aX, double aY, CoordType aCoordType, String aStringAttributes, int aIntAttribute, long aId, boolean aReplace)
 
int insertCircleMapObject (int aMapHandle, String aLayerName, double aCenterX, double aCenterY, CoordType aCenterCoordType, double aRadius, CoordType aRadiusCoordType, String aStringAttributes, int aIntAttribute, long aId, boolean aReplace)
 
int insertEnvelopeMapObject (int aMapHandle, String aLayerName, Geometry aGeometry, double aRadius, CoordType aRadiusCoordType, String aStringAttributes, int aIntAttribute, long aId, boolean aReplace)
 
int insertPushPin (double aX, double aY, CoordType aCoordType, String aStringAttributes, String aColor, int aIconCharacter, long aId)
 
int insertCopyOfMapObject (int aMapHandle, String aLayername, MapObject aMapObject, double aEnvelopeRadius, CoordType aRadiusCoordType, long aId, boolean aReplace)
 
native long deleteMapObjects (int aMapHandle, long aStartId, long aEndId, String aCondition)
 
native MapObject loadMapObject (int aMapHandle, long aObjectId)
 
native int readGpx (int aMapHandle, String aFileName)
 
Geometry range (RouteProfile aProfile, double aX, double aY, CoordType aCoordType, double aTimeOrDistance, boolean aIsTime)
 
double getPolygonArea (double[] aX, double[] aY, CoordType aCoordType)
 
native void setStyleSheetVariable (String aVariableName, String aValue)
 
void setStyleSheetVariable (String aVariableName, int aValue)
 
void setPreferredRouterType (RouterType aRouterType)
 
RouterType preferredRouterType ()
 
RouterType actualRouterType ()
 
native int getActualRouterType ()
 
int startNavigation (double aStartX, double aStartY, CoordType aStartCoordType, double aEndX, double aEndY, CoordType aEndCoordType)
 
int startNavigation (double[] aX, double[] aY, CoordType aCoordType)
 
Route createRoute (RouteProfile aProfile, double[] aX, double[] aY, CoordType aCoordType)
 
Route createBestRoute (RouteProfile aProfile, double[] aX, double[] aY, CoordType aCoordType, boolean aStartFixed, boolean aEndFixed, int aIterations)
 
Route createRouteFromXml (RouteProfile aProfile, String aFileNameOrData)
 
native void endNavigation ()
 
native boolean enableNavigation (boolean aEnable)
 
native boolean navigationEnabled ()
 
native void setMainProfile (RouteProfile aProfile)
 
native int addProfile (RouteProfile aProfile)
 
native int chooseRoute (int aRouteIndex)
 
native int displayRoute (boolean aEnable)
 
native int getRouteCount ()
 
Route getRoute (int aIndex)
 
native int readRouteFromXml (String aFileNameOrData, boolean aReplace)
 
native int useRoute (Route aRoute, boolean aReplace)
 
native String getRouteInstructions (Route aRoute)
 
native int reverseRoutes ()
 
native int deleteRoutes ()
 
int writeRouteAsXml (Route aRoute, String aFileName, FileType aFileType)
 
String writeRouteAsXmlString (Route aRoute, FileType aFileType)
 
native int loadNavigationData ()
 
native int navigate (int aValidity, double aTime, double aLong, double aLat, double aSpeed, double aCourse, double aHeight)
 
NavigationState getNavigationState ()
 
native void setNavigatorMinimumFixDistance (int aMeters)
 
native void setNavigatorTimeTolerance (int aSeconds)
 
native void setNavigatorDistanceTolerance (int aMeters)
 
native void setNavigatorAutoReRoute (boolean aAutoReRoute)
 
native void setNavigatorParam (NavigatorParam aNavigatorParam)
 
native NavigatorParam getNavigatorParam ()
 
native int addNearbyObjectWarning (String aLayer, double aMaxDistanceToRoute, double aMaxDistanceAlongRoute)
 
native int deleteNearbyObjectWarning (String aLayer)
 
native MapObject[] getNearbyObjects (String aLayer, int aMaxObjectCount)
 
native double distanceToDestination ()
 
native double estimatedTimeToDestination ()
 
native double getFirstTurn (Turn aTurn)
 
native double getSecondTurn (Turn aTurn)
 
native double getContinuationTurn (Turn aTurn)
 
void convertCoords (double[] aCoordArray, CoordType aFromCoordType, CoordType aToCoordType)
 
native MapObject[] findInDisplay (int aMaxObjectCount, double aX, double aY, double aRadius)
 
native MapObject[] findBuildingsNearStreet (MapObject aStreet)
 
native MapObject[] findAddress (int aMaxObjectCount, Address aAddress, boolean aFuzzy)
 
native MapObject[] findStreetAddresses (int aMaxObjectCount, Address aAddress, Geometry aClip)
 
MapObject[] findAddressPart (int aMaxObjectCount, String aText, AddressPart aAddressPart, boolean aFuzzy, boolean aIncremental)
 
MapObject[] findInLayer (int aMaxObjectCount, String aLayer, double aX1, double aY1, double aX2, double aY2, CoordType aCoordType)
 
MapObject[] find (int aMaxObjectCount, String aText, int aMatchMethod)
 
MapObject[] findText (int aMaxObjectCount, String aText, int aMatchMethod, String aLayers, String aAttributes)
 
MapObject[] find (int aMaxObjectCount, Geometry aClip, String aLayers, String aAttributes, String aText, int aStringMatchMethod, String aCondition, boolean aMerge)
 
native MapObject[] find (FindParam aFindParam)
 
native MapObjectGroup[] findGroups (FindParam aFindParam)
 
MapObject[] find (PointOfInterestType aType, String aText, Geometry aLocation)
 
native MapObject[] findPolygonsContainingPath (Geometry aPath, FindParam aFindParam)
 
native MapObject[] findPointsInPath (Geometry aPath, FindParam aFindParam)
 
int getHeight (double aX, double aY, CoordType aCoordType)
 
int getHeights (double[] aX, double[] aY, int[] aTerrainHeightArray, CoordType aCoordType)
 
int getHeightProfile (double[] aX, double[] aY, int[] aTerrainHeightArray, CoordType aCoordType)
 
native void useImageServer (boolean aEnable, int aCacheSizeInBytes)
 
String getGeoCodeSummary (double aX, double aY, CoordType aCoordType)
 
int getAddress (Address aAddress, double aX, double aY, CoordType aCoordType)
 
int getNearestRoad (NearestRoadInfo aInfo, double aX, double aY, CoordType aCoordType, double aMaxDistanceInMeters, double aHeadingInDegrees)
 
int findNearestRoad (NearestRoadInfo aInfo, double aX, double aY, CoordType aCoordType, double aHeadingInDegrees, LocationMatchParam aParam, boolean aDisplay)
 
native int displayPositionOnNearestRoad (double aLong, double aLat, double aHeadingInDegrees, NearestRoadInfo aInfo, double aMaxDistanceInMeters)
 
native int setVehiclePosOffset (double aXOffset, double aYOffset)
 
native void setLocale (String aLocale)
 
native String locale ()
 
native int setFollowMode (int aFollowMode)
 
native int getFollowMode ()
 
int getNavigationPosition (double[] aPoint, CoordType aCoordType)
 
native int addTrafficInfo (long aId, TrafficInfo aTrafficInfo, LocationRef aLocationRef, boolean aDriveOnLeft)
 
int addPolygonSpeedLimit (long aId, Geometry aPolygon, double aSpeed, int aVehicleTypes)
 
int addLineSpeedLimit (long aId, Geometry aLine, double aSpeed, int aVehicleTypes, boolean aDriveOnLeft)
 
int addClosedLineSpeedLimit (long aId, Geometry aLine, double aSpeed, int aVehicleTypes)
 
int addForbiddenArea (long aId, Geometry aPolygon)
 
native int deleteTrafficInfo (long aId)
 
native void clearTrafficInfo ()
 
native boolean enableTrafficInfo (boolean aEnable)
 
void onViewChange ()
 
void onMainDataChange ()
 
void onDynamicDataChange ()
 

Static Public Member Functions

static String version ()
 
static String build ()
 
static String setAttribute (String aString, String aKey, String aValue)
 
static int intAttribute (String aThreeLetterCode, int aType)
 
static int Color (int aRed, int aGreen, int aBlue)
 
static int Color (int aRed, int aGreen, int aBlue, int aAlpha)
 

Static Public Attributes

static final int TIME_VALID = 1
 
static final int POSITION_VALID = 2
 
static final int SPEED_VALID = 4
 
static final int COURSE_VALID = 8
 
static final int HEIGHT_VALID = 16
 
static final int PREFIX_STRING_MATCH_FLAG = 1
 
static final int IGNORE_NON_ALPHANUMERICS_STRING_MATCH_FLAG = 2
 
static final int FOLD_ACCENTS_STRING_MATCH_FLAG = 4
 
static final int FUZZY_STRING_MATCH_FLAG = 8
 
static final int FOLD_CASE_STRING_MATCH_FLAG = 16
 
static final int FAST_STRING_MATCH_FLAG = 32
 
static final int EXACT_STRING_MATCH_METHOD = 0
 
static final int FOLD_CASE_STRING_MATCH_METHOD = FOLD_CASE_STRING_MATCH_FLAG
 
static final int START_STRING_MATCH_METHOD = PREFIX_STRING_MATCH_FLAG
 
static final int FUZZY_STRING_MATCH_METHOD = IGNORE_NON_ALPHANUMERICS_STRING_MATCH_FLAG | FOLD_ACCENTS_STRING_MATCH_FLAG | FUZZY_STRING_MATCH_FLAG | FOLD_CASE_STRING_MATCH_FLAG
 
static final int MAX_ROUTES_DISPLAYED = 16
 
static final int MAX_WAYPOINTS_DISPLAYED = 1024 * 1024
 
static final long ROUTE_ID_RESERVED_START = 0x40000000
 
static final long FIRST_ROUTE_ID = ROUTE_ID_RESERVED_START
 
static final long LAST_ROUTE_ID = ROUTE_ID_RESERVED_START + MAX_ROUTES_DISPLAYED - 1
 
static final long ROUTE_START_ID = LAST_ROUTE_ID + 1
 
static final long ROUTE_END_ID = LAST_ROUTE_ID + 2
 
static final long ROUTE_POSITION_ID = LAST_ROUTE_ID + 3
 
static final long ROUTE_VECTOR_ID = LAST_ROUTE_ID + 4
 
static final long FIRST_WAYPOINT_ID = LAST_ROUTE_ID + 5
 
static final long ROUTE_ID_RESERVED_END = FIRST_WAYPOINT_ID + MAX_WAYPOINTS_DISPLAYED
 
static final int FOLLOW_FLAG_LOCATION = 1
 
static final int FOLLOW_FLAG_HEADING = 2
 
static final int FOLLOW_FLAG_ZOOM = 4
 
static final int FOLLOW_MODE_NONE = 0
 
static final int FOLLOW_MODE_LOCATION = FOLLOW_FLAG_LOCATION
 
static final int FOLLOW_MODE_LOCATION_HEADING = FOLLOW_FLAG_LOCATION | FOLLOW_FLAG_HEADING
 
static final int FOLLOW_MODE_LOCATION_ZOOM = FOLLOW_FLAG_LOCATION | FOLLOW_FLAG_ZOOM
 
static final int FOLLOW_MODE_LOCATION_HEADING_ZOOM = FOLLOW_FLAG_LOCATION | FOLLOW_FLAG_HEADING | FOLLOW_FLAG_ZOOM
 
static final int BLACK = 0xFF000000
 
static final int DARK_GRAY = 0xFF555555
 
static final int DARK_RED = 0xFF000080
 
static final int DARK_GREEN = 0xFF008000
 
static final int DARK_YELLOW = 0xFF008080
 
static final int DARK_BLUE = 0xFF800000
 
static final int DARK_MAGENTA = 0xFF800080
 
static final int DARK_CYAN = 0xFF808000
 
static final int RED = 0xFF0000FF
 
static final int GREEN = 0xFF00FF00
 
static final int YELLOW = 0xFF00FFFF
 
static final int BLUE = 0xFFFF0000
 
static final int MAGENTA = 0xFFFF00FF
 
static final int CYAN = 0xFFFFFF00
 
static final int GRAY = 0xFFAAAAAA
 
static final int WHITE = 0xFFFFFFFF
 
static final int TRANSPARENT_BLACK = 0x00000000
 

Protected Member Functions

void finalize ()
 

Detailed Description

The Framework class owns and manages the CartoType engine and the maps, fonts and style sheets.

Constructor & Destructor Documentation

com.cartotype.Framework.Framework ( Context  aContext,
String  aMapFileName,
String  aStyleSheetFileName,
String  aFontFileName,
int  aViewWidth,
int  aViewHeight 
)

Creates a CartoType framework containing engine, map, style sheet and fonts. Returns an opaque reference to it.

com.cartotype.Framework.Framework ( Context  aContext,
String  aMapFileName,
byte[]  aMapEncryptionKey,
String  aStyleSheetFileName,
String  aFontFileName,
int  aViewWidth,
int  aViewHeight 
)

Creates a CartoType framework containing engine, map, style sheet and fonts. If aMapEncryptionKey is non-null the map must have been encrypted using it. Returns an opaque reference to the framework.

com.cartotype.Framework.Framework ( Context  aContext,
FrameworkParam  aParam 
)

Creates a CartoType framework from parameters contained in a FrameworkParam object.

Member Function Documentation

RouterType com.cartotype.Framework.actualRouterType ( )

If route data has been loaded for the current map or maps, returns the actual router type in use, which may not be the same as the preferred router type, because some router types are not available for certain types of data.

If the route data has not been loaded this function returns RouterType.Default. Route data is loaded when the first route is constructed.

int com.cartotype.Framework.addClosedLineSpeedLimit ( long  aId,
Geometry  aLine,
double  aSpeed,
int  aVehicleTypes 
)

Adds a speed limit in kph, to be used when calculating routes, to a polygon which is the interior of a closed line along roads, defined by a series of points.

Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). The ID can be used when calling DeleteTrafficInfo().

aLine is a series of points defining the polygon. The polygon is calculated as the best route through the points, using the route network, so to be certain of specifying the desired polygon you need to supply a point for every junction.

aSpeed is the speed to which travel is restricted in kph. Values of zero or less indicate that the road is closed. Values higher than 255 indicate that there is no speed limit.

aVehicleTypes is a set of flags drawn from the vehicle type constants defined in RouteProfile. If aVehicleTypes is 0, all vehicles are affected.

A polygon map object representing the speed limit is added to the layer 'traffic'.

See also addTrafficInfo(), addLineSpeedLimit(), addPolygonSpeedlimit(), addForbiddenArea(), deleteTrafficInfo(), and clearTrafficInfo().

int com.cartotype.Framework.addForbiddenArea ( long  aId,
Geometry  aPolygon 
)

Marks a certain polygon as forbidden for routing.

Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). The ID can be used when calling DeleteTrafficInfo().

See also addTrafficInfo(), addLineSpeedLimit(), addPolygonSpeedLimit(), deleteTrafficInfo() and clearTrafficInfo().

int com.cartotype.Framework.addLineSpeedLimit ( long  aId,
Geometry  aLine,
double  aSpeed,
int  aVehicleTypes,
boolean  aDriveOnLeft 
)

Adds a speed limit in kph, to be used when calculating routes, to a route defined by a series of points.

Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). The ID can be used when calling DeleteTrafficInfo().

aLine is a series of points defining the road. The road is calculated as the best route through the points, using the route network, so to be certain of specifying the desired route you need to supply a point for every junction. The points are snapped to the nearest nodes in the route network. This means that at the moment you cannot set a speed limit for a range smaller than an arc between two nodes.

aSpeed is the speed to which travel is restricted in kph. Values of zero or less indicate that the road is closed. Values higher than 255 indicate that there is no speed limit.

aVehicleTypes is a set of flags drawn from the vehicle type constants defined in RouteProfile. If aVehicleTypes is 0, all vehicles are affected.

aDriveOnLeft allows a highlight to be drawn on the driver's side, in the direction of travel. It should be set to true for left-driving countries like Britain, Ireland, Australia, India, Japan, Indonesia, etc.

A line map object representing the speed limit is added to the layer 'traffic'.

See also addTrafficInfo(), addClosedLineSpeedLimit(), addPolygonSpeedlimit(), addForbiddenArea(), deleteTrafficInfo(), and clearTrafficInfo().

native int com.cartotype.Framework.addNearbyObjectWarning ( String  aLayer,
double  aMaxDistanceToRoute,
double  aMaxDistanceAlongRoute 
)

Starts warning about objects from the layer aLayer. Warnings are generated for objects no further than a specified distance from the route, and a specified distance along the route, measured from the nearest on-route point to the object.

If a warning has already been set up for aLayer, replace it with the new warning.

Returns a CartoType error code (0 = success).

int com.cartotype.Framework.addPolygonSpeedLimit ( long  aId,
Geometry  aPolygon,
double  aSpeed,
int  aVehicleTypes 
)

Adds a speed limit in kph, to be used when calculating routes, to all roads in a certain polygon. To specify particular roads, or an area enclosed by roads, use AddTrafficInfo(). This allows the router to take account of slow-downs caused by traffic density, road works, etc.

Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). The ID can be used when calling DeleteTrafficInfo().

aSpeed is the speed to which travel is restricted, in kph. If aSpeed is zero or less, routing is forbidden in the given polygon.

aVehicleTypes is a set of flags drawn from the vehicle type constants defined in RouteProfile. If aVehicleTypes is 0, all vehicles are affected.

A polygon map object representing the speed limit is added to the layer 'traffic'.

See also addTrafficInfo(), addLineSpeedlimit(), addForbiddenArea(), deleteTrafficInfo(), and clearTrafficInfo().

native int com.cartotype.Framework.addProfile ( RouteProfile  aProfile)

Adds a new routing profile. A Framework object starts with a single routing profile. Adding new profiles allows several different routes to be calculated for the same start and end point.

This function has no effect if routing is performed on a map with a built-in contraction-hierarchy routing table (created using makemap /route=ch), because such a table is created using a fixed routing profile which can be set in makemap.

Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.addTrafficInfo ( long  aId,
TrafficInfo  aTrafficInfo,
LocationRef  aLocationRef,
boolean  aDriveOnLeft 
)

Adds traffic information, such as a speed restriction, prohibition on the use of a route, reduction in the number of lanes, notification of road works, etc. At present only speed restrictions are supported.

This is the general function. See also the specialized functions addPolygonSpeedLimit(), addLineSpeedLimit(), addClosedLineSpeedLimit() and addForbiddenArea().

Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). The ID can be used when calling DeleteTrafficInfo().

aTrafficInfo gives the type of information (speed limit, etc.).

aLocationRef defines the location (area, road, point, etc.). Only the values ERoadOrientationForwards and ERoadOrientationNone (which means the same in this context) is supported for iRoadOrientation in aLocationRef.

aDriveOnLeft is used when adding a line speed limit to allow a highlight to be drawn on the driver's side, in the direction of travel. It should be set to true for left-driving countries like Britain, Ireland, Australia, India, Japan, Indonesia, etc.

String com.cartotype.Framework.appBuildDate ( )

Returns the date on which the application was built in the form YYYY-MM-DD.

void com.cartotype.Framework.appendStyleSheet ( String  aStyleSheetFileName)

Loads an extra style sheet from a file. Extra style sheets are compiled after the main style sheet.

void com.cartotype.Framework.appendStyleSheet ( byte[]  aData)

Loads an extra style sheet from data in memory. Extra style sheets are compiled after the main style sheet.

static String com.cartotype.Framework.build ( )
static

Returns the current CartoType build number as a string.

Deprecated:
: use Util.build()
native int com.cartotype.Framework.chooseRoute ( int  aRouteIndex)

Chooses one among a set of alternative routes. The index aRouteIndex selects the route: index 0 is the route created from the main profile. Indexes from 1 upwards select routes created using profiles added using addProfile(), in order of their addition.

Returns a CartoType error code: 0 = success.

This function is most appropriately called after calling startNavigation() to create the routes, but before calling navigate() to supply a position.

native void com.cartotype.Framework.clearTrafficInfo ( )

Deletes all speed restrictions, forbidden areas and other traffic information.

native boolean com.cartotype.Framework.clipBackgroundToMapBounds ( boolean  aEnable)

Enables or disables clipping the map background to the map bounds. Use this when creating map tiles to be overlaid on a larger map, so that the background (sea) color does not erase the larger map's graphics. The return value is the previous state.

static int com.cartotype.Framework.Color ( int  aRed,
int  aGreen,
int  aBlue 
)
static

Creates a color value from red, green, blue and alpha values in the range 0...255.

static int com.cartotype.Framework.Color ( int  aRed,
int  aGreen,
int  aBlue,
int  aAlpha 
)
static

Creates a color value from red, green, blue and alpha values in the range 0...255.

native int com.cartotype.Framework.configure ( String  aFileName)

Configures the CartoType framework by reading an XML configuration file.

void com.cartotype.Framework.convertCoords ( double[]  aCoordArray,
CoordType  aFromCoordType,
CoordType  aToCoordType 
)

Converts any number of pairs of coordinates from one type to another. In each pair the first coordinate is the x or longitude value and the second is the y or latitude value. If the array size is odd the last value is ignored.

native String com.cartotype.Framework.copyright ( )

Returns the copyright string stored in the main map database.

Route com.cartotype.Framework.createBestRoute ( RouteProfile  aProfile,
double[]  aX,
double[]  aY,
CoordType  aCoordType,
boolean  aStartFixed,
boolean  aEndFixed,
int  aIterations 
)

Creates an optimized route to visit a series of waypoints in any order. If aStartFixed is true, the first point in the route is always the first point supplied. If aEndFixed is true, the last point in the route is always the last point supplied. To create a circular route starting and ending at a predetermined place, but visiting the other points in any order, set aStartFixed and aEndFixed true, and make the first and last point the same. aIterations is the number of different routes to be tried.

Route com.cartotype.Framework.createRoute ( RouteProfile  aProfile,
double[]  aX,
double[]  aY,
CoordType  aCoordType 
)

Creates a route without starting navigation, supplying a route profile and waypoints.

Route com.cartotype.Framework.createRouteFromXml ( RouteProfile  aProfile,
String  aFileNameOrData 
)

Creates a route by reading it from XML data in GPX or CartoType route format. If the parameter aFileNameOrData starts with a less-than sign, it is treated as XML data, otherwise it is treated as a filename.

If GPX data contains route elements, the first of them is used; otherwise the first track element is used if any.

The profile is ignored if the data is in CartoType route format, which contains the profile used to create it.

int com.cartotype.Framework.createWritableMap ( WritableMapType  aType)

Creates a writable (editable) map of the specified type and loads it. Returns a CartoType result code: 0 = success.

native long com.cartotype.Framework.deleteMapObjects ( int  aMapHandle,
long  aStartId,
long  aEndId,
String  aCondition 
)

Deletes map objects from the writable map identified by aMapHandle. Objects with IDs in the range aStartId...aEndId inclusive are deleted. If aCondition is non-null and non-empty, only objects fulfilling the condition, which is a style sheet expression, are deleted. Returns the number of objects deleted.

native int com.cartotype.Framework.deleteNearbyObjectWarning ( String  aLayer)

Stops warning about nearby objects from the layer aLayer.

Returns a CartoType error code.

native int com.cartotype.Framework.deleteRoutes ( )

Deletes all routes. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.deleteStyleSheet ( int  aIndex)

Deletes the style sheet with the specified index. The main style sheet (index 0) may not be deleted. Other style sheets have indexes from 1 up, in the order of loading. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.deleteTrafficInfo ( long  aId)

Deletes traffic information: a speed limit, forbidden area, or other information, referring to it by the ID returned when the restriction was added by addTrafficInfo(), addLineSpeedLimit(), addForbiddenArea(), etc.

Use clearTrafficInfo() to delete all restrictions and forbidden areas.

native int com.cartotype.Framework.displayPositionOnNearestRoad ( double  aLong,
double  aLat,
double  aHeadingInDegrees,
NearestRoadInfo  aInfo,
double  aMaxDistanceInMeters 
)

Moves the route position object and the route vector object to the nearest point on a road. Uses the supplied position and heading. If aHeadingInDegrees is not negative, uses it to choose among roads going in different directions. If aInfo is non-null, returns information about the nearest road. This function can be used whether or not navigation is being performed.

Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.displayRoute ( boolean  aEnable)

If aEnable is true, displays the current route and a maximum of 2 alternative routes. If not, removes the current route from the display.

native double com.cartotype.Framework.distanceToDestination ( )

Returns the distance from the current point on the route to the destination in meters.

native void com.cartotype.Framework.drawNoticesAutomatically ( boolean  aEnable)

Controls whether notices (the scale bar, legend and copyright notice) are drawn automatically.

native void com.cartotype.Framework.enableDrawingMemoryDataBase ( boolean  aEnable)

Enables or disables the drawing of the in-memory database when the rest of the map is drawn. The in-memory database is used for the route, its start and end, and the current vehicle position. If drawing the in-memory database is disabled, you can get a separate image containing the objects from the in-memory database by calling getMemoryDataBaseMapBitmap.

native void com.cartotype.Framework.enableLayer ( String  aLayerName,
boolean  aEnable 
)

Enables or disables a named map layer.

native void com.cartotype.Framework.enableLegend ( boolean  aEnable)

Enables or disables the drawing of a legend that has been supplied using SetLegend.

native void com.cartotype.Framework.enableMap ( int  aHandle,
boolean  aEnable 
)

Enables or disables a map, selecting it by handle.

native boolean com.cartotype.Framework.enableNavigation ( boolean  aEnable)

Enables or disables navigation. When navigation is disabled, the follow modes work but no navigation is performed even if there is a route. The return value is the previous state.

native void com.cartotype.Framework.enableScaleBar ( boolean  aEnable)

Enables or disables the drawing of a scale bar that has been supplied using SetScale.

native boolean com.cartotype.Framework.enableTrafficInfo ( boolean  aEnable)

Enables or disables the use of traffic information when routing. Returns the previous state.

native void com.cartotype.Framework.enableTurnInstructions ( boolean  aEnable)

Enables or disables the drawing of a turn instruction notice that has been supplied using setTurnInstructions.

native void com.cartotype.Framework.endNavigation ( )

Stops navigating. Current routes remain in existence. Navigation can be resumed using startNavigation or enableNavigation.

native double com.cartotype.Framework.estimatedTimeToDestination ( )

Returns the estimated time from the current point on the route to the destination in seconds.

native String com.cartotype.Framework.expiryDate ( )

Returns the expiry date of the license in the form YYYY-MM-DD.

MapObject [] com.cartotype.Framework.find ( int  aMaxObjectCount,
String  aText,
int  aMatchMethod 
)

Finds map objects with attributes matching a certain string, searching all attributes and all layers.

MapObject [] com.cartotype.Framework.find ( int  aMaxObjectCount,
Geometry  aClip,
String  aLayers,
String  aAttributes,
String  aText,
int  aStringMatchMethod,
String  aCondition,
boolean  aMerge 
)

A general find function, allowing any combination of parameters.

The objects returned are in map coordinates.

aClip, if non-null, restricts the search to objects intersecting a certain path.

aLayers, if non-null, is a list of layers separated by spaces or commas. If it is null all layers are searched.

aAttributes is used in text searching (if aText is non-null). If aAttributes is null or empty, search all attributes, otherwise aAttributes is a list of attributes separated by spaces or commas; use "$" to indicate the label (the unnamed attribute).

aText, if non-null, restricts the search to objects containing aText in one of their string attributes.

aStringMatchMethod is used in text searching.

aCondition, if non-null, is an expression using the same syntax as style sheet expressions (e.g., "Type==2") which must be fulfilled by all the objects.

aMerge, if true, merges adjoining objects with the same name and attributes into a single object.

native MapObject [] com.cartotype.Framework.find ( FindParam  aFindParam)

A general find function using a FindParam parameter object.

MapObject [] com.cartotype.Framework.find ( PointOfInterestType  aType,
String  aText,
Geometry  aLocation 
)

A find function to find nearby objects. You can also construct a FindParam object from the same parameters, modify them if needed, and call Find.

native MapObject [] com.cartotype.Framework.findAddress ( int  aMaxObjectCount,
Address  aAddress,
boolean  aFuzzy 
)

Finds an address, using an Address object. At least one of the fields in the Address object must be non-null and non-empty for any map objects to be found. If aFuzzy is true, uses fuzzy matching.

MapObject [] com.cartotype.Framework.findAddressPart ( int  aMaxObjectCount,
String  aText,
AddressPart  aAddressPart,
boolean  aFuzzy,
boolean  aIncremental 
)

Finds part of an address used in an Address object, using the same search rules used for finding an entire address. If aIncremental is true, prefix-matching is used and this enables an address dialog to be populated incrementally; in this case it's a good idea to set aMaxObjectCount to a small number that is a suitable number of items to be displayed in a list box on the display, for example 20.

native MapObject [] com.cartotype.Framework.findBuildingsNearStreet ( MapObject  aStreet)

Finds all the buildings near the map object aStreet, which must be a linear object. In practice, aStreet needs to have a name that is referred to by the addr:street attribute. The buildings returned are those within 50 meters of aStreet, plus those buildings up to 200 meters away with an addr:street attribute matching the street's name.

native MapObjectGroup [] com.cartotype.Framework.findGroups ( FindParam  aFindParam)

A find function to make interactive searching easier. It returns map objects grouped by names which can be used to identify the groups in a list box. For example, a search for pubs using the word 'Red' as the search term might return one group with the name 'Red Lion' and another group with the name 'Red Cow'.

native MapObject [] com.cartotype.Framework.findInDisplay ( int  aMaxObjectCount,
double  aX,
double  aY,
double  aRadius 
)

Finds map objects within a certain radius of a point on the displayed map. The point and radius are given in display pixels. Unlike the other find functions, this function deals with the graphic representation of objects, so it will work correctly when the user clicks on an icon, but not on the actual location of the object represented by the icon.

MapObject [] com.cartotype.Framework.findInLayer ( int  aMaxObjectCount,
String  aLayer,
double  aX1,
double  aY1,
double  aX2,
double  aY2,
CoordType  aCoordType 
)

Finds all the map objects in a certain rectangle, in a certain layer.

int com.cartotype.Framework.findNearestRoad ( NearestRoadInfo  aInfo,
double  aX,
double  aY,
CoordType  aCoordType,
double  aHeadingInDegrees,
LocationMatchParam  aParam,
boolean  aDisplay 
)

Finds the nearest road to the point (aX,aY), returns information about it in aInfo, and optionally (if aDisplayPosition is true) sets the current location to that position. It is legal for aInfo or aParam or both to be null. If aParam is null, default values are used, as if a newly constructed LocationParam() object was supplied.

Roads are defined as map objects allowed by the current routing filter and main route profile. If aHeadingInDegrees is valid (not negative) it is used to choose among roads going in different directions.

Returns a CartoType error code: 0 = success.

native MapObject [] com.cartotype.Framework.findPointsInPath ( Geometry  aPath,
FindParam  aFindParam 
)

Finds all point objects contained in a certain closed path. To use standard parameters pass null for aFindParam. To set parameters other than the path and the condition of finding points, pass a FindParam object with your chosen parameters.

native MapObject [] com.cartotype.Framework.findPolygonsContainingPath ( Geometry  aPath,
FindParam  aFindParam 
)

Finds all polygon objects containing a certain path. To use standard parameters pass null for aFindParam. To set parameters other than the path and the condition of finding polygons, pass a FindParam object with your chosen parameters.

native MapObject [] com.cartotype.Framework.findStreetAddresses ( int  aMaxObjectCount,
Address  aAddress,
Geometry  aClip 
)

Finds all street addresses matching the supplied parameters.

In the address, only the building, street, locality, admin area, country and postcode are used; the other fields are ignored. One of the special characters '*', indicating a prefix search, or '~', indicating a fuzzy search, may be appended to any address field: for example, a postcode of 9040* searches for all postcodes starting with 9040.

The returned objects are either streets or buildings. If the building is specified, buildings are returned, otherwise streets are returned. To get all buildings in the selected streets, use '*' as the building.

MapObject [] com.cartotype.Framework.findText ( int  aMaxObjectCount,
String  aText,
int  aMatchMethod,
String  aLayers,
String  aAttributes 
)

Finds map objects with attributes matching a certain string, restricting the search to selected attributes and layers. aLayers is a list of layer names separated by commas or spaces: for example, "lake,river". aAttributes is a list of string attribute names separated by commas or spaces, where $ stands for the main name of the object (the unnamed string attribute): for example, "$,ref". aLayers and aAttributes may be null or empty: if no layers are given, all layers are searched, and if no attributes are given, all attributes are searched.

Wild cards may be specified using the non-character Unicode codepoint U+FFFF.

int com.cartotype.Framework.getAddress ( Address  aAddress,
double  aX,
double  aY,
CoordType  aCoordType 
)

Gets an address for a point.

Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoType library.

Returns a CartoType error code: 0 = success.

native boolean com.cartotype.Framework.getAnimateTransitions ( )

Returns true if transitions are smoothly animated in graphics-accelerated drawing.

native double com.cartotype.Framework.getContinuationTurn ( Turn  aTurn)

When navigating, gets the continuation turn if any and returns the distance to it in map metres from the first turn. If there is no continuation turn sets the turn type to Turn.TURN_NONE and returns 0;

double com.cartotype.Framework.getDistanceInMeters ( double  aX1,
double  aY1,
double  aX2,
double  aY2,
CoordType  aCoordType 
)

Gets the distance between two points.

native boolean com.cartotype.Framework.getDraw3DBuildings ( )

Returns true if buildings are drawn in 3D where data is available.

native double com.cartotype.Framework.getFirstTurn ( Turn  aTurn)

When navigating, gets the first turn and returns the distance to it in map metres. If there is no nearby turn sets the turn type to Turn.TURN_NONE and return 0;

native int com.cartotype.Framework.getFollowMode ( )

Gets the follow mode, which controls the way the map tracks the user location and heading.

String com.cartotype.Framework.getGeoCodeSummary ( double  aX,
double  aY,
CoordType  aCoordType 
)

Returns a string summarizing a geocode for a geographical location. The summary is a string version of the address returned by getAddress.

Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoType library.

int com.cartotype.Framework.getHeight ( double  aX,
double  aY,
CoordType  aCoordType 
)

Returns the height in metres at a single point, or -32768 if it is unavailable.

The layer 'terrain-height-metres' is used by preference. It contains heights to metre precision. If that layer is not available, the layer 'terrain-height-feet' is used, which contains heights to 100-foot precision.

int com.cartotype.Framework.getHeightProfile ( double[]  aX,
double[]  aY,
int[]  aTerrainHeightArray,
CoordType  aCoordType 
)

Gets an array of heights in feet for a route represented by the two arrays aX and aY. A line joining the points returned in aTerrainHeightArray is guaranteed to clear all heights between pairs of points. This function requires the 'terrain-height-feet' layer. Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.getHeights ( double[]  aX,
double[]  aY,
int[]  aTerrainHeightArray,
CoordType  aCoordType 
)

Finds the heights of a set of points in the specified coordinate type. Heights are returned in metres.

The layer 'terrain-height-metres' is used by preference. It contains heights to metre precision. If that layer is not available, the layer 'terrain-height-feet' is used, which contains heights to 100-foot precision. Unknown heights are set to -32768.

Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.getLastMapHandle ( )

Gets the handle of the map most recently loaded, or created using CreateWritableMap.

long com.cartotype.Framework.getLastObjectId ( )

Returns the integer ID of the last object inserted into a writable map.

native int com.cartotype.Framework.getMainMapHandle ( )

Gets the handle of the main map.

Bitmap com.cartotype.Framework.getMap ( )

Gets the current map as a 32bpp RGBA bitmap. The returned image is valid till the next call to getMap or getMemoryDataBaseMap.

void com.cartotype.Framework.getMapExtent ( double[]  aPoint,
CoordType  aCoordType 
)

Gets the extent of the map. If aPoint has two or more members puts the view center in aPoint[0] and aPoint[1]. If aPoint has six or more members, also puts the view rectangle in aPoint[2] ... aPoint[5] in the order left, top, right, bottom.

Bitmap com.cartotype.Framework.getMemoryDataBaseMap ( )

Gets an image showing objects from the in-memory database only as a 32bpp RGBA bitmap. The returned image is valid till the next call to getMap or getMemoryDataBaseMap.

native int com.cartotype.Framework.getMemoryMapHandle ( )

Gets the handle of the in-memory map used for routing.

int com.cartotype.Framework.getNavigationPosition ( double[]  aPoint,
CoordType  aCoordType 
)

Gets the current position used by the navigation system. This may be an extrapolated position. The position is returned in aPoint, which must have at least two elements. Returns a CartoType error code (0 = success).

NavigationState com.cartotype.Framework.getNavigationState ( )

Returns the navigation state.

native NavigatorParam com.cartotype.Framework.getNavigatorParam ( )

Returns the parameters controlling the way navigation works.

native MapObject [] com.cartotype.Framework.getNearbyObjects ( String  aLayer,
int  aMaxObjectCount 
)

Gets objects from aLayer which are close enough to generate warnings.

int com.cartotype.Framework.getNearestRoad ( NearestRoadInfo  aInfo,
double  aX,
double  aY,
CoordType  aCoordType,
double  aMaxDistanceInMeters,
double  aHeadingInDegrees 
)

Gets information about the nearest road to the point (aX,aY).

Deprecated:
Use findNearestRoad().

Roads are defined as map objects allowed by the current routing filter and main route profile. Examines objects within a distance of aMaxDistanceInMeters only. The legal range for aMaxDistanceInMeters is from 5 meters to 1000 meters. Illegal values are clamped to that range. If aHeadingInDegrees is valid (not negative) it is used to choose among roads going in different directions.

Returns a CartoType error code: 0 = success.

native boolean com.cartotype.Framework.getPerspective ( )

Returns true if the perspective view is turned on, false otherwise.

native PerspectiveParam com.cartotype.Framework.getPerspectiveParam ( )

Returns the current perspective parameters.

double com.cartotype.Framework.getPolygonArea ( double[]  aX,
double[]  aY,
CoordType  aCoordType 
)

Calculates the area of a polygon as drawn in the current map.

native String com.cartotype.Framework.getProjectionAsProj4Param ( )

Gets the current map projection as a proj.4 parameter string if possible. If not returns the empty string.

native double com.cartotype.Framework.getRotation ( )

Gets the current rotation angle of the map in degrees.

Route com.cartotype.Framework.getRoute ( int  aIndex)

Gets one of the current routes. Returns null if the selected route does not exist.

native int com.cartotype.Framework.getRouteCount ( )

Returns the number of routes in existence.

native String com.cartotype.Framework.getRouteInstructions ( Route  aRoute)

Gets instructions for the route in the language of the current locale, or in English if that language is not available.

native int com.cartotype.Framework.getScale ( )

Gets the map's scale denominator.

native int com.cartotype.Framework.getScaleDenominatorInView ( )

Gets the map's scale denominator for the center of the current view, compensating for local scale distortion caused by the projection.

native double com.cartotype.Framework.getSecondTurn ( Turn  aTurn)

When navigating, gets the second turn and returns the distance to it in map metres from the first turn. If there is no nearby second turn sets the turn type to Turn.TURN_NONE and returns 0;

Bitmap com.cartotype.Framework.getTileBitmap ( int  aTileSizeInPixels,
int  aZoom,
int  aX,
int  aY 
)

Gets an image containing a tile of the required coordinates and size, using OpenStreetMap tile coordinates. The returned image is valid till the next call to getTileBitmap. This function works properly only if the map is in the Web Mercator projection.

void com.cartotype.Framework.getViewDimensions ( double[]  aPoint,
CoordType  aCoordType 
)

Gets the view dimensions. If aPoint has two or more members puts the view center in aPoint[0] and aPoint[1]. If aPoint has six or more members, also puts the view rectangle in aPoint[2] ... aPoint[5] in the order left, top, right, bottom.

native ViewState com.cartotype.Framework.getViewState ( )

Returns the current view state.

native boolean com.cartotype.Framework.hasNotices ( )

Returns true if any notices such as a scale bar, legend or copyright notice exist.

int com.cartotype.Framework.insertCircleMapObject ( int  aMapHandle,
String  aLayerName,
double  aCenterX,
double  aCenterY,
CoordType  aCenterCoordType,
double  aRadius,
CoordType  aRadiusCoordType,
String  aStringAttributes,
int  aIntAttribute,
long  aId,
boolean  aReplace 
)

Inserts a circular map object into one of the writable maps, identifying the map by its handle. The circle is defined by its center and radius, which may have different coordinate types. It is often convenient to supply a point in degrees and its radius in map meters. Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). This function fails if the map is not writable. If aReplace is true and aId is a duplicate of an existing object, the existing object is replaced, otherwise a duplicate causes the function to fail. Returns a CartoType result code: 0 = success.

int com.cartotype.Framework.insertCopyOfMapObject ( int  aMapHandle,
String  aLayername,
MapObject  aMapObject,
double  aEnvelopeRadius,
CoordType  aRadiusCoordType,
long  aId,
boolean  aReplace 
)

Inserts an object by copying an existing object. If aEnvelopeRadius is greater than zero, converts the object to an envelope using the specified radius. Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). This function fails if the map is not writable. If aReplace is true and aId is a duplicate of an existing object, the existing object is replaced, otherwise a duplicate causes the function to fail. Returns a CartoType result code: 0 = success.

int com.cartotype.Framework.insertEnvelopeMapObject ( int  aMapHandle,
String  aLayerName,
Geometry  aGeometry,
double  aRadius,
CoordType  aRadiusCoordType,
String  aStringAttributes,
int  aIntAttribute,
long  aId,
boolean  aReplace 
)

Inserts an envelope map object into one of the writable maps, identifying the map by its handle. An envelope is a continuous curve at a certain distance from some geometry, and can be regarded as a stroke of width aRadius drawn along a path. It is often convenient to supply the geometry in degrees and the radius in map meters. Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). This function fails if the map is not writable. If aReplace is true and aId is a duplicate of an existing object, the existing object is replaced, otherwise a duplicate causes the function to fail. Returns a CartoType result code: 0 = success.

int com.cartotype.Framework.insertMapObject ( int  aMapHandle,
MapObjectType  aMapObjectType,
String  aLayerName,
Geometry  aGeometry,
String  aStringAttributes,
int  aIntAttribute,
long  aId,
boolean  aReplace 
)

Inserts a map object into one of the writable maps, identifying the map by its handle. Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). This function fails if the map is not writable. If aReplace is true and aId is a duplicate of an existing object, the existing object is replaced, otherwise a duplicate causes the function to fail. Returns a CartoType result code: 0 = success.

int com.cartotype.Framework.insertPointMapObject ( int  aMapHandle,
String  aLayerName,
double  aX,
double  aY,
CoordType  aCoordType,
String  aStringAttributes,
int  aIntAttribute,
long  aId,
boolean  aReplace 
)

Inserts a point map object into one of the writable maps, identifying the map by its handle. Uses the supplied ID if aId is non-zero, otherwise generates an ID which can be retrieved using getLastObjectId(). This function fails if the map is not writable. If aReplace is true and aId is a duplicate of an existing object, the existing object is replaced, otherwise a duplicate causes the function to fail. Returns a CartoType result code: 0 = success.

int com.cartotype.Framework.insertPushPin ( double  aX,
double  aY,
CoordType  aCoordType,
String  aStringAttributes,
String  aColor,
int  aIconCharacter,
long  aId 
)

Inserts a pushpin: a point object belonging to the 'pushpin' layer. The pushpin is inserted into the built-in modifiable map.

If aColor is not empty it is used as the _color attribute, which, in the standard style sheet, causes the pushpin icon to be drawn in that color instead of the standard color.

If aIconCharacter is not zero it is used to set the _iconText attributes, which, in the standard style sheet, causes that character to be used as an icon. The MapKeyIcons font is supplied with CartoType and contains icons in the private-character range U+E002...U+E0B1.

If aId is zero, a new pushpin is inserted and its ID is returned in aId. If aId is non-zero, an existing pushpin with the specified ID, if any exists, is replaced.

static int com.cartotype.Framework.intAttribute ( String  aThreeLetterCode,
int  aType 
)
static

Constructs an integer attribute from an optional three-letter code, placed in the high 16 bits by encoding each letter in five bits, and a type number placed in the low 16 bits.

The three-letter code is used only if it consists of exactly three lower-case letters in the range a...z.

Three-letter codes are used for mnemonic purposes, as for example "pub" for a public house, and can be tested easily in style sheets.

native String [] com.cartotype.Framework.layerNames ( )

Returns the names of all the layers in the map data.

native void com.cartotype.Framework.license ( String  aKey)

Supplies a license key to remove the map watermark and other restrictions.

native String com.cartotype.Framework.licensee ( )

Returns the name of the licensee, or "no licensee: for evaluation only".

native int com.cartotype.Framework.loadFont ( String  aFontFileName)

Loads a font in addition to any fonts already loaded. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.loadIcon ( String  aFileName,
String  aId,
int  aHotSpotX,
int  aHotSpotY,
int  aLabelX,
int  aLabelY,
int  aLabelMaxLength 
)

Loads an icon from a file. It will be used whenever the ID aId is referenced in the style sheet, overriding any icon specified in the style sheet.

The icon file may be in PNG or JPEG format.

(aHotSpotX,aHotSpotY) is the point, relative to the top left corner of the icon, that should be made to coincide with the point of interest marked by the icon.

(aLabelX,aLabelY) is the point, relative to the hot spot, at which the center of the baseline of any label text is placed.

aLabelMaxLength is the maximum length of label text in pixels. Labels too long to be drawn on the icon are drawn next to it.

Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.loadMap ( String  aMapFileName)

Loads another map, in addition to the main one loaded by the constructor. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.loadMap ( String  aMapFileName,
byte[]  aMapEncryptionKey 
)

Loads another map, in addition to the main one loaded by the constructor. If aMapEncryptionKey is non-null the map must have been encrypted using it. Returns a CartoType result code: 0 = success.

native MapObject com.cartotype.Framework.loadMapObject ( int  aMapHandle,
long  aObjectId 
)

Loads a map object from a map. Returns null if the object doesn't exist.

native int com.cartotype.Framework.loadNavigationData ( )

Loads navigation data for the current map. This function is optional. If it is not called, navigation data will be loaded automatically when first needed. It is provided so that the time overhead of loading navigation data can be incurred at a predictable stage, for example at application startup.

Returns a CartoType error code: 0 = success. No error is returned if navigation data has already been loaded.

native String com.cartotype.Framework.locale ( )

Returns the locale used when getting the names of map objects when routing, geocoding, etc. The returned value is either a null-terminated string, usually a two-letter language identifier like 'en' for English or 'fr' for French, or an empty string meaning 'no locale'.

native int com.cartotype.Framework.mapCount ( )

Returns the number of maps currently loaded, including the main map and the in-memory map.

native boolean com.cartotype.Framework.mapIsEmpty ( int  aHandle)

Returns true if a map, identified by its handle, is known to be empty or does not exist.

native int com.cartotype.Framework.navigate ( int  aValidity,
double  aTime,
double  aLong,
double  aLat,
double  aSpeed,
double  aCourse,
double  aHeight 
)

Updates the vehicle position and, if navigating, updates the navigation state.

In order to implement turn-by-turn navigation, you should call navigate() at frequent intervals (once per second is good enough) after creating a route using startNavigation(), readRouteFromXml(), etc.

When not navigating, you may call this function to update the vehicle position if necessary (i.e., if the current follow mode displays the vehicle position: see setFollowMode()).

aValidity is a set of bit flags, ORed together, which determines which of the other parameters are valid. The bit flags are the constants Framework.TIME_VALID, Framework.POSITION_VALID, Framework.SPEED_VALID, Framework.COURSE_VALID and Framework.HEIGHT_VALID. For normal navigation not all the data is necessary: you need supply the time and position only. Other data, if available, helps the navigation system decide which road the vehicle is on, and extrapolate positions. The height (elevation above sea level) is not currently used.

aTime is the time in seconds. Any consistent time representation may be used (e.g., the unix timestamp format of the time in seconds since midnight, 1st Jan 1970); the absolute time does not matter as long as times can be subtracted to give a difference in seconds.

aLong and aLat are the location in degrees longitude and latitude, using the WGS84 datum.

aSpeed is the speed in kilometres per hour.

aCourse is the true course in degrees, where 0 is north, and degrees increase clockwise; 90 is east, 180 is south, and 270 is west.

aHeight is the height above sea level in metres.

If the position is invalid, navigate() guesses the position by extrapolating from the current speed, if known, and the previous position.

After navigate() has been called, the map position, rotation or zoom will change according to the current follow mode (see setFollowMode()).

If you are not using graphics acceleration you should redraw the map after calling this function.

Returns a CartoType error code: 0 = success.

native boolean com.cartotype.Framework.navigationEnabled ( )

Returns true if navigation is enabled, false otherwise.

void com.cartotype.Framework.onDynamicDataChange ( )

This virtual function is called when the dynamic data changes, which can be caused by creating or deleting a route, or inserting or deleting a pushpin or other dynamic map object.

void com.cartotype.Framework.onMainDataChange ( )

This virtual function is called when the map data changes, which can be caused by loading a new map, unloading a map, enabling or disabling a map, enabling or disabling a layer, or changing the style sheet.

void com.cartotype.Framework.onViewChange ( )

This virtual function is called when the map view changes, which can be caused by panning, zooming, rotation, moving to a new location, or resizing the map.

native void com.cartotype.Framework.pan ( int  aDx,
int  aDy 
)

Pans (slides the map) by a certain distance in pixels, horizontally or vertically or both.

void com.cartotype.Framework.panFromTo ( double  aFromX,
double  aFromY,
CoordType  aFromCoordType,
double  aToX,
double  aToY,
CoordType  aToCoordType 
)

Pans (slides the map) so that the position aFromX,aFromY moves to aToX,aToY.

RouterType com.cartotype.Framework.preferredRouterType ( )

Returns the preferred type of router to be used for calculating routes.

Geometry com.cartotype.Framework.range ( RouteProfile  aProfile,
double  aX,
double  aY,
CoordType  aCoordType,
double  aTimeOrDistance,
boolean  aIsTime 
)

Returns the range: a polygon containing the area reachable within a certain time in seconds or distance in meters.

Uses the supplied route profile if it is non-null, otherwise the current profile. If a time is supplied, the profile's bonuses and penalties are suppressed. If a distance is supplied, shortest routes are used. You can optionally insert the returned Geometry object into the map using insertMapObject.

native int com.cartotype.Framework.readGpx ( int  aMapHandle,
String  aFileName 
)

Reads route and track objects from a GPX file and inserts them into the map identified by aMapHandle. This function fails if the map is not writable.

Waypoint objects (wpt) are made into points in the gpx/wpt layer. Route objects (rte) are made into lines in the gpx/rte layer. Track objects (trk) are made into lines in the gpx/trk layer.

int com.cartotype.Framework.readMap ( int  aHandle,
String  aFileName,
FileType  aFileType 
)

Reads map data from aFileName in the format given by aFileType and merges it into the map identified by aHandle, which must refer to a writable map database. Only the CTMS (CartoType Map Serialized) and KML (Keyhole Markup Language) file types are currently supported. Returns a CartoType result code: 0 = success.

native int com.cartotype.Framework.readRouteFromXml ( String  aFileNameOrData,
boolean  aReplace 
)

Reads a route from XML (a GPX file or a CartoType route file) and displays it. aFileNameOrData is treated as XML data if it starts with a less-than sign.

If aReplace is true, deletes all current routes, adds the new route and makes its profile the current profile. If aReplace is false, appends the new route to the list of current routes.

Appending a route fails if the new route has a different start and end point, or intermediate waypoints, from the current routes.

This function resets the navigation state and enables navigation.

native int com.cartotype.Framework.reloadStyleSheet ( int  aIndex)

Reloads a sheet from the file it was originally loaded from. This function can be used to apply changes after a style sheet is modified. The index aIndex determines which style sheet is reloaded: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets. Only style sheets loaded from files can be reloaded. Returns a CartoType error code: 0 = success.

void com.cartotype.Framework.resize ( int  aViewWidth,
int  aViewHeight 
)

Resizes the map view, supplying the new view width and height in pixels.

native double com.cartotype.Framework.resolutionDpi ( )

Gets the display resolution used by CartoType in dots per inch.

native int com.cartotype.Framework.reverseRoutes ( )

Reverses the order of the current route points, recreates the route or routes, and displays them on the map. The two directions of the same route may not follow the same path because of one-way streets and turn restrictions. Returns a CartoType error code: 0 = success.

native void com.cartotype.Framework.rotate ( double  aAngle)

Rotates the map about its center by an angle given in degrees.

int com.cartotype.Framework.rotateAt ( double  aAngle,
double  aX,
double  aY,
CoordType  aCoordType 
)

Rotates the map about a specified point by an angle in degrees.

int com.cartotype.Framework.saveMap ( int  aHandle,
String  aFileName,
FileType  aFileType 
)

Saves a map identified by its handle by writing it the specified format. Only writable map databases may be saved in this way. Only the CTMS (CartoType Map Serialized), CTSQL (CartoType SQL format) and KML (Keyhole Markup Language) file types are currently supported. Returns a CartoType result code: 0 = success.

native boolean com.cartotype.Framework.setAnimateTransitions ( boolean  aEnable)

Enables or disables smoothly animated transitions in graphics-accelerated drawing. Returns the previous enabled state.

static String com.cartotype.Framework.setAttribute ( String  aString,
String  aKey,
String  aValue 
)
static

Sets a named attribute, treating a string as a set of map object attributes of the form label|key1=value1|key2=value2| ... |keyN=valueN, where | is character code 0, An empty or zero-length name sets the label. An empty or zero-length value deletes a name-value pair. Any of aString, aKey or aValue may be null.

Returns the new string, with the attribute set.

Deprecated:
: use Util.setAttribute()
void com.cartotype.Framework.setCopyrightNotice ( )

Sets the copyright notice displayed at the bottom-right corner of the map to that of the main map database.

void com.cartotype.Framework.setCopyrightNotice ( String  aCopyright)

Sets the copyright notice displayed at the bottom-right corner of the map.

native boolean com.cartotype.Framework.setDraw3DBuildings ( boolean  aEnable)

Enables or disables the drawing of 3D buildings where data is available. Returns the previous enabled state.

native int com.cartotype.Framework.setFollowMode ( int  aFollowMode)

Sets the follow mode, which controls the way the map tracks the user location and heading. The parameter aFollowMode is one of the FOLLOW_MODE_* constants. Returns a CartoType error code (0 = success).

void com.cartotype.Framework.setLegend ( Legend  aLegend,
double  aWidth,
String  aUnit,
NoticePosition  aPosition 
)

Sets the legend: map key or scale or both.

native void com.cartotype.Framework.setLocale ( String  aLocale)

Sets the locale used when getting the names of map objects when routing, geocoding, etc. The value of aLocale is usually a two-letter language identifier like 'en' for English or 'fr' for French. Passing an empty or null string sets the locale to 'no locale'.

native void com.cartotype.Framework.setMainProfile ( RouteProfile  aProfile)

Sets the main routing profile. If you do not call this function, the standard profile for private car routing is used.

This function has no effect if routing is performed on a map with a built-in contraction-hierarchy routing table (created using makemap /route=ch), because such a table is created using a fixed routing profile which can be set in makemap.

native void com.cartotype.Framework.setNavigatorAutoReRoute ( boolean  aAutoReRoute)

Turns auto-re-routing in navigation on or off. By default it is turned on. If not, If not, when re-routing is needed, the navigation state NAVIGATION_STATE_RE_ROUTE_NEEDED is entered and the route is recalculated the next time a valid location is provided by a call to navigate(). This gives the application time to issue a warning if the routing algorithm is likely to be slow.

native void com.cartotype.Framework.setNavigatorDistanceTolerance ( int  aMeters)

Sets the navigator's distance tolerance in meters. The navigation state is set to off-route if the current position is at least this far from any part of the route.

native void com.cartotype.Framework.setNavigatorMinimumFixDistance ( int  aMeters)

Sets the navigator's minimum fix distance in meters. A location update is ignored if it is less than this distance from the location last supplied (and not ignored) to the navigate() function.

native void com.cartotype.Framework.setNavigatorParam ( NavigatorParam  aNavigatorParam)

Sets the parameters controlling the way navigation works.

native void com.cartotype.Framework.setNavigatorTimeTolerance ( int  aSeconds)

Set the navigator's time-off-route tolerance in seconds. A new route is calculated if the current position has been off route for this long.

native void com.cartotype.Framework.setPerspective ( boolean  aEnable)

Turns perspective view on or off.

void com.cartotype.Framework.setPerspective ( PerspectiveParam  aParam)

Turns perspective mode on and uses the supplied perspective parameters.

void com.cartotype.Framework.setPreferredRouterType ( RouterType  aRouterType)

Sets the preferred type of router to be used for calculating routes. Different routers have various advantages and disadvantages, such as using more or less memory, being faster or slower, or producing more useful routes.

Calling this function causes navigation data to be unloaded if the current navigation data uses a different type of router.

native void com.cartotype.Framework.setResolutionDpi ( int  aDpi)

Sets the display resolution used by CartoType in dots per inch. It has to be set correctly for map scaling and lettering to work.

native void com.cartotype.Framework.setRotation ( double  aAngle)

Sets the map's orientation to an absolute angle given in degrees. Zero = north-up.

void com.cartotype.Framework.setRotationAt ( double  aAngle,
double  aX,
double  aY,
CoordType  aCoordType 
)

Sets the map's orientation to a rotation about a specified point by an absolute angle given in degrees. Zero = north-up.

native void com.cartotype.Framework.setScale ( int  aScale)

Sets the map's scale denominator.

void com.cartotype.Framework.setScaleBar ( boolean  aMetricUnits,
double  aWidth,
String  aUnit,
NoticePosition  aPosition 
)

Creates a scale bar in either metric or imperial units, with a specified width and position in the display.

native void com.cartotype.Framework.setScaleDenominatorInView ( int  aScale)

Sets the map's scale denominator in the current view, compensating for local scale distortion caused by the projection.

int com.cartotype.Framework.setStyleSheet ( String  aStyleSheetFileName,
int  aIndex 
)

Sets a style sheet by loading it from a file. The index aIndex determines which style sheet to replace: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets. Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.setStyleSheet ( byte[]  aData,
int  aIndex 
)

Sets a style sheet by loading it from data in memory. The index aIndex determines which style sheet to replace: 0 means the main style sheet, and numbers from 1 up refer to extra style sheets. Returns a CartoType error code: 0 = success.

native void com.cartotype.Framework.setStyleSheetVariable ( String  aVariableName,
String  aValue 
)

Sets a style sheet variable to a string value. If the string value is null, clears the style sheet variable.

void com.cartotype.Framework.setStyleSheetVariable ( String  aVariableName,
int  aValue 
)

Sets a style sheet variable to an integer value.

native int com.cartotype.Framework.setTileOverSizeZoomLevels ( int  aLevels)

Sets the number of zoom levels by which to zoom out when creating a tile bitmap returned by getTileBitmap().

The number may be 0, 1, or 2. If it is 0, each tile is self-contained. If it is 1, each tile is cut from a larger tile containing four tiles. If it is 2, each tile is cut from a larger tile containing sixteen tiles. The values 1 and 2 are useful in allowing longer labels to be used when creating small tiles; if not, many street labels will not be drawn because the street is cut in two by the tile border and the resulting sections are too short.

The return value is the previous setting.

void com.cartotype.Framework.setTurnInstructions ( boolean  aMetricUnits,
boolean  aAbbreviate,
double  aWidth,
String  aWidthUnit,
NoticePosition  aPosition,
double  aTextSize,
String  aTextSizeUnit 
)

Creates turn instructions in either metric or imperial units, with a specified width and position in the display.

native void com.cartotype.Framework.setTurnInstructionText ( String  aText)

Sets the instruction to be displayed for the current turn, overriding automatically generated instructions. To revert to automatically generated instructions, call this function with empty or null text. This function has no effect if turn instructions have not been created using setTurnInstructions, or have been disabled by calling enableTurnInstructions(false).

native int com.cartotype.Framework.setVehiclePosOffset ( double  aXOffset,
double  aYOffset 
)

Sets the vehicle position when navigating as an offset from the center of the display, in units of the width and height of the display. For example, to show the vehicle in the middle but three quarters of the way down the display, use (0,0.25).

Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.setView ( double  aX1,
double  aY1,
double  aX2,
double  aY2,
CoordType  aCoordType,
int  aMarginInPixels,
int  aMinScaleDenominator 
)

Sets the view to show a certain rectangle, with a margin in pixels, and at a minimum scale. Returns a CartoType error code: 0 = success.

void com.cartotype.Framework.setView ( MapObject  aMapObject,
int  aMarginInPixels,
int  aMinScaleDenominator 
)

Sets the view to show a single map object, with a margin in pixels, and at a minimum scale.

int com.cartotype.Framework.setView ( MapObject[]  aMapObjectArray,
int  aMarginInPixels,
int  aMinScaleDenominator 
)

Set the view to show a group of map objects, with a margin in pixels, and at a minimum scale. Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.setView ( Geometry  aGeometry,
int  aMarginInPixels,
int  aMinScaleDenominator 
)

Sets the view to show certain geometry, with a margin in pixels, and at a minimum scale. Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.setView ( ViewState  aViewState)

Sets the view to a certain view state. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.setViewCenterLatLong ( double  aLong,
double  aLat 
)

Sets the center of the view to a point given in degrees longitude and latitude. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.setViewToRoute ( int  aRouteIndex,
int  aMarginInPixels,
int  aMinScaleDenominator 
)

Sets the view to one of the current routes, selected by its index (0 means the main route), with a margin in pixels, and at a minimum scale. This function does nothing if the selected route doesn't exist. Returns a CartoType error code: 0 = success.

native int com.cartotype.Framework.setViewToWholeMap ( )

Shows the whole map, zooming out as far as necessary. Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.startNavigation ( double  aStartX,
double  aStartY,
CoordType  aStartCoordType,
double  aEndX,
double  aEndY,
CoordType  aEndCoordType 
)

Starts navigating from one point to another. Creates the route and displays it. Returns a CartoType error code: 0 = success.

int com.cartotype.Framework.startNavigation ( double[]  aX,
double[]  aY,
CoordType  aCoordType 
)

Starts navigating through a series of points. Creates the route and displays it. Returns a CartoType error code: 0 = success.

native String com.cartotype.Framework.turnInstructionText ( )

Gets the instruction to be displayed for the current turn. This function returns an empty string if turn instructions have not been created using setTurnInstructions.

native void com.cartotype.Framework.unloadIcon ( String  aId)

Unloads an icon previously loaded using LoadIcon.

native int com.cartotype.Framework.unloadMap ( int  aHandle)

Unloads a map, selecting it by handle. It is illegal to unload the main map database or the in-memory database. Returns a CartoType result code: 0 = success.

native void com.cartotype.Framework.useImageServer ( boolean  aEnable,
int  aCacheSizeInBytes 
)

Tells the framework whether to use the image server system to draw the map, caching images as needed. If aCacheSizeInBytes is greater than zero it gives the size of the image cache, otherwise the default size is used.

native int com.cartotype.Framework.useRoute ( Route  aRoute,
boolean  aReplace 
)

Loads an existing route and displays it.

If aReplace is true, deletes all current routes and adds the new route. If aReplace is false, appends the new route to the list of current routes.

Appending a route fails if the new route has a different start and end point, or intermediate waypoints, from the current routes.

This function resets the navigation state.

Returns a CartoType error code: 0 = success.

static String com.cartotype.Framework.version ( )
static

Returns the current CartoType version as a string of the form MAJOR.MINOR.

Deprecated:
: use Util.version()
int com.cartotype.Framework.writeMapImage ( String  aFileName,
FileType  aFileType,
boolean  aCompress 
)

Writes a map image to a file of the specified type. Only the PNG file type is supported. If aCompress is true, uses lossy compression to reduce the file size. For PNG files compression is achieved by palettization. Returns a CartoType result code: 0 = success.

int com.cartotype.Framework.writeRouteAsXml ( Route  aRoute,
String  aFileName,
FileType  aFileType 
)

Writes a route as XML in the format selected by aFileType: FileType.CTROUTE or FileType.GPX. Returns a CartoType error code: 0 = success.

String com.cartotype.Framework.writeRouteAsXmlString ( Route  aRoute,
FileType  aFileType 
)

Writes a route as an XML string, in the format selected by aFileType: FileType.CTROUTE or FileType.GPX. Returns null if the file format is not supported.

native void com.cartotype.Framework.zoom ( double  aZoomFactor)

Zooms by the given factor.

int com.cartotype.Framework.zoomAt ( double  aZoomFactor,
double  aX,
double  aY,
CoordType  aCoordType 
)

Zooms by the given factor, centering the zoom at aX,aY. Returns a CartoType error code: 0 = success.

void com.cartotype.Framework.zoomIn ( )

Zooms in by a factor of 2. Returns a CartoType error code: 0 = success.

void com.cartotype.Framework.zoomOut ( )

Zooms out by a factor of 2. Returns a CartoType error code: 0 = success.

Member Data Documentation

final int com.cartotype.Framework.BLACK = 0xFF000000
static

The color black.

final int com.cartotype.Framework.BLUE = 0xFFFF0000
static

The color blue.

final int com.cartotype.Framework.COURSE_VALID = 8
static

A constant for aValidity in navigate() indicating that the course (bearing) is valid.

final int com.cartotype.Framework.CYAN = 0xFFFFFF00
static

The color cyan.

final int com.cartotype.Framework.DARK_BLUE = 0xFF800000
static

The color dark blue.

final int com.cartotype.Framework.DARK_CYAN = 0xFF808000
static

The color dark cyan.

final int com.cartotype.Framework.DARK_GRAY = 0xFF555555
static

The color dark gray.

final int com.cartotype.Framework.DARK_GREEN = 0xFF008000
static

The color dark green.

final int com.cartotype.Framework.DARK_MAGENTA = 0xFF800080
static

The color dark magenta.

final int com.cartotype.Framework.DARK_RED = 0xFF000080
static

The color dark red.

final int com.cartotype.Framework.DARK_YELLOW = 0xFF008080
static

The color dark yellow.

final int com.cartotype.Framework.EXACT_STRING_MATCH_METHOD = 0
static

A constant for aStringMatchMethod in find() indicating an exact match, ignoring case.

final int com.cartotype.Framework.FAST_STRING_MATCH_FLAG = 32
static

A flag to enable fast searching: just get the first matches, not the most relevant ones.

final long com.cartotype.Framework.FIRST_ROUTE_ID = ROUTE_ID_RESERVED_START
static

A reserved map object ID for the first route.

final long com.cartotype.Framework.FIRST_WAYPOINT_ID = LAST_ROUTE_ID + 5
static

A reserved map object ID for the first waypoint.

final int com.cartotype.Framework.FOLD_ACCENTS_STRING_MATCH_FLAG = 4
static

A flag for aStringMatchMethod in find() indicating that accented and unaccented characters should compare equal.

final int com.cartotype.Framework.FOLD_CASE_STRING_MATCH_FLAG = 16
static

A flag for aStringMatchMethod in find() indicating that fuzzy matching should be done.

final int com.cartotype.Framework.FOLD_CASE_STRING_MATCH_METHOD = FOLD_CASE_STRING_MATCH_FLAG
static

A constant for aStringMatchMethod in find() indicating an exact match, ignoring case.

final int com.cartotype.Framework.FOLLOW_FLAG_HEADING = 2
static

A flag to rotate the map to the user's heading.

final int com.cartotype.Framework.FOLLOW_FLAG_LOCATION = 1
static

A flag to make the center of the map follow the user's location.

final int com.cartotype.Framework.FOLLOW_FLAG_ZOOM = 4
static

A flag to set the map to a suitable zoom level for the user's speed.

final int com.cartotype.Framework.FOLLOW_MODE_LOCATION = FOLLOW_FLAG_LOCATION
static

The map is centred on the user's location.

final int com.cartotype.Framework.FOLLOW_MODE_LOCATION_HEADING = FOLLOW_FLAG_LOCATION | FOLLOW_FLAG_HEADING
static

The map is centred on the user's location and rotated to the user's heading.

final int com.cartotype.Framework.FOLLOW_MODE_LOCATION_HEADING_ZOOM = FOLLOW_FLAG_LOCATION | FOLLOW_FLAG_HEADING | FOLLOW_FLAG_ZOOM
static

The map is centred on the user's location, rotated to the user's heading, and zoomed to a suitable level for the user's speed.

final int com.cartotype.Framework.FOLLOW_MODE_LOCATION_ZOOM = FOLLOW_FLAG_LOCATION | FOLLOW_FLAG_ZOOM
static

The map is centred on the user's location and zoomed to a suitable level for the user's speed.

final int com.cartotype.Framework.FOLLOW_MODE_NONE = 0
static

The map does not follow the user's location or heading.

final int com.cartotype.Framework.FUZZY_STRING_MATCH_FLAG = 8
static

A flag for aStringMatchMethod in find() indicating that fuzzy matching should be done.

A constant for aStringMatchMethod in find() indicating a match of the string with the start of the target, ignoring case.

final int com.cartotype.Framework.GRAY = 0xFFAAAAAA
static

The color gray.

final int com.cartotype.Framework.GREEN = 0xFF00FF00
static

The color green.

final int com.cartotype.Framework.HEIGHT_VALID = 16
static

A constant for aValidity in navigate() indicating that the height is valid.

final int com.cartotype.Framework.IGNORE_NON_ALPHANUMERICS_STRING_MATCH_FLAG = 2
static

A flag for aStringMatchMethod in find() indicating that non-alphanumeric characters should be ignored.

final long com.cartotype.Framework.LAST_ROUTE_ID = ROUTE_ID_RESERVED_START + MAX_ROUTES_DISPLAYED - 1
static

A reserved map object ID for the last route.

final int com.cartotype.Framework.MAGENTA = 0xFFFF00FF
static

The color magenta.

final int com.cartotype.Framework.MAX_ROUTES_DISPLAYED = 16
static

The maximum number of different routes which can be calculated using route profiles and displayed simultaneously.

final int com.cartotype.Framework.MAX_WAYPOINTS_DISPLAYED = 1024 * 1024
static

The maximum number of different waypoints which can be displayed; in practice there are unlikely to be more than 100.

final int com.cartotype.Framework.POSITION_VALID = 2
static

A constant for aValidity in navigate() indicating that the position is valid.

final int com.cartotype.Framework.PREFIX_STRING_MATCH_FLAG = 1
static

A flag for aStringMatchMethod in find() indicating a search for all strings starting with the target, ignoring case.

final int com.cartotype.Framework.RED = 0xFF0000FF
static

The color red.

final long com.cartotype.Framework.ROUTE_END_ID = LAST_ROUTE_ID + 2
static

A reserved map object ID for the end of the route.

final long com.cartotype.Framework.ROUTE_ID_RESERVED_END = FIRST_WAYPOINT_ID + MAX_WAYPOINTS_DISPLAYED
static

One more than the last ID reserved for route-related map objects.

final long com.cartotype.Framework.ROUTE_ID_RESERVED_START = 0x40000000
static

The first ID reserved for route-related map objects.

final long com.cartotype.Framework.ROUTE_POSITION_ID = LAST_ROUTE_ID + 3
static

A reserved map object ID for a point object at the current position on the route.

final long com.cartotype.Framework.ROUTE_START_ID = LAST_ROUTE_ID + 1
static

A reserved map object ID for the start of the route.

final long com.cartotype.Framework.ROUTE_VECTOR_ID = LAST_ROUTE_ID + 4
static

A reserved map object ID for a vector object centered on the current position on the route.

final int com.cartotype.Framework.SPEED_VALID = 4
static

A constant for aValidity in navigate() indicating that the speed is valid.

final int com.cartotype.Framework.START_STRING_MATCH_METHOD = PREFIX_STRING_MATCH_FLAG
static

A constant for aStringMatchMethod in find() indicating a match of the string with the start of the target, ignoring case.

final int com.cartotype.Framework.TIME_VALID = 1
static

A constant for aValidity in navigate() indicating that the time is valid.

final int com.cartotype.Framework.TRANSPARENT_BLACK = 0x00000000
static

The 'null color' transparent black.

final int com.cartotype.Framework.WHITE = 0xFFFFFFFF
static

The color white.

final int com.cartotype.Framework.YELLOW = 0xFF00FFFF
static

The color yellow.


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