Why is the collection of locations an array[4]?

Feb 20, 2012 at 12:15 PM
Edited Feb 23, 2012 at 4:08 PM


can you explain to me why are you doing this (BingMapTest/TestMapDrawing.cs, Ln 416):


        private ILocationCollection[] PointsToCollection(IEnumerable pts)
            var locs = new ILocationCollection[4];
            locs[0] = this.milsymFactory.LocationCollection();
            foreach (var p in pts)
                locs[0].Add(this.milsymFactory.Location(Order.LatLon, p.X, p.Y));

            return locs;


I understand it is a conversion of System.Windows.Points to ILocations but why is the array made like this and why is only the first one used [0]?
What do you want to achieve by having space for 3 other ILocationCollections?

Feb 22, 2012 at 9:41 AM
Edited Feb 23, 2012 at 4:09 PM

Ok, understood the test code after a debug session. Missed the point that this code was only required for testing 4 symbol variants of the same symbol.

Seems to me this Diskussion / Post is not useful anymore... but I can't delete it.

Feb 27, 2012 at 3:30 AM

I think most all posts are useful - but I think I can delete this thread if you like. Let me know.

I'll add a comment to the code to reflect your observation.

Feb 27, 2012 at 8:15 AM

Yes, I think you should delete this one.