CartoType Android API 7.8.2, 2022-03-25
for Java development on Android
|
Classes | |
class | Match |
Public Member Functions | |
native int | getContourCount () |
native int | getPointCount (int aContourIndex) |
native void | getPoint (int aContourIndex, int aPointIndex, PathPoint aPoint) |
native boolean | isClosed () |
native String | getLabel () |
native int | getIntegerAttribute (int aIndex) |
native int | getIntegerAttributeCount () |
native String | getStringAttribute (String aName) |
native String[] | getStringAttributesArray () |
TreeMap< String, String > | getStringAttributes () |
native long | getId () |
MapObjectType | getType () |
native String | getLayerName () |
native double | getArea () |
native double | getLengthOrPerimeter () |
native int | getCenter (PathPoint aPoint) |
native int | getCenterInDegrees (PathPoint aPoint) |
native int | getBoundsInDegrees (Rect aRect) |
native int | getGeometryInDegrees (Geometry aGeometry) |
native int | getBounds (Rect aRect) |
native String | getGeoCodeSummary () |
native int | getAddress (Address aAddress) |
native int | getAddressFast (Address aAddress) |
native int | getMatch (Match aMatch, String aText, int aMatchMethod, String aAttributes, boolean aPhrase) |
int | getContourCount () |
int | getPointCount (int aContourIndex) |
void | getPoint (int aContourIndex, int aPointIndex, PathPoint aPoint) |
boolean | isClosed () |
A map object: a path that also has cartographic attributes such as a name and layer.
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 double com.cartotype.MapObject.getArea | ( | ) |
Gets the area of a map object in square meters. Returns 0 if it is a point or a line.
native int com.cartotype.MapObject.getBounds | ( | Rect | aRect | ) |
Gets the axis-aligned bounds of the map object in map coordinates. Returns an error code (0 = success).
native int com.cartotype.MapObject.getBoundsInDegrees | ( | Rect | aRect | ) |
Gets the bounding box of a map object in degrees. Returns an error code (0 = success).
native int com.cartotype.MapObject.getCenter | ( | PathPoint | aPoint | ) |
Gets 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.getCenterInDegrees | ( | PathPoint | aPoint | ) |
Gets 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.getContourCount | ( | ) |
Gets the number of contours (sub-paths).
Implements com.cartotype.Path.
native String com.cartotype.MapObject.getGeoCodeSummary | ( | ) |
Gets 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.getGeometryInDegrees | ( | Geometry | aGeometry | ) |
Gets the geometry of a map object in degrees. Returns an error code (0 = success).
native long com.cartotype.MapObject.getId | ( | ) |
Gets the ID of the object.
native int com.cartotype.MapObject.getIntegerAttribute | ( | int | aIndex | ) |
Gets the integer attribute selected by aIndex.
native int com.cartotype.MapObject.getIntegerAttributeCount | ( | ) |
Gets the number of integer attributes.
native String com.cartotype.MapObject.getLabel | ( | ) |
Gets the label or name of the object.
native String com.cartotype.MapObject.getLayerName | ( | ) |
Gets the name of the object's layer.
native double com.cartotype.MapObject.getLengthOrPerimeter | ( | ) |
Gets the length or perimeter of a map object in meters. Returns 0 if it is a point.
native int com.cartotype.MapObject.getMatch | ( | Match | aMatch, |
String | aText, | ||
int | aMatchMethod, | ||
String | aAttributes, | ||
boolean | aPhrase | ||
) |
Finds the first string attribute matching aText, using aMatchMethod, and returns information about it in aMatch. 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.
Returns a CartoType error code: 0 = success.
native void com.cartotype.MapObject.getPoint | ( | int | aContourIndex, |
int | aPointIndex, | ||
PathPoint | aPoint | ||
) |
Gets a point given its contour and point indexes.
Implements com.cartotype.Path.
native int com.cartotype.MapObject.getPointCount | ( | int | aContourIndex | ) |
Gets the number of points in a contour.
Implements com.cartotype.Path.
native String com.cartotype.MapObject.getStringAttribute | ( | String | aName | ) |
Gets a string attribute. If aName is null this function is the same as GetLabel.
TreeMap< String, String > com.cartotype.MapObject.getStringAttributes | ( | ) |
Gets 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.getStringAttributesArray | ( | ) |
Gets 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.getType | ( | ) |
Gets the type of the object: point, line, polygon or array.
native boolean com.cartotype.MapObject.isClosed | ( | ) |
Returns true if the path is closed.
Implements com.cartotype.Path.