SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class to help you to suport all kinds of points of interest (POIs) on the map. Adding a set of POIs and creating tooltips and bubbles on mouseover and click events is easy like this:
IWPoiUtils.initFormatters(); // initialize the default POI behaviour
IWPoiUtils.initLayers(map, 'demo'); // add the POIs of the layer "demo" to your map object
Constructor Summary | |
IWPoiUtils()
Singleton constructor |
Method Summary | |
void
|
initFormatters(formatters)
Initializes the POI formatters. This optionally takes an array of formatters, or uses a set of default formatters if not specified. Example: Use an additional custom formatter (with highest priority) like this:
For default behaviour just call IWPoiUtils.initFormatters();
|
void
|
initLayers(map, key, layerGroup, range)
Adds all POI types of a POI catalogue to the map. |
|
makeLayer(map, layerTitle, layerName, shapeName, idfLayerName, range, options)
Creates a layer with default behaviour and register listeners |
Event Summary | |
void
|
poiinitialize(event)
The poiinitialize event is fired when a POI catalogue is initialized. POI selection control etc. Register an event listener with IWEventManager.addListener(IWPoiUtils, 'onpoiinitialize', yourHandlerMethod(event)); to receive this event. |
Constructor Detail |
IWPoiUtils()
Method Detail |
void initFormatters(formatters)
var formatters = [
new IWPublicTransportFormatter(),
new IWRailwayFormatter(),
new IWParkingFormatter(),
new IWTrafficFormatter(),
new IWDefaultPoiFormatter()
];
IWPoiUtils.initFormatters(formatters);
For default behaviour just call IWPoiUtils.initFormatters();
object[] formatters
- an array of formatters
void
void initLayers(map, key, layerGroup, range)
IWMap map
- a map
String key
- the POI catalogue name
IWLayerGroup layerGroup
- a group to add the new layers to (optional, adds the new layers at top level by default)
IWRange range
- a range of zoom levels to display the POIs on (optional, defaults to level 10 to 18)
void
makeLayer(map, layerTitle, layerName, shapeName, idfLayerName, range, options)
map
layerTitle
layerName
shapeName
idfLayerName
range
options
Event Detail |
void poiinitialize(event)
Register an event listener with IWEventManager.addListener(IWPoiUtils, 'onpoiinitialize', yourHandlerMethod(event)); to receive this event.
event
void