CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
Classes | Public Member Functions | List of all members
com.cartotype.MapObject Class Reference
Inheritance diagram for com.cartotype.MapObject:
com.cartotype.Path

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 ()
 

Detailed Description

A map object: a path that also has cartographic attributes such as a name and layer.

Member Function Documentation

◆ area()

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.

◆ bounds()

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).

◆ boundsInDegrees()

native int com.cartotype.MapObject.boundsInDegrees ( Rect  aRect)

Returns the bounding box of a map object in degrees. Returns an error code (0 = success).

◆ center()

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).

◆ centerInDegrees()

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).

◆ contourCount()

native int com.cartotype.MapObject.contourCount ( )

Returns the number of contours (sub-paths).

Implements com.cartotype.Path.

◆ featureInfo()

native FeatureInfo com.cartotype.MapObject.featureInfo ( )

Returns the feature info.

◆ geoCodeSummary()

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.

◆ geometryInDegrees()

native int com.cartotype.MapObject.geometryInDegrees ( Geometry  aGeometry)

Returns the geometry of a map object in degrees. Returns an error code (0 = success).

◆ getAddress()

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.

◆ getAddressFast()

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.

◆ id()

native long com.cartotype.MapObject.id ( )

Returns the ID of the object.

◆ isClosed()

native boolean com.cartotype.MapObject.isClosed ( )

Returns true if the path is closed.

Implements com.cartotype.Path.

◆ label()

native String com.cartotype.MapObject.label ( )

Returns the label or name of the object.

◆ layerName()

native String com.cartotype.MapObject.layerName ( )

Returns the name of the object's layer.

◆ lengthOrPerimeter()

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()

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.

◆ point()

native PathPoint com.cartotype.MapObject.point ( int  aContourIndex,
int  aPointIndex 
)

Returns a point given its contour and point indexes.

Implements com.cartotype.Path.

◆ pointCount()

native int com.cartotype.MapObject.pointCount ( int  aContourIndex)

Returns the number of points in a contour.

Implements com.cartotype.Path.

◆ stringAttribute()

native String com.cartotype.MapObject.stringAttribute ( String  aName)

Returns a string attribute. If aName is null this function is the same as GetLabel.

◆ stringAttributes()

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.

◆ stringAttributesArray()

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.

◆ type()

MapObjectType com.cartotype.MapObject.type ( )

Returns the type of the object: point, line, polygon or array.


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