Beispiel #1
0
        void geWebBrowser_KmlLoaded(object sender, GEEventArgs e)
        {
            var kml = e.ApiObject;

            kmlTreeView.ParseKmlObject(kml);
            geWebBrowser.ParseKmlObject(kml);
        }
Beispiel #2
0
        void geWebBrowser1_PluginReady(object sender, GEEventArgs e)
        {
            GEWebBrowser browser = sender as GEWebBrowser;

            ge = browser.GetPlugin();
            // with the default setting the same as loading http://localhost:8080/defualt.kml
            geWebBrowser1.FetchKmlLocal("netlink.kml");
        }
        void geWebBrowser_KmlLoaded(object sender, GEEventArgs e)
        {
            var kml = e.ApiObject;

            kmlTreeView.ParseKmlObject(kml);
            kmlTreeView.Nodes[0].Expand();
            geWebBrowser.ParseKmlObject(kml);
            statusLabel.Text = "KML loaded";
        }
Beispiel #4
0
        void geWebBrowser1_KmlLoaded(object sender, GEEventArgs e)
        {
            dynamic kml = sender;

            if (null != kml)
            {
                // add any kml to the plug-in and tree
                ge.getFeatures().appendChild(kml);
                kmlTreeView1.ParseKmlObject(kml);
            }
        }
Beispiel #5
0
        void geWebBrowser_PluginReady(object sender, GEEventArgs e)
        {
            this.ge = e.ApiObject;

            //this.geToolStrip1.SetBrowserInstance(this.geWebBrowser);
            //this.geStatusStrip1.SetBrowserInstance(this.geWebBrowser);
            this.kmlTreeView.SetBrowserInstance(this.geWebBrowser);

            //this.geWebBrowser.FetchKml("http://localhost:8080/B733_Fuel_Animation.kml");
            this.geWebBrowser.FetchKml("http://localhost:8080/visualisation.kml");
            //this.geWebBrowser.FetchKml("http://localhost:8080/CRW_5km_Product_Suite.kmz");
        }
        void geWebBrowser_PluginReady(object sender, GEEventArgs e)
        {
            this.ge = e.ApiObject;
            //this.geToolStrip1.SetBrowserInstance(this.geWebBrowser);
            //this.geStatusStrip1.SetBrowserInstance(this.geWebBrowser);
            this.kmlTreeView.SetBrowserInstance(this.geWebBrowser);

            if (wait)
            {
                this.geWebBrowser.FetchKml("http://localhost:8080/visualisation.kml");        //DEBUG
                wait = false;
            }

            statusLabel.Text = "Loading KML..";
        }
Beispiel #7
0
        void geWebBrowser1_KmlEvent(object sender, GEEventArgs e)
        {
            dynamic mouseEvent = sender;

            //process action cases...
            switch (e.Data)
            {
            case "click":
                break;

            case "dblclick":
                break;

            case "mouseover":
                break;

            case "mousedown":
                if (mouseEvent.getTarget().getType() == "KmlPlacemark" &&
                    !dragInfo.Dragging)
                {
                    // test for placemark by id...
                    // if this is removed then all placemarks would be dragable
                    if (mouseEvent.getTarget().getId() != "dpm")
                    {
                        return;
                    }

                    dragInfo.Placemark = mouseEvent.getTarget();
                    dragInfo.Dragging  = true;
                    Debug.WriteLine("Pick-up", "Form1");
                }

                break;

            case "mouseup":
                if (dragInfo.Dragging)
                {
                    mouseEvent.preventDefault();
                    Debug.WriteLine("Drop", "Form1");
                }

                dragInfo.Dragging = false;
                break;

            case "mouseout":
                break;

            case "mousemove":
                if (dragInfo.Dragging)
                {
                    mouseEvent.preventDefault();
                    dynamic point = dragInfo.Placemark.getGeometry();
                    point.setLatitude(mouseEvent.getLatitude());
                    point.setLongitude(mouseEvent.getLongitude());
                }

                break;

            default:
                break;
            }
        }
Beispiel #8
0
 void geWebBrowser1_ViewEvent(object sender, GEEventArgs e)
 {
     ////Debug.WriteLine(string.Format("GEView: {0}", e.Message), "Form1");
 }
Beispiel #9
0
 void geWebBrowser1_ScriptError(object sender, GEEventArgs e)
 {
     //MessageBox.Show(e.Data, e.Message);
 }