Interface PolygonMapObject

com.yandex.mapkit.map

public interface PolygonMapObject extends MapObject

All Superinterfaces:
MapObject

A polygon displayed on the map.

Methods

int getFillColor()

Sets the fill color.

Polygon getGeometry()
int getStrokeColor()

Sets the stroke color.

float getStrokeWidth()

Sets the stroke width in units.

boolean isGeodesic()

The object geometry can be interpreted in two different ways: 1) If the object mode is 'geodesic', the object geometry is defined on a sphere.

void resetAnimatedImage()

Removes animated pattern.

void setAnimatedImage(@NonNull AnimatedImageProvider animatedImage, float patternWidth, @NonNull PatternRepeatMode repeatMode)

Sets animated pattern with provided repeat mode to fill polygon.

void setFillColor(int fillColor)
void setGeodesic(boolean geodesic)
void setGeometry(@NonNull Polygon geometry)
void setStrokeColor(int strokeColor)
void setStrokeWidth(float strokeWidth)

Method Detail

getFillColor

public int getFillColor ()

Sets the fill color.

Default: hexademical RGBA code 0x0066FF99.

getGeometry

public Polygon getGeometry ()

getStrokeColor

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

getStrokeWidth

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

isGeodesic

public boolean isGeodesic ()

The object geometry can be interpreted in two different ways: 1) If the object mode is 'geodesic', the object geometry is defined on a sphere.

2) Otherwise, the object geometry is defined in projected space. Default: false.

resetAnimatedImage

public void resetAnimatedImage ()

Removes animated pattern.

setAnimatedImage

public void setAnimatedImage (@NonNull AnimatedImageProvider animatedImage, float patternWidth, @NonNull PatternRepeatMode repeatMode)

Sets animated pattern with provided repeat mode to fill polygon.

Pattern will be scaled to fit provided pattern width. Note that original linear sizes of pattern should be equal to power of 2.

setFillColor

public void setFillColor (int fillColor)

setGeodesic

public void setGeodesic (boolean geodesic)

setGeometry

public void setGeometry (@NonNull Polygon geometry)

setStrokeColor

public void setStrokeColor (int strokeColor)

setStrokeWidth

public void setStrokeWidth (float strokeWidth)