HERE Android SDK Developer's Guide

StreetLevelIconBase

The class StreetLevelIconBase is a member of com.here.android.mpa.streetlevel .

Class Summary

public abstract class StreetLevelIconBase

extends com.here.android.mpa.streetlevel.StreetLevelObject, com.here.android.mpa.common.ViewObject, java.lang.Object

Represents a base class for all image-based street level objects that users can add to a StreetLevelModel.

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in StreetLevelIconBase
Methods

public PointF getAnchorPoint ()

Gets the array of float values representing the current X-coordinate (horizontal coordinate) and Y-coordinate (vertical coordinate) for the anchor point for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

public Identifier getAttachmentIdentifier ()

Gets the Identifier for the building to which the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard) is attached to.

public PointF getBottomRightTextureCoordinate ()

Gets bottom right texture coordinate.

public StreetLevelIconPlacement getPlacementMode ()

Gets mode for calculating the final display position in of the street level image base object.

public GeoCoordinate getPosition ()

Gets the GeoCoordinate representing the current geographical location of the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

public PointF getTopLeftTextureCoordinate ()

Gets top left texture coordinate.

public float getTransparency ()

Gets the current transparency for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard), a float value between 0 (fully transparent) and 1 (fully opaque).

public void setAnchorPoint (PointF anchor)

Sets an anchor point for the StreetLevelIconBase, for example a StreetLevelIcon or StreetLevelBillboard.

public StreetLevelIconBase setAttachmentIdentifier (Identifier identifier)

Attaches street level icon object to a StreetLevelBuilding with specified Identifier.

public void setImage (Image icon)

Sets an Image for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

public void setPlacementMode (StreetLevelIconPlacement placement)

Sets mode for calculating the final display position of the street level image base object.

public void setPosition (GeoCoordinate coordinate)

Sets a GeoCoordinate representing the position for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

public void setTextureCoordinates (PointF topLeft, PointF bottomRight)

Sets the extent of texture coordinates.

public void setTransparency (float alpha)

Sets a transparency level, within the range of [0..1], for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

Class Details

Represents a base class for all image-based street level objects that users can add to a StreetLevelModel.

This interface serves as a generalization (or abstract base) for several more specific street level object types, bundling their common properties. Users can add the following types of image-based street level objects to a StreetLevelModel:

  • StreetLevelIcon
  • StreetLevelBillboard

Method Details

public PointF getAnchorPoint ()

Gets the array of float values representing the current X-coordinate (horizontal coordinate) and Y-coordinate (vertical coordinate) for the anchor point for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

Returns:

Anchor Point of the icon or null in case the retrieval fails

public Identifier getAttachmentIdentifier ()

Gets the Identifier for the building to which the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard) is attached to.

Returns:

The attached building identifier or null in case icon or billboard is not attached to a building

public PointF getBottomRightTextureCoordinate ()

Gets bottom right texture coordinate.

Returns:

Bottom right texture coordinate or null in case the retrieval fails

public StreetLevelIconPlacement getPlacementMode ()

Gets mode for calculating the final display position in of the street level image base object.

Returns:

The current placement mode

public GeoCoordinate getPosition ()

Gets the GeoCoordinate representing the current geographical location of the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

Returns:

The GeoCoordinate

public PointF getTopLeftTextureCoordinate ()

Gets top left texture coordinate.

Returns:

Top left texture coordinate or null in case the retrieval fails

public float getTransparency ()

Gets the current transparency for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard), a float value between 0 (fully transparent) and 1 (fully opaque).

Returns:

The current transparency

public void setAnchorPoint (PointF anchor)

Sets an anchor point for the StreetLevelIconBase, for example a StreetLevelIcon or StreetLevelBillboard.

An anchor point specifies a point within an icon. When the icon is drawn inside a StreetLevelFragment, the anchor point should coincide with the exact location of the icon.

Parameters:

  • anchor

    The anchor point. Desired horizontal and vertical coordinate for the anchor must be within the range of [0..1]

Throws:

  • NullPointerException

    Passed argument is null

public StreetLevelIconBase setAttachmentIdentifier (Identifier identifier)

Attaches street level icon object to a StreetLevelBuilding with specified Identifier.

Use null value to remove current attachment.

Parameters:

  • identifier

    Desired Identifier for the icon or billboard

Throws:

  • NumberFormatException

    Passed argument is of incorrect format

  • NullPointerException

    Passed argument is null

public void setImage (Image icon)

Sets an Image for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

Parameters:

  • icon

    Desired Image for the icon or billboard

Throws:

  • IllegalArgumentException

    Passed argument is invalid

  • NullPointerException

    Passed argument is null

See also:

setAnchorPoint(PointF)

public void setPlacementMode (StreetLevelIconPlacement placement)

Sets mode for calculating the final display position of the street level image base object.

Parameters:

public void setPosition (GeoCoordinate coordinate)

Sets a GeoCoordinate representing the position for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard).

Parameters:

  • coordinate

    Desired GeoCoordinate position for the icon or billboard

Throws:

  • IllegalArgumentException

    Passed argument is invalid

  • NullPointerException

    Passed argument is null

public void setTextureCoordinates (PointF topLeft, PointF bottomRight)

Sets the extent of texture coordinates.

Parameters:

  • topLeft

    Top left texture coordinate, default (0, 0).

  • bottomRight

    Bottom right texture coordinate, default (1, 1).

public void setTransparency (float alpha)

Sets a transparency level, within the range of [0..1], for the StreetLevelIconBase ( StreetLevelIcon or StreetLevelBillboard). The final opacity is a combination of the value specified here and the value specified in setOverlayTransparency(float).

Parameters:

  • alpha

    Desired alpha value for the StreetLevelIconBase, 0 for fully transparent, 1 for fully opaque (the default value is 1)

Throws:

  • IllegalArgumentException

    Passed argument is not within the range of [0..1].

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.