Search
MapNode Class
Remarks See Also
 





Represents nodes that can render geographical maps.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public class MapNode : DiagramNode

Visual Basic  Copy Code

Public Class MapNode
    Inherits DiagramNode

 Remarks

At this time map nodes can display the content of Esri shapefile and OpenStreetMap files. The content of a map file is represented by an instance of the MapContent class that should be assigned to the Content property of a MapNode. When the map comes with associated DBF database file, map regions can display labels if the labelField argument of FromFile is specified and DrawLabels is enabled. The color of a map region can be set via an integer index assigned to a map's Shape object, which identifies the element of FillColors that should be used to paint the shape.

 Example

The following example shows how to load map content and assign it to a node.

C#  Copy Code
var content = MapContent.FromFile(
    "United Kingdom.shp", true, "NAME_1");

var mapNode = new MapNode();
mapNode.Bounds = new RectangleF(0, 0, 400, 400);
mapNode.Content = content;
mapNode.DrawLabels = true;
content.AssignColors();
diagram.Nodes.Add(mapNode);

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.DiagramItem
        MindFusion.Diagramming.DiagramNode
            MindFusion.Diagramming.MapNode

 See Also