private void AddVertexPin(Vertex v) { //Pushpin pushpin = new Pushpin(); //pushpin.Style = (Style)(Application.Current.Resources["PushpinStyle"]); Image pushpin = MarkerConfig.CreateImage(v); pushpin.Tap += (object sender, GestureEventArgs e) => { e.Handled = true; mWebMapCommon.onTap(v); //updates the title //Navigates to the possibilities 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)); }; //pushpin.MouseLeftButtonUp += new MouseButtonEventHandler(pushpin_MouseLeftButtonUp); AbsoluteLocation pos = v.AbsoluteLocations.First(); mapLayerVertices.AddChild(pushpin, new GeoCoordinate((double)pos.latitude, (double)pos.longitude), PositionOrigin.BottomCenter); }
private void AddVertexPin(Vertex v) { Image img = MarkerConfig.CreateImage(v); img.Tap += (object sender, GestureEventArgs e) => { e.Handled = true; Tapped_UpdatePins(v, img); Tapped_UpdateMenu(); Tapped_UpdateTitle(); }; //pushpin.MouseLeftButtonUp += new MouseButtonEventHandler(pushpin_MouseLeftButtonUp); AbsoluteLocation pos = v.AbsoluteLocations.First(); mapLayerVertices.AddChild(img, new GeoCoordinate((double)pos.latitude, (double)pos.longitude), PositionOrigin.BottomCenter); }
private void AddVertexPin(Vertex v) { //Pushpin pushpin = new Pushpin(); //pushpin.Style = (Style)(Application.Current.Resources["PushpinStyle"]); Image pushpin = MarkerConfig.CreateImage(v); //pushpin.Tap += new EventHandler<GestureEventArgs>(pushpin_Tap); pushpin.Tap += (object sender, GestureEventArgs args) => { SymbolicLocation symLoc = v.SymbolicLocations.FirstOrDefault(); if (symLoc != null) { string title = symLoc.title ?? ""; string description = symLoc.description ?? ""; string url = symLoc.url ?? ""; MessageBox.Show(string.Format("{0}\n{1}\n{2}", title, description, url)); } }; AbsoluteLocation pos = v.AbsoluteLocations.First(); mapLayerVertices.AddChild(pushpin, new GeoCoordinate((double)pos.latitude, (double)pos.longitude), PositionOrigin.BottomCenter); }