svipxu / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 0 forks source link

Support for Creation of Folders via Helper #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The current Helpers do not provide a mechanism for adding folders dynamically 
via a call to the helper.  When creating a large number of placemarks via 
Helpers, it would be extraordinarily useful to add folders to organize the 
placemarks in. 

Original issue reported on code.google.com by SableBl...@gmail.com on 17 Feb 2012 at 12:56

GoogleCodeExporter commented 8 years ago
Hi... This might give you an idea of how to go about this...

            var doc = ge.createDocument(string.Empty);
            doc.setName("Test Folder");

            for (int i = 0; i < 360; i++)
            {
                doc.getFeatures().appendChild(KmlHelpers.CreatePlacemark(
                                 ge,
                                 id: "pm_x" + i,
                                 latitude: 0,
                                 longitude: 0 + i,
                                 name: "placemark " + i,
                                 description: "test placemark " + i,
                                 addFeature: false));
            }
            // add all the place marks at once 
            geWebBrowser1.ParseKmlObject(doc);
            kmlTreeView1.ParseKmlObject(doc);

Regards,
Tkm

Original comment by tho...@gmail.com on 17 Feb 2012 at 8:55

GoogleCodeExporter commented 8 years ago
Thanks Sable...and...Tkm, yes using the native API is allays a possibility for 
creating objects. 

That said, I will look to add additional support for the other 'createXXX' 
methods in the next commit.

I am going to merge this with the other similar request as it covers the same 
ground.

Thanks again.

Original comment by fraser.c...@gmail.com on 17 Feb 2012 at 9:40