====== Rendering MapObjects ======
This page describes how render a MapObject instance on the Third-Party Reference Map.
Make sure you can easily add new mapobject layers, because new object types for Measurements and Vector Overlays will be added in next versions.
===== Rendering Lines =====
The ''spatialLine'' property is a CoordinatePath instance containing one or more CoordinateLine instances. Each CoordinateLine instance holds a list of Coordinate instances defining the outline of a single line.
Legend properties :
* color : the outline color.
* lineWidth : the outline width in 96dpi pixels.
===== Rendering Areas =====
The ''spatialArea'' property is a CoordinatePath instance containing one or more CoordinateLine instances. Each CoordinateLine instance holds a list of Coordinate instances defining the outline of a single area.
Legend properties :
* color : the outline color.
* lineWidth : the outline width in 96dpi pixels.
* fillColor : the fill color.
===== Rendering Points =====
The ''spatialPoint'' property is a symbol at a specific coordinate.
Legend properties :
* symbolName : the name of a preset symbol.
* symbolPath : the path of a symbol.
* symbolSize : the size of the symbol in 96dpi pixels.
* color : the symbol outline color.
* lineWidth : the symbol outline width in 96dpi pixels.
* fillColor : the symbol fill color.
The symbol is to be rendered inside a square with size ''symbolSize''. The center of the square should be placed on the coordinate defined by ''spatialPoint''.
Possible symbolName values :
* ''circle'' : a filled circle.
If both symbolName and symbolPath are undefined, a "circle" symbol must be rendered.
Below is an example of creating a WKT string from a symbolPath :
/**
* Create an SVG path from a mapobject symbol path.
*/
getSymbolPath: function(mapObject) {
if (!mapObject.symbolPath) return null;
var maxX = 0;
var maxY = 0;
// create path
var path = "";
for (var i=0; i