public SymbolUserControl(YouMapsSymbol youmapsSymbol)
        {
            CheckBoxEverything = new CheckBox();
            SymbolNameText = new TextBlock();
            EditRadioButton = new RadioButton();

            this.InitializeComponent();
            this.YouMapsSymbol = youmapsSymbol;
            SymbolNameText.Text = youmapsSymbol.Name;
            SymbolNameText.FontSize = 30;
            ControlStackpanel.Children.Add(CheckBoxEverything);
            ControlStackpanel.Children.Add(SymbolNameText);
            ControlStackpanel.Children.Add(EditRadioButton);
        }
Exemplo n.º 2
0
        private async Task DrawSymbolOnMap(YouMapsSymbol symbol, TappedRoutedEventArgs e)
        {
            Point pp = e.GetPosition(myMap);
            

            AddSymbolToMap astm = new AddSymbolToMap(pp);

            List<PointCollection> pCollect = await astm.ChangePointToPlaceSymbol();
            foreach(PointCollection pc in pCollect)
            {
                SharpKml.Dom.CoordinateCollection coordCollection = new SharpKml.Dom.CoordinateCollection();
                MapControl.LocationCollection locationCollection = new MapControl.LocationCollection();
                loadMap.Polylines.Add(new Points.YouMapPolyline { Locations = locationCollection, ColorOfLine = LineColorBrush, LocationAsCords = coordCollection });

                foreach(Point p in pc)
                {
                    
                    MapControl.Location location = myMap.ViewportPointToLocation(p);
                    StyleUserControl sty = new StyleUserControl(LineColorBrush);

                    loadMap.Polylines.ElementAt(locationInLocationsArray).Locations.Add(location);
                    loadMap.Polylines.ElementAt(locationInLocationsArray).LocationAsCords.Add(new SharpKml.Base.Vector { Latitude = location.Latitude, Longitude = location.Longitude });

                }
                locationInLocationsArray++;
            }

        }
Exemplo n.º 3
0
 private SymbolUserControl AddSymbolsToEditDeleteGrid(YouMapsSymbol yms)
 {
     SymbolUserControl suc = new SymbolUserControl(yms);
     suc.EditRadioButton.Visibility = Visibility.Collapsed;
     sucs.Add(suc);
     suc.CheckBoxEverything.Visibility = Visibility.Visible;
     EditYouMapSymbolsStackPanel.Children.Add(suc);
     EditGrid.Visibility = Visibility.Collapsed;
     return suc;
 }