Interface PolygonMapObject
Package world.mappable.mapkit.map
All Superinterfaces:
interface PolygonMapObject extends MapObject
A polygon displayed on the map.
Summary
Methods
|
Type and modifiers |
Method and Description |
|
void |
setGeometry(@NonNull Polygon geometry) |
|
int |
getStrokeColor() |
|
void |
setStrokeColor(int strokeColor) |
|
float |
getStrokeWidth() |
|
void |
setStrokeWidth(float strokeWidth) |
|
int |
getFillColor() |
|
void |
setFillColor(int fillColor) |
|
boolean |
isGeodesic()
|
|
void |
setGeodesic(boolean geodesic) |
|
void |
setPattern(@NonNull AnimatedImageProvider animatedImage, |
|
void |
setPattern(@NonNull ImageProvider image, |
|
void |
resetPattern() |
Methods
getGeometry
|
@NonNull |
setGeometry
|
void setGeometry(@NonNull Polygon geometry) |
getStrokeColor
|
int getStrokeColor() |
Sets the stroke color.
Default: hexademical RGBA code 0x0066FFFF. Setting the stroke color to any transparent color (for example, RGBA code 0x00000000) effectively disables the stroke.
setStrokeColor
|
void setStrokeColor(int strokeColor) |
getStrokeWidth
|
float getStrokeWidth() |
Sets the stroke width in units.
Default: 5. The size of a unit is equal to the size of a pixel at the current zoom when the camera position's tilt is equal to 0 and the scale factor is equal to 1.
setStrokeWidth
|
void setStrokeWidth(float strokeWidth) |
getFillColor
|
int getFillColor() |
Sets the fill color.
Default: hexademical RGBA code 0x0066FF99.
Note
Fill color is ignored if a pattern is set.
setFillColor
|
void setFillColor(int fillColor) |
isGeodesic
|
boolean isGeodesic() |
The object geometry can be interpreted in two different ways:
- If the object mode is 'geodesic', the object geometry is defined on a sphere.
- Otherwise, the object geometry is defined in projected space.
setGeodesic
|
void setGeodesic(boolean geodesic) |
setPattern
|
void setPattern(@NonNull AnimatedImageProvider animatedImage, |
Sets pattern to fill polygon.
@attention Original linear sizes of pattern should be equal to power of 2. @attention Fill color is ignored if a pattern is set.
setPattern
|
void setPattern(@NonNull ImageProvider image, |
Sets pattern to fill polygon.
@attention Original linear sizes of pattern should be equal to power of 2. @attention Fill color is ignored if pattern is set.
resetPattern
|
void resetPattern() |
Removes pattern.