Class: IWRouteFormatter

IWRouteFormatter

A class to create description texts from a routing server response

This class is part of the module routing.


new IWRouteFormatter(map, route, options)

Creates a new formatter
Parameters:
Name Type Description
map IWMap
route IWRoute
options Object

Methods


cleanMap()

Interface to clean the map of any elements this formatter might have created
Returns:
Type
void

cleanMap()

Interface to clean the map of any elements this formatter might have created
Returns:
Type
void

cleanMap()

Interface to clean the map of any elements this formatter might have created
Returns:
Type
void

createDistanceAsHTML(index)

Returns the distance.
Parameters:
Name Type Description
index number
Returns:
Type
String

createDistanceAsHTML(index)

Returns the distance.
Parameters:
Name Type Description
index number
Returns:
Type
String

createImageAsHTML()

Returns the html image tag for the route entry.
Returns:
Type
String

createImageAsHTML()

Returns the html image tag for the route entry.
Returns:
Type
String

createImageAsSVG()

Creates an SVG image representation of the route entry
Returns:
Type
Element

createImageAsSVG()

Creates an SVG image representation of the route entry
Returns:
Type
Element

createRouteDescriptionAsHTML()

Iterates through all the segments and creates the full route description as an HTML string
Returns:
the full route description as HTML
Type
Element

createRouteDescriptionAsHTML()

Iterates through all the segments and creates the full route description as an HTML string
Returns:
the full route description as HTML
Type
Element

createSegmentDescriptionAsHTML(index)

Returns the driving direction for the specified index.
Parameters:
Name Type Description
index number
Returns:
Type
String

createSegmentDescriptionAsHTML(index)

Returns the driving direction for the specified index.
Parameters:
Name Type Description
index number
Returns:
Type
String

setRoutingSpriteUrl(routingSpriteUrl)

Sets the url of the sprite for the routing description icons.
Parameters:
Name Type Description
routingSpriteUrl String
Deprecated:
  • use CSS to overwrite symbols

setRoutingSpriteUrl(routingSpriteUrl)

Sets the url of the sprite for the routing description icons.
Parameters:
Name Type Description
routingSpriteUrl String
Deprecated:
  • use CSS to overwrite symbols

Class: IWRouteFormatter

IWRouteFormatter

A class to create description texts from a routing server response

This class is part of the module routing.


new IWRouteFormatter(map, route, options)

Creates a new formatter
Parameters:
Name Type Description
map IWMap
route IWRoute
options Object

Methods


cleanMap()

Interface to clean the map of any elements this formatter might have created
Returns:
Type
void

cleanMap()

Interface to clean the map of any elements this formatter might have created
Returns:
Type
void

cleanMap()

Interface to clean the map of any elements this formatter might have created
Returns:
Type
void

createDistanceAsHTML(index)

Returns the distance.
Parameters:
Name Type Description
index number
Returns:
Type
String

createDistanceAsHTML(index)

Returns the distance.
Parameters:
Name Type Description
index number
Returns:
Type
String

createImageAsHTML()

Returns the html image tag for the route entry.
Returns:
Type
String

createImageAsHTML()

Returns the html image tag for the route entry.
Returns:
Type
String

createImageAsSVG()

Creates an SVG image representation of the route entry
Returns:
Type
Element

createImageAsSVG()

Creates an SVG image representation of the route entry
Returns:
Type
Element

createRouteDescriptionAsHTML()

Iterates through all the segments and creates the full route description as an HTML string
Returns:
the full route description as HTML
Type
Element

createRouteDescriptionAsHTML()

Iterates through all the segments and creates the full route description as an HTML string
Returns:
the full route description as HTML
Type
Element

createSegmentDescriptionAsHTML(index)

Returns the driving direction for the specified index.
Parameters:
Name Type Description
index number
Returns:
Type
String

createSegmentDescriptionAsHTML(index)

Returns the driving direction for the specified index.
Parameters:
Name Type Description
index number
Returns:
Type
String

setRoutingSpriteUrl(routingSpriteUrl)

Sets the url of the sprite for the routing description icons.
Parameters:
Name Type Description
routingSpriteUrl String
Deprecated:
  • use CSS to overwrite symbols

setRoutingSpriteUrl(routingSpriteUrl)

Sets the url of the sprite for the routing description icons.
Parameters:
Name Type Description
routingSpriteUrl String
Deprecated:
  • use CSS to overwrite symbols