CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
|
Classes | |
class | Match |
Public Member Functions | |
native int | contourCount () |
native int | pointCount (int aContourIndex) |
native PathPoint | point (int aContourIndex, int aPointIndex) |
native boolean | isClosed () |
native String | label () |
native FeatureInfo | featureInfo () |
native String | stringAttribute (String aName) |
native String[] | stringAttributesArray () |
TreeMap< String, String > | stringAttributes () |
native long | id () |
MapObjectType | type () |
native String | layerName () |
native double | area () |
native double | lengthOrPerimeter () |
native int | center (PathPoint aPoint) |
native int | centerInDegrees (PathPoint aPoint) |
native int | boundsInDegrees (Rect aRect) |
native int | geometryInDegrees (Geometry aGeometry) |
native int | bounds (Rect aRect) |
native String | geoCodeSummary () |
native int | getAddress (Address aAddress) |
native int | getAddressFast (Address aAddress) |
Match | match (String aText, int aMatchMethod, String aAttributes, boolean aPhrase) |
int | contourCount () |
int | pointCount (int aContourIndex) |
PathPoint | point (int aContourIndex, int aPointIndex) |
boolean | isClosed () |
A map object: a path that also has cartographic attributes such as a name and layer.
native double com.cartotype.MapObject.area | ( | ) |
Returns the area of a map object in square meters. Returns 0 if it is a point or a line.
native int com.cartotype.MapObject.bounds | ( | Rect | aRect | ) |
Returns the axis-aligned bounds of the map object in map coordinates. Returns an error code (0 = success).
native int com.cartotype.MapObject.boundsInDegrees | ( | Rect | aRect | ) |
Returns the bounding box of a map object in degrees. Returns an error code (0 = success).
native int com.cartotype.MapObject.center | ( | PathPoint | aPoint | ) |
Returns the center of a map object in map coordinates. The center is defined as the center of gravity for polygons and arrays, a point half way along the path for lines, and the point itself for points. Returns an error code (0 = success).
native int com.cartotype.MapObject.centerInDegrees | ( | PathPoint | aPoint | ) |
Returns the center of a map object in degrees. The center is defined as the center of gravity for polygons and arrays, a point half way along the path for lines, and the point itself for points. Because the center is calculated using map coordinates then converted to degrees, it depends on the map projection used by the map object. Returns an error code (0 = success).
native int com.cartotype.MapObject.contourCount | ( | ) |
Returns the number of contours (sub-paths).
Implements com.cartotype.Path.
native FeatureInfo com.cartotype.MapObject.featureInfo | ( | ) |
Returns the feature info.
native String com.cartotype.MapObject.geoCodeSummary | ( | ) |
Returns a string summarizing a geocode for a map object. 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.
native int com.cartotype.MapObject.geometryInDegrees | ( | Geometry | aGeometry | ) |
Returns the geometry of a map object in degrees. Returns an error code (0 = success).
native int com.cartotype.MapObject.getAddress | ( | Address | aAddress | ) |
Creates an address for a map object. Calls to this function are limited in number in unlicensed (evaluation) versions of the CartoType library. Returns a CartoType error code: 0 = success.
native int com.cartotype.MapObject.getAddressFast | ( | Address | aAddress | ) |
Creates an address for a map object, using attributes of the object only. Returns a CartoType error code: 0 = success. Returns Error.NOT_FOUND if the relevant address parts were not found.
native long com.cartotype.MapObject.id | ( | ) |
Returns the ID of the object.
native boolean com.cartotype.MapObject.isClosed | ( | ) |
Returns true if the path is closed.
Implements com.cartotype.Path.
native String com.cartotype.MapObject.label | ( | ) |
Returns the label or name of the object.
native String com.cartotype.MapObject.layerName | ( | ) |
Returns the name of the object's layer.
native double com.cartotype.MapObject.lengthOrPerimeter | ( | ) |
Returns the length or perimeter of a map object in meters. Returns 0 if it is a point.
Match com.cartotype.MapObject.match | ( | String | aText, |
int | aMatchMethod, | ||
String | aAttributes, | ||
boolean | aPhrase | ||
) |
Finds the first string attribute matching aText, using aMatchMethod, and returns information about it. aMatchMethod uses the constants Framework.EXACT_STRING_MATCH_METHOD, etc. If aAttributes is non-null this function examines only attributes in the supplied comma-separated list, otherwise it examines all attributes except those starting with an underscore, which by convention are non-textual. Attribute names may contain the wild cards ? and *. If aPhrase is true, matches of phrases within the attribute are allowed.
native PathPoint com.cartotype.MapObject.point | ( | int | aContourIndex, |
int | aPointIndex | ||
) |
Returns a point given its contour and point indexes.
Implements com.cartotype.Path.
native int com.cartotype.MapObject.pointCount | ( | int | aContourIndex | ) |
Returns the number of points in a contour.
Implements com.cartotype.Path.
native String com.cartotype.MapObject.stringAttribute | ( | String | aName | ) |
Returns a string attribute. If aName is null this function is the same as GetLabel.
TreeMap< String, String > com.cartotype.MapObject.stringAttributes | ( | ) |
Returns the string attributes as an ordered map of key-value pairs. The first attribute if any has an empty key and is the label.
native String[] com.cartotype.MapObject.stringAttributesArray | ( | ) |
Returns all the string attributes as an array of key-value pairs. The first attribute if any has an empty key and is the label.
MapObjectType com.cartotype.MapObject.type | ( | ) |
Returns the type of the object: point, line, polygon or array.