HERE Android SDK Developer's Guide

HistoricalTrafficRasterTileSource

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

Class Summary

public final class HistoricalTrafficRasterTileSource

extends com.here.android.mpa.mapping.UrlMapRasterTileSourceBase, com.here.android.mpa.mapping.MapRasterTileSource, java.lang.Object

This class displays a street map tile overlay showing the typical traffic pattern for a specific time point during the week.

[For complete information, see the section Class Details]

See also:

addRasterTileSource(MapRasterTileSource)

removeRasterTileSource(MapRasterTileSource)

Constructor Summary

Table 1. Constructors in HistoricalTrafficRasterTileSource
Constructors

HistoricalTrafficRasterTileSource (int dayOfWeek, int hourOfDay)

Public constructor to instantiate a raster tile that displays history traffic for the time requested.

HistoricalTrafficRasterTileSource (int dayOfWeek, int hourOfDay, int minOfHour)

Public constructor to instantiate a raster tile that displays history traffic for the time requested.

Method Summary

Table 2. Methods in HistoricalTrafficRasterTileSource
Methods

public String getUrl (int x, int y, int zoomLevel)

Gets the URL representing the source of the specified raster tile image.

This method overrides mapping.UrlMapRasterTileSourceBase.getUrl(int, int, int)

Class Details

This class displays a street map tile overlay showing the typical traffic pattern for a specific time point during the week.

See also:

addRasterTileSource(MapRasterTileSource)

removeRasterTileSource(MapRasterTileSource)

Constructor Details

HistoricalTrafficRasterTileSource (int dayOfWeek, int hourOfDay)

Public constructor to instantiate a raster tile that displays history traffic for the time requested.

The time specified is local to the location requesting the historic traffic. For example, regardless of what the device's locale setting is, where the device's current location, nor what is the current time, if the target area for the historic traffic request is for Berlin, Germany at 3:00pm Monday, then the hourOfDay used should be 15 and the dayOfWeek should be Calendar.Monday .

Parameters:

  • dayOfWeek

    One of the values defined in Calendar class, to be used when setting Calendar.DAY_OF_WEEK. eg. Calendar.MONDAY.

  • hourOfDay

    An int representing the hour to request historic traffic at. It uses the 24-hour clock format. E.g., at 07:00 PM, use 19.

Throws:

  • IllegalArgumentException

    If requested time's dayOfWeek is invalid.

  • IllegalArgumentException

    If requested time's hourOfDay is invalid.

  • AccessControlException

    Access to this operation is denied. Contact your HERE representative for more information.

HistoricalTrafficRasterTileSource (int dayOfWeek, int hourOfDay, int minOfHour)

Public constructor to instantiate a raster tile that displays history traffic for the time requested.

The time specified is local to the location requesting the historic traffic. For example, regardless of what the device's locale setting is, where the device's current location, nor what is the current time, if the target area for the historic traffic request is for Berlin, Germany at 3:30pm Monday, then the hourOfDay used should be 15 , minOfHour used should be 30 , and the dayOfWeek should be Calendar.Monday .

Parameters:

  • dayOfWeek

    One of the values defined in Calendar class, to be used when setting Calendar.DAY_OF_WEEK. eg. Calendar.MONDAY.

  • hourOfDay

    An int representing the hour to request historic traffic at. It uses the 24-hour clock format. E.g., at 07:04 PM, use 19.

  • minOfHour

    An int indicating the minute within the hour to request historic traffic. E.g., at 07:04 PM use 4.

Throws:

  • IllegalArgumentException

    If requested time's dayOfWeek is invalid.

  • IllegalArgumentException

    If requested time's hourOfDay is invalid.

  • IllegalArgumentException

    If requested time's minOfHour is invalid.

  • AccessControlException

    Access to this operation is denied. Contact your HERE representative for more information.

Method Details

public String getUrl (int x, int y, int zoomLevel)

Gets the URL representing the source of the specified raster tile image.

Note: implementations of raster tile sources must override this method to provide a complete URL string pointing to the raster tile image.

This method overrides mapping.UrlMapRasterTileSourceBase.getUrl(int, int, int)

Parameters:

  • x
  • y
  • zoomLevel