HERE Android SDK Developer's Guide

MapPolyline

The class MapPolyline is a member of com.here.android.mpa.mapping .

Class Summary

public final class MapPolyline

extends com.here.android.mpa.mapping.MapObject, com.here.android.mpa.common.ViewObject, java.lang.Object

A graphical representation of a GeoPolyline that can be rendered on a map.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in MapPolyline
Constructors

MapPolyline (GeoPolyline polyline)

Creates a MapPolyline , which is a MapObject in the shape of a polyline.

Method Summary

Table 2. Methods in MapPolyline
Methods

public int getLineColor ()

Gets the current line color for this MapPolyline , returning an ARGB (Alpha/Red/Green/Blue) integer color value.

public int getLineWidth ()

Returns the current line width for this MapPolyline , in pixels.

public Type getType ()

public MapPolyline setLineColor (int color)

Sets a line color for this MapPolyline , using an ARGB (Alpha/Red/Green/Blue) integer color value.

public MapPolyline setLineWidth (int width)

Sets a line width, in pixels, for this MapPolyline , an int value within the [0..100] range.

Class Details

A graphical representation of a GeoPolyline that can be rendered on a map. A MapPolyline has multiple points that combine to create its path.

Constructor Details

MapPolyline (GeoPolyline polyline)

Creates a MapPolyline , which is a MapObject in the shape of a polyline.

Parameters:

  • polyline

    GeoPolyline to construct the MapPolyline.

Method Details

public int getLineColor ()

Gets the current line color for this MapPolyline , returning an ARGB (Alpha/Red/Green/Blue) integer color value.

Returns:

The current ARGB integer color value. The packed integer is made up of 4 bytes: alpha, red, green, blue. Each color component has a value range from [0..255], with 0 meaning no contribution for that component and 255 meaning 100% contribution

See also:

android.graphics.Color

public int getLineWidth ()

Returns the current line width for this MapPolyline , in pixels.

Returns:

The current line width for this MapPolyline

public Type getType ()

public MapPolyline setLineColor (int color)

Sets a line color for this MapPolyline , using an ARGB (Alpha/Red/Green/Blue) integer color value. The default line color is Color.BLUE .

Parameters:

  • color

    The ARGB integer color value. The packed integer is made up of 4 bytes: alpha, red, green, blue. Each color component has a value range from [0..255] with 0 meaning no contribution for that component, and 255 meaning 100% contribution

Returns:

The updated MapPolyline itself.

See also:

android.graphics.Color

public MapPolyline setLineWidth (int width)

Sets a line width, in pixels, for this MapPolyline , an int value within the [0..100] range. By default, the line width is 1.

Parameters:

  • width

    Desired width of the line defining the MapPolyline

Returns:

The updated MapPolyline itself.

Throws:

  • IllegalArgumentException

    If width is out of range.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.