HERE Android SDK Developer's Guide

MapContainer

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

Class Summary

public final class MapContainer

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

Represents a container that determines the stacking order of objects on a Map.

[For complete information, see the section Class Details]

See also:

setVisible(boolean)

setVisibleMask(int)

setVisibleMask(int, int)

Constructor Summary

Table 1. Constructors in MapContainer
Constructors

MapContainer ()

Creates an empty MapContainer .

Method Summary

Table 2. Methods in MapContainer
Methods

public boolean addMapObject (MapObject object)

Adds a MapObject to this MapContainer .

public java.util.List <MapObject> getAllMapObjects ()

Returns the list of all MapObject objects within this MapContainer.

public boolean removeAllMapObjects ()

Removes all MapObject objects currently within this MapContainer.

public boolean removeMapObject (MapObject object)

Removes the specified MapObject from this MapContainer.

Class Details

Represents a container that determines the stacking order of objects on a Map. Applications can add certain types of MapObject objects into a MapContainer. For more details, refer to addMapObject(MapObject).

You can use MapContainer.setVisible(boolean) to control whether the objects in the container are visible. If MapContainer.setVisible(true) , then the visibility settings of each map object in the container are used.

Unlike other map objects, MapContainer does not support the use of visibility masks, so you cannot set container visibility on a zoom level basis.

See also:

setVisible(boolean)

setVisibleMask(int)

setVisibleMask(int, int)

Constructor Details

MapContainer ()

Creates an empty MapContainer .

Method Details

public boolean addMapObject (MapObject object)

Adds a MapObject to this MapContainer . Only the following types of MapObject can be added:

For a complete enumeration of available MapObject types, refer to MapObject.Type.

Parameters:

Returns:

True if the MapObject was added successfully to this MapContainer, false otherwise

See also:

removeMapObject(MapObject)

public java.util.List <MapObject> getAllMapObjects ()

Returns the list of all MapObject objects within this MapContainer. Modifications to objects returned from the array are not guaranteed to be reflected properly in the MapContainer. Use addMapObject(MapObject) and removeMapObject(MapObject) to modify individual array elements.

Note: the order of the MapObjects returned in the List is arbitrary. There is no guarantee the list is sorted in the order the MapObjects were added to the MapContainer.

Returns:

A list containing all MapObject objects within the MapContainer. If the MapContainer contains no map object, an empty array will be returned.

public boolean removeAllMapObjects ()

Removes all MapObject objects currently within this MapContainer.

Returns:

True if all MapObject objects were removed successfully from this MapContainer, false otherwise

See also:

removeMapObject(MapObject)

public boolean removeMapObject (MapObject object)

Removes the specified MapObject from this MapContainer. If the specified MapObject is not contained within the MapContainer, the container will be unchanged.

Parameters:

Returns:

True if the MapObject was removed successfully from this MapContainer , false otherwise

See also:

removeAllMapObjects()

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.