none
how do bing map polyLine

คำตอบ

ตอบทั้งหมด

  • For the drawing take a look at this blog post: http://ngjon.wordpress.com/2010/02/05/interactive-drawing-on-the-silverlight-map-control/

    To get your data into your database it will depend on if you are using WPF or silverlight. If using WPF then you will need to connect directly to your database, then use the spatial DLL's for SQL 2008 or 2012 in your code. You will then need to use that library to create an SQL Geometry or Geography object out of your data then upload it into your database. If using silverlight then you will need to create a web service to send the data to, then use the spatial dll's there and tie it into your database.


    http://rbrundritt.wordpress.com

    10 มีนาคม 2555 13:58
    เจ้าของ
  • public MainPage()
            {
                InitializeComponent();
                double[] lattitudes = { 50.21934078740, 33.563511, 19.511719, 25.3125 };
                double[] longitudes = { 23.0518068854053, 35.368259, -14.43468, 67.542167 };
                this.DrawPolyLine(lattitudes, longitudes);   
                
            }

                private void DrawPolyLine(double []lat, double[]longi)
            {
                
                MapPolyline line = new MapPolyline();
                 line.Stroke = new SolidColorBrush(Colors.Brown);
                line.StrokeThickness = 3;
                line.Locations = new LocationCollection();
                for (int i=0;i<4;i++){
                    line.Locations.Add(new Location(lat[i], longi[i]));
                    
                    Pushpin p = new Pushpin();
                    
                    p.Location = new Location(lat[i], longi[i]);
                    
                    map1.Children.Add(p);
                }
                     map1.Children.Add(line);
             }
    24 มิถุนายน 2556 8:26