Example #1
0
        private void SetupEventHandlers()
        {
            //Update the page's title to correpond to the selected vertex
            mWebMapCommon.OnTitleChange            += new EventHandler <Map2D.TitleArgs>(mWebMapCommon_OnTitleChange);       // (source, args) => this.ApplicationTitle.Text = args.Title;
            mWebMapCommon.OnCenterChange           += new EventHandler <Map2D.CoordinateArgs>(mWebMapCommon_OnCenterChange); //(sender, coordinateArgs) => graphMap.Center = new GeoCoordinate(coordinateArgs.Latitude, coordinateArgs.Longitude);
            mWebMapCommon.OnVisibleVerticesChange  += new EventHandler <Map2D.VisibleVerticesArgs>(mWebMapCommon_OnVisibleVerticesChange);
            mWebMapCommon.OnVisibleEdgesChange     += new EventHandler <Map2D.VisibleEdgesArgs>(mWebMapCommon_OnVisibleEdgesChange);
            mWebMapCommon.OnClearOverlayChange     += (sender, args) => { ClearOverlays(); };
            mWebMapCommon.OnSelectedLocationChange += new EventHandler <Map2DOffline.SelectedLocationArgs>(mWebMapCommon_OnSelectedLocationChange);
            mWebMapCommon.OnTapChange += new EventHandler(mWebMapCommon_OnTapChange);

            //When a symbolic location has been added or modified we update the map to show the correct markers.
            EditSymbolicLocation.OnSymbolicLocationChange += (source, eventArgs) => mWebMapCommon.refreshUI();
        }
        public UI_OfflineGoogleMap()
        {
            InitializeComponent();
            InitializeMenu();
            HideDPad();

            mWebMapCommon = new Map2DOffline(webBrowserOffline);
            //Update the page's title to correpond to the selected vertex
            mWebMapCommon.OnTitleChange += (source, args) => this.ApplicationTitle.Text = args.Title;
            //Go to the Edit Location/Add measurement dialog when the user taps on a vertex
            mWebMapCommon.OnTapChange += (source, args) =>
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(Globals.XamlUri_OfflineOnTapAction);
                sb.Append("?title=");
                sb.Append(this.ApplicationTitle.Text);
                this.NavigationService.Navigate(new Uri(sb.ToString(), UriKind.Relative));
            };

            //When a symbolic location has been added or modified we update the map to show the correct markers.
            EditSymbolicLocation.OnSymbolicLocationChange += (source, eventArgs) => mWebMapCommon.refreshUI();
        }
        public UI_OfflineGoogleMap()
        {
            InitializeComponent();
            InitializeMenu();
            HideDPad();
  
            mWebMapCommon = new Map2DOffline(webBrowserOffline);
            //Update the page's title to correpond to the selected vertex
            mWebMapCommon.OnTitleChange += (source, args) => this.ApplicationTitle.Text = args.Title;
            //Go to the Edit Location/Add measurement dialog when the user taps on a vertex
            mWebMapCommon.OnTapChange += (source, args) =>
                {
                    StringBuilder sb = new StringBuilder();
                    sb.Append(Globals.XamlUri_OfflineOnTapAction);
                    sb.Append("?title=");
                    sb.Append(this.ApplicationTitle.Text);
                    this.NavigationService.Navigate(new Uri(sb.ToString(), UriKind.Relative));
                };

            //When a symbolic location has been added or modified we update the map to show the correct markers. 
            EditSymbolicLocation.OnSymbolicLocationChange += (source, eventArgs) => mWebMapCommon.refreshUI();
        }