Exemplo n.º 1
0
        public GridUI(Plugin plugin)
        {
            this.plugin = plugin;

            InitializeComponent();

            map.MapType = MapType.GoogleSatellite;

            layerpolygons = new GMapOverlay(map, "polygons");
            map.Overlays.Add(layerpolygons);

            CMB_startfrom.DataSource = Enum.GetNames(typeof(Grid.StartPosition));
            CMB_startfrom.SelectedIndex = 0;

            // set and angle that is good
            List<PointLatLngAlt> list = new List<PointLatLngAlt>();
            plugin.Host.FPDrawnPolygon.Points.ForEach(x => { list.Add(x); });
            NUM_angle.Value = (decimal)((getAngleOfLongestSide(list) + 360) % 360);
        }
Exemplo n.º 2
0
        public GridUI(Plugin plugin)
        {
            this.plugin = plugin;

            InitializeComponent();

            map.MapType = MapType.GoogleSatellite;

            layerpolygons = new GMapOverlay(map, "polygons");
            map.Overlays.Add(layerpolygons);

            CMB_startfrom.DataSource = Enum.GetNames(typeof(Grid.StartPosition));
            CMB_startfrom.SelectedIndex = 0;

            layerpolygons.Polygons.Add(plugin.Host.FPDrawnPolygon);

            foreach (var item in plugin.Host.FPDrawnPolygon.Points)
            {
                layerpolygons.Markers.Add(new GMapMarkerGoogleRed(item));
            }
        }