Exemple #1
0
        void window_Closed(object sender, EventArgs e)
        {
            String URL = window.getURL();
            Debug.WriteLine("URL: " + URL);

            Location location = new Location();

            if (this.mainPage.mainMap.TryViewportPointToLocation(this.mouseEvent.ViewportPoint, out location))
            {
                /* Success */
                Debug.WriteLine("Point (" + location.Longitude + "," + location.Latitude + ")");

                MapImage image = new MapImage(URL);
                Debug.WriteLine("yabai: " + URL);
                image.setLocation(location);
                image.draw(mainPage.mainMap);

                this.mapData = image;
            }
            else
            {
                /* Fails */
                Debug.WriteLine("Something wrong has happened in converting viewport to location.");
            }
        }