new IWMapRenderer(map, order)
Parameters:
Name | Type | Description |
---|---|---|
map |
IWMap | the map |
order |
Array | an array of strings defining the order of technologies (optional; the default order is ['svg', 'canvas']) |
Methods
-
clearContainer(doRender)
-
Removes all DOM nodes from container.
Parameters:
Name Type Description doRender
boolean refresh the renderer after removing Returns:
- Type
- void
-
destroy(doRender)
-
Destroys this map renderer. Its contents are no longer rendered in the map.
Parameters:
Name Type Description doRender
boolean refresh the renderer after removing Returns:
- Type
- void
-
drawCircle(center, radius, attributes)
-
Draws a circle with a specified center coordinate and radius in meters.
Parameters:
Name Type Description center
IWCoordinate the center of the circle radius
Number the radius in meters attributes
Object the rendering attributes -
drawComplexPolygon(coords, holes, attributes)
-
Draws a complex polygon defined by the specified coordinates and holes.
Parameters:
Name Type Description coords
Array.<IWCoordinate> the coordinates holes
Array.<Array.<IWCoordinate>> an array of arrays of coordinates describing holes in the polygon attributes
Object the rendering attributes -
drawEllipse(center, size, attributes)
-
Draws an ellipse with a specified center coordinate and with and height in meters.
Parameters:
Name Type Description center
IWCoordinate center of the ellipse size
IWSize the size of the ellipse attributes
Object the rendering attributes -
drawLine(point1, point2, attributes)
-
Draws a line between the specified coordinates.
Parameters:
Name Type Description point1
IWCoordinate first coordinate point2
IWCoordinate second coordinate attributes
Object the rendering attributes -
drawPolygon(coords, attributes)
-
Draws a polygon defined by the specified coordinates.
Parameters:
Name Type Description coords
Array.<IWCoordinate> the coordinates attributes
Object the rendering attributes -
drawPolyline(coords, attributes)
-
Draws a polyline connecting all specified coordinates.
Parameters:
Name Type Description coords
Array.<IWCoordinate> the coordinates attributes
Object the rendering attributes -
drawRectangle(center, size, attributes)
-
Draws a rectangle defined by it's center coordinate and size in meters.
Parameters:
Name Type Description center
IWCoordinate center of the rectangle size
IWSize the size of the rectangle attributes
Object the rendering attributes -
drawRoundedRectangle(center, radius, size, attributes)
-
Draws a rounded rectangle defined by it's center coordinate and size in meters.
Parameters:
Name Type Description center
IWCoordinate center of the rectangle radius
Number the radius of the corners size
IWSize the size of the rectangle attributes
Object the rendering attributes -
drawText(coord, text, attributes)
-
Draws a text on the map.
Parameters:
Name Type Description coord
the coordinate to render the text at text
the text to render attributes
Object the rendering attributes Returns:
IWText -
getElement(position)
-
Get the element on the specific position
Parameters:
Name Type Description position
Number position of the wanted element Returns:
the element, e.g. an instance of IWPolygon- Type
- object
-
moveBehind(otherRenderer)
-
Moves this map renderer behind the specified one, i.e. its content is rendered behind of the content of the specified renderer.
Parameters:
Name Type Description otherRenderer
IWMapRenderer another map renderer Returns:
- Type
- void
-
moveToBack()
-
Moves this map renderer to the back, i.e. its content is rendered on behind the content of other renderers.
Returns:
- Type
- void
-
moveToBottom(element)
-
Moves the element to the bottom by setting it to the first child in the DOM-structure.
Parameters:
Name Type Description element
DOMElement Returns:
- Type
- void
-
moveToFront()
-
Moves this map renderer to the front, i.e. its content is rendered on top of the content of other renderers.
Returns:
- Type
- void
-
moveToTop(element)
-
Moves the element to the top by setting it the to last child in the DOM-structure.
Parameters:
Name Type Description element
DOMElement Returns:
- Type
- void
-
removeElement(element, doRender)
-
Removes a given DOM element from container
Parameters:
Name Type Description element
DOMElement the element to remove doRender
boolean refresh the renderer after removing Returns:
- Type
- void
-
render()
-
Renders the shapes on the map.
Returns:
- Type
- void
-
shiftElement(element, position)
-
Moves an element to specific position
Parameters:
Name Type Description element
Object The vector object position
Number level position where the element shall be shifted to positive values will shift the graphic on the top negative values will shift the graphic on the bottom 'top' shift the graphic on the top 'bottom' shift the graphic on the bottom '0' no changes on the drawing container Returns:
- Type
- void