Class VectorFeature
java.lang.Object
com.codename1.maps.vector.VectorFeature
A single decoded feature of a Mapbox Vector Tile: its geometry type, its
attribute map, and its geometry as one or more parts in tile-local
coordinates (0..VectorLayer.getExtent(), origin top-left).
For GEOM_POINT each part is a flat run of x,y points; for
GEOM_LINESTRING each part is a polyline; for GEOM_POLYGON each part
is a closed ring (exterior rings wind one way, holes the other, per the
MVT spec).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intOne or more polylines.static final intOne or more points.static final intOne or more polygon rings.static final intUnknown / empty geometry. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String key) Convenience accessor for a single attribute, ornull.The feature attributes as aMap<String,Object>(string/number/bool).intOne of theGEOM_*constants.longgetId()The feature id (0 when absent).getParts()The geometry parts, each anint[]of interleavedx,ytile-local coordinates.
-
Field Details
-
GEOM_UNKNOWN
public static final int GEOM_UNKNOWNUnknown / empty geometry.- See Also:
-
GEOM_POINT
public static final int GEOM_POINTOne or more points.- See Also:
-
GEOM_LINESTRING
public static final int GEOM_LINESTRINGOne or more polylines.- See Also:
-
GEOM_POLYGON
public static final int GEOM_POLYGONOne or more polygon rings.- See Also:
-
-
Method Details
-
getId
public long getId()The feature id (0 when absent). -
getGeometryType
public int getGeometryType()One of theGEOM_*constants. -
getAttributes
The feature attributes as aMap<String,Object>(string/number/bool). -
getAttribute
-
getParts
The geometry parts, each anint[]of interleavedx,ytile-local coordinates.
-