HERE Android SDK Developer's Guide

mapping

The package mapping is a member of com.here.android.mpa.

Package Summary

mapping

The mapping package provides classes, interfaces, and enumerations that display an interactive map, and related functionality that allows your application to create and add map content.

Package Details

The mapping package provides classes, interfaces, and enumerations that display an interactive map, and related functionality that allows your application to create and add map content.

Some key classes and interfaces in this package are:

  • Map
  • MapGesture
  • MapFragment
  • MapObject
  • MapTransitLayer

Map

The Map interface represents the interactive map itself.

Map schemes (e.g. Satellite, Terrain, etc.) can be changed as follows:


  map.setMapScheme ( Map.Scheme.NORMAL_DAY );
  

Refer to the Map.Scheme class for a description of supported schemes.

A Map can contain visual objects, which are instantiated from the children of the MapObject class, such as:

  • MapCircle
  • MapMarker
  • MapPolygon
  • MapPolyline
  • MapRoute

A polygon, for example, can be drawn on the map as follows:


  ...
  MapPolygon polygon = new MapPolygon();
  map.addMapObject( polygon );
  

Notice that the parent map object class, MapContainer , does not itself represent a visual object. A MapContainer determines the stacking order (z-index ordering) of objects on a map.

MapObjects and z-index ordering

The z-index of a MapObject specifies its stacking order within a Map. In general, an object with a higher z-index appears closer to the viewer than an object with a lower z-index.

The stack order of a Map is defined hierarchically, according to the following specifications:

  • The MapObject with the highest z-index is drawn on top of any other instances of MapObject.
  • Within a MapContainer, the MapObject with highest z-index is drawn on top of any other instances of MapObject.

Colors

Color values in this package are defined in terms of ARGB integer values, where the 24 least significant bits define red, green, and blue components while the eight most significant bits define the alpha value (0xAARRGGBB) of opacity, for which 0xFFRRGGBB is fully opaque and 0x00RRGGBB is fully transparent.

Note: if the target platform does not support transparency, the alpha value is ignored and the color is displayed as fully opaque.