TagService

Package: com.eegeo.mapapi.services.tag

A service which allows you to resolve PoiSearchResult.tags to matching icons and descriptions. The search tag data is defined in https://github.com/wrld3d/wrld-icon-tools/blob/master/data/search_tags.json, and this Service will load and internally process that manifest to create a table that lets you resolve tags to icons and descriptors.

Methods

void loadTags(OnTagsLoadCompletedListener listener)

Notify the API to load the Search Tags data. Until this completes, most methods on this service will just return defaults. You’ll be notified when the load completes via the OnTagsLoadCompletedListener, after which time you can start calling the other methods to resolve Tags

Type argument Description
OnTagsLoadCompletedListener listener an optional listener that will be called when the load is completed

Boolean hasLoadedTags()

Have we successfully finished loading the Search Tags data?

Returns: true on successful load of Search Tags data. This should be true after a successful call to the OnTagsLoadCompletedListener

Promise<String> getIconKeyForTags(String tags)

Resolve a set of tags from a Poi result to an Icon Key. Icon Keys can then be used by the Markers API or used to resolve an Icon Image URL.

Returns: a Promise of a resolved Icon Key

Type argument Description
String tags the set of tags i.e. from a PoiSearchResult.tags to find a matching icon for

Promise<String> getIconUrlForTags(String tags)

Resolve a set of tags from a Poi result to an Icon Image URL.

Returns: a Promise of a url matching the resolved Icon Key for an image

Type argument Description
String tags the set of tags i.e. from a PoiSearchResult.tags to find a matching icon for

Promise<String> getIconUrlForIconKey(String iconKey)

Resolve an Icon Key to an Icon Image URL directly.

Returns: a Promise of a URL matching the resolved Icon Key for an image

Type argument Description
String iconKey the Icon Key to find a matching Icon Image URL for.

Promise<String> getReadableTagsForTags(String tags)

Resolve a set of tags to a collection of Human Readable tag descriptions. i.e. “sports” converts to “Sports and Leisure”.

Returns: a Promise of a set of human readable descriptions in a String array, matching the input order.

Type argument Description
String tags the set of tags i.e. from a PoiSearchResult.tags to find matching tag descriptions for.
v0.0.1467
Overview Introduction
Picking PickResult
Widgets (Optional) BlueSphere
Tag Service (Optional) TagService OnTagsLoadCompletedListener
RouteView Widget (Optional) RouteView RouteViewOptions