Class IWMapRenderer

A renderer to draw vector graphics like line, polygons, circles and so on a map. The renderer is responsible to project the data (which is specified in map coordinates) on the map and refresh the graphics after move and zoom events. The map renderer is based on IWGraphicsRenderer and so browser independent (VML in Internet Explorer 6-8, SVG otherwise).

Example:


var attributes = { fill: 'red', stroke: 'black', strokeDashStyle: 'dashed' };

var renderer = new IWMapRenderer(map);
renderer.drawCircle(map.getCenter(), 1000, attributes); // draw a 1 km circle in the center of the map
renderer.render();

Rendering attributes:
Property Description Value Elements
fill the fill or text color CSS color description, e.g. #ff0000 or blue circle, ellipse, polygon, rectangle, rounded rectangle, text
fillOpacity the opacity of the fill color value between 0 (transparent) 1 (opaque) circle, ellipse, polygon, rectangle, rounded rectangle
stroke the stroke color CSS color description, e.g. #ff0000 or blue all
strokeOpacity the opacity of the stroke color value between 0 (transparent) 1 (opaque) all
strokeWidth the width of the stroke in pixels number all
strokeDashStyle the style of the stroke solid, dashed, or dotted all
strokeLinejoin the style of line joins round, bevel, or miter all
strokeLinecap the style of line ends round, butt, or square all
fontFamily the font family to render text e.g. sans-serif or Helvetica text
fontStyle the font style to render text e.g. italic or normal text
fontSize the font size to render text e.g. 14px text
fontWeight the font weight to render text e.g. bold or normal text
textDecoration the decoration to render text e.g. underline, overline or line-through text

This class is part of the module graphics.


Constructor Summary
IWMapRenderer(map)
           
 
Method Summary
 void clearContainer()
           Removes all DOM nodes from container.
destroy()
           undocumented
drawCircle(center, radius, attributes)
           Draws a circle with a specified center coordinate and radius in meters.
drawComplexPolygon(coords, holes, attributes)
           Draws a complex polygon defined by the specified coordinates and holes.
drawEllipse(center, size, attributes)
           Draws an ellipse with a specified center coordinate and with and height in meters.
drawLine(point1, point2, attributes)
           Draws a line between the specified coordinates.
drawPolygon(coords, attributes)
           Draws a polygon defined by the specified coordinates.
drawPolyline(coords, attributes)
           Draws a polyline connecting all specified coordinates.
drawRectangle(center, size, attributes)
           Draws a rectangle defined by it's center coordinate and size in meters.
drawRoundedRectangle(center, radius, size, attributes)
           Draws a rounded rectangle defined by it's center coordinate and size in meters.
  drawText(coord, text, attributes)
           Draws a text on the map.
 object getElement(position)
           Get the element on the specific position
moveBehind(otherRenderer)
           undocumented
moveToBack()
           undocumented
 void moveToBottom(element)
           Moves the element to the bottom by setting it to the first child in the DOM-structure.
moveToFront()
           undocumented
 void moveToTop(element)
           Moves the element to the top by setting it the to last child in the DOM-structure.
 void removeElement(element)
           Removes a given DOM element from container
 void render()
           Renders the shapes on the map.
 void shiftElement(element, position)
           Moves an element to specific position
 
Constructor Detail

IWMapRenderer

IWMapRenderer(map)

Method Detail

clearContainer

void clearContainer()

destroy

destroy()

drawCircle

drawCircle(center, radius, attributes)

drawComplexPolygon

drawComplexPolygon(coords, holes, attributes)

drawEllipse

drawEllipse(center, size, attributes)

drawLine

drawLine(point1, point2, attributes)

drawPolygon

drawPolygon(coords, attributes)

drawPolyline

drawPolyline(coords, attributes)

drawRectangle

drawRectangle(center, size, attributes)

drawRoundedRectangle

drawRoundedRectangle(center, radius, size, attributes)

drawText

 drawText(coord, text, attributes)

getElement

object getElement(position)

moveBehind

moveBehind(otherRenderer)

moveToBack

moveToBack()

moveToBottom

void moveToBottom(element)

moveToFront

moveToFront()

moveToTop

void moveToTop(element)

removeElement

void removeElement(element)

render

void render()

shiftElement

void shiftElement(element, position)

Source-Code Copyright 2007-2016 infoware GmbH - Documentation generated on Tue Nov 29 2022 14:20:15 GMT+0100 (MEZ)