Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
0
Datasource for Map
posted

I am trying to figure out if I can make as a polygon datasource for the IgbGeographicMap component either geojson or returned values from sqlite/spatialite database (possibly as WKT)?   I see the example uses shape files for this, but I can't seem to figure out how to use this type of data.

  • 34810
    Offline posted

    Hello Susan,

    The structure for the IgbGeographicMap’s GeographicShapeSeries is that you can use either the shape file (.shp) as you had mentioned, or you can use a collection of collection of points, for example List<List<Point>>. If you use the latter, you will need to point the ShapeMemberPath to a property on a data item that returns this List<List<Point>>. So for example, if you had a class Node:

    public class Node {
        public List<List<Point>> NodePoints {get;set;}
    }

    You would then bind your series data source against a collection of Node elements and set the ShapeMemberPath to “NodePoints.”

    The reason this works with a shape file out-of-the-box is that this is the structure of a shape file and is easily parsed into a List<List<Point>> internally.