Example #1
0
        private MemoryProvider CreateRandomPointsProvider()
        {
            var randomPoints = PointLayerSample.GenerateRandomPoints(MapControl.Map.Envelope, 100);
            var features     = new Features();
            var count        = 0;

            foreach (var point in randomPoints)
            {
                var feature = new Feature {
                    Geometry = point
                };
                feature["Label"] = count.ToString(CultureInfo.InvariantCulture);
                features.Add(feature);
                count++;
            }
            return(new MemoryProvider(features));
        }
Example #2
0
        private static MemoryProvider CreateRandomPointsProvider(BoundingBox box)
        {
            var randomPoints = PointLayerSample.GenerateRandomPoints(box, 200);
            var features     = new Features();
            var count        = 0;

            foreach (var point in randomPoints)
            {
                var feature = new Feature {
                    Geometry = point
                };
                feature["Label"] = count.ToString(CultureInfo.InvariantCulture);
                features.Add(feature);
                count++;
            }
            return(new MemoryProvider(features));
        }