AxelGong / winforms-geplugin-control-library

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

KmlTreeView Error using ParseKmlObject #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use VB 2010
2. Add a GeWebBrowser and KmlTreeView to a form
3. Use the code below:

    Private Sub GeWebBrowser1_PluginReady(sender As Object, e As FC.GEPluginCtrls.GEEventArgs) Handles GeWebBrowser1.PluginReady

        _ge = e.ApiObject ' reference to the Google Earth Plugin object

        'Add ToolStrip
        GeToolStrip1.SetBrowserInstance(GeWebBrowser1)
        KmlTreeView1.SetBrowserInstance(GeWebBrowser1)

        'Layers
        GEHelpers.EnableLayer(_ge, Layer.Borders, True)

        'Options
        options = New GEOptions(_ge)
        options.ScaleLegendVisibility = True
        options.StatusBarVisibility = True

        'Nav Control
        control = New GENavigationControl(_ge)
        control.Visibility = Visibility.Show

        GeToolStrip1.Refresh()

        'Load KML
        Try
            GeWebBrowser1.FetchKml("http://localhost:8080/Test.kml")
        Catch ex As Exception
            MessageBox.Show(ex.Message, "KML Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

    End Sub

    Private Sub GeWebBrowser1_KmlLoaded(sender As Object, e As FC.GEPluginCtrls.GEEventArgs) Handles GeWebBrowser1.KmlLoaded

        'add the kml to the plugin
        Try
            GeWebBrowser1.ParseKmlObject(e.ApiObject)
            KmlTreeView1.ParseKmlObject(e.ApiObject)
        Catch ex As Exception
            MessageBox.Show(ex.Message, "KML Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

    End Sub

What is the expected output? What do you see instead?

I get the following error at runtime when 
"KmlTreeView1.ParseKmlObject(e.ApiObject)" is called:

Member 'FC.GEPluginCtrls.KmlTreeView.CreateNode(object)' cannot be accessed 
with an instance reference; qualify it with a type name instead

What version of the product are you using? On what operating system?
Revision 537. VB 2010. Win7 64Bit

Please provide any additional information below.
The KML works and can be loaded just fine into the GeWebBrowser and Google 
Earth.

Original issue reported on code.google.com by nhi...@vt.edu on 17 Jul 2013 at 8:26

GoogleCodeExporter commented 8 years ago
Hi, sorry about that - I fluffed the last commit. If you recompile from the 
latest source it should work.

Original comment by fraser.c...@gmail.com on 17 Jul 2013 at 11:50