Class: IWMapOptions

IWMapOptions

A class representing a set of initialization options for the map.

new IWMapOptions(map)

Creates a new options object.
Parameters:
Name Type Description
map IWMap the map

Members


<static> CONTROL_MOVE :number

Enables map movement.
Type:
  • number

<static> CONTROL_NONE :number

Disables map control.
Type:
  • number

<static> CONTROL_ZOOM :number

Enables map zooming.
Type:
  • number

<static> VECTOR_TILES_DYNAMIC_PROFILE :string

The name of the dynamic config (that allows users to choose the map release on the fly)
Type:
  • string

Methods


clone()

Returns a new instance of this object.
Returns:
Type
IWMapOptions

getApplicationCopyright()

Returns a application specific copyright notice which extends the copyright of the currently used map type.
Returns:
Type
String

getArrowKeyAction()

Returns the map action which is bound to the arrow keys.
Returns:
Type
number

getBorderTiles()

Returns the number of border tiles which are placed outside of the visible map area. The default value is 1.
Returns:
the number of border tiles.
Type
number

getDoubleClickAction()

Returns the map action which is bound to double clicks.
Returns:
Type
number

getLanguage()

Returns the ISO 639-1 code of the language used by the map and related classes.
Returns:
Type
String

getLeftMouseAction()

Returns the map action which is bound to the left mouse button.
Returns:
Type
number

getMapTypeByName()

Returns a map type by its name.
Returns:
Type
IWMapType

getMapTypes()

Returns an array with all map types available for this map.
Returns:
Type
Array.<IWMapType>

getMaxWheelStep()

Returns the maximum zoom layers the mouse wheel can zoom at once.
Returns:
an integer

getMouseWheelAction()

Returns the map action which is bound to the mouse wheel.
Returns:
Type
number

getPlusMinusKeyAction()

Returns the map action which is bound to the plus and minus keys.
Returns:
Type
number

getProvider()

Gets the map data provider for the map instance (e.g. tomtom or here)
Returns:
Type
string

getRightMouseAction()

Returns the map action which is bound to the right mouse button.
Returns:
Type
number

getSize()

Returns the current size of the map in pixel.
Returns:
the map size in pixel
Type
IWSize

getSizeInUnit()

Returns the current size of the map.
Deprecated:
  • Deprecated, define map size in pixels.
Returns:
Object.size: IWSize, Object.unit: String
Type
Object

setAccentColor(color)

Sets the accent color of the map which is used for controls and markers.
Parameters:
Name Type Description
color string an CSS color definition like orange or #00ff00
Returns:
Type
void

setApplicationCopyright(applicationCopyright)

Sets a copyright notice which is appended to the copyright of the currently used map type.
Parameters:
Name Type Description
applicationCopyright String the copyright string
Returns:
Type
void

setArrowKeyAction(action)

Sets the action for the arrow keys. The default value is set to IWMapOptions.CONTROL_MOVE. You can disable this feature by setting the value of this attribute to IWMapOptions.CONTROL_NONE.
Parameters:
Name Type Description
action number the new map action
Returns:
Type
void

setAutoResize(autoResize, container)

If auto resize is turned on, the map is fit to the window or container every time the window is resized. If parameter container is defined, the map is fit to this container. This container must have a width and height (i.e. computedStyle)! If parameter container is not defined, the map is fit to the window.
Parameters:
Name Type Description
autoResize
container

setBorderTiles(tiles)

Sets the number of border tiles which are placed outside of the visible map area. The default value is 1.
Parameters:
Name Type Description
tiles number the number of border tiles.
Returns:
Type
void

setDoubleClickAction(action)

Sets the action for a double click on the right mouse button. The default value is set to IWMapOptions.CONTROL_ZOOM. You can disable this feature by setting the value of this attribute to IWMapOptions.CONTROL_NONE.
Parameters:
Name Type Description
action number the new map action
Returns:
Type
void

setLanguage(language)

Sets the language used by the map and related classes. The default value is english (en). Register an onlanguagechange event listener to receive the IWLanguageChangeEvent.
Parameters:
Name Type Description
language String the ISO 639-1 code of the language, e.g. en, de, fr
Returns:
Type
void

setLeftMouseAction(action)

Sets the action for the left mouse button. The default value is set to IWMapOptions.CONTROL_MOVE. Other possible values are IWMapOptions.CONTROL_NONE and IWMapOptions.CONTROL_ZOOM.
Parameters:
Name Type Description
action number the new map action
Returns:
Type
void

setMapTypes(types)

Sets the available map types of a map. Register an onmaptypeschange event listener to receive the IWMapTypesChangeEvent.
Parameters:
Name Type Description
types Array.<IWMapType> an array with all desired map types
Returns:
Type
void

setMaxWheelStep()

Limits the wheel zoom to zoom only step zoom layers. Default is no limit that means step = Number.MAX_VALUE. step = 2 is a good limit.

setMouseWheelAction(action)

Sets the action for the mouse wheel. The default value is set to IWMapOptions.CONTROL_ZOOM. If you want to disable this feature, then you have to set this attribute to IWMapOptions.CONTROL_NONE.
Parameters:
Name Type Description
action number the new map action
Returns:
Type
void

setOptionsForStaticMap()

Sets all options to IWMapOptions.CONTROL_NONE

setPlusMinusKeyAction(action)

Sets the action for the plus and minus key. The default value is set to IWMapOptions.CONTROL_ZOOM. You can disable this feature by setting the value of this attribute to IWMapOptions.CONTROL_NONE.
Parameters:
Name Type Description
action number the new map action
Returns:
Type
void

setProvider(provider)

Sets the map data provider for the map instance (e.g. tomtom or here)
Parameters:
Name Type Description
provider

setRightMouseAction(action)

Sets the action for the right mouse button. The default value is set to IWMapOptions.CONTROL_ZOOM. Other possible values are IWMapOptions.CONTROL_NONE and IWMapOptions.CONTROL_MOVE.
Parameters:
Name Type Description
action number the new map action
Returns:
Type
void

setSize(size)

Resizes the map to the specified size.
Parameters:
Name Type Description
size IWSize the new size of the map
Returns:
Type
void