void clearRoad(int roadIndex)
 {
     if (curRoad != null)
     {
         curRoad.Clear();
         curRoad = null;
         // this.playCtl.stop();
         this.setCtrl.reSetControl();
     }
 }
Example #2
0
        public void setstopsData()
        {
            List <stops> list = new List <stops>();
            stops        tmp  = new stops();

            tmp.X        = 12728647.712585449;
            tmp.Y        = 3579603.3365478516;
            tmp.StopName = "团结村";
            list.Add(tmp);

            tmp          = new stops();
            tmp.X        = 12729488.519714356;
            tmp.Y        = 3578924.9580688477;
            tmp.StopName = "徐东大街";
            list.Add(tmp);


            tmp          = new stops();
            tmp.X        = 12730635.074890137;
            tmp.Y        = 3577921.7222900391;
            tmp.StopName = "徐东大街";
            list.Add(tmp);


            tmp          = new stops();
            tmp.X        = 12731867.621704102;
            tmp.Y        = 3577596.8649902344;
            tmp.StopName = "东湖路";
            list.Add(tmp);

            stopsData = new List <stops>();
            pntList   = new List <Point>();
            stopsData = list;
            Point pnt;

            curRoad = new BusRoad(this.markLayer1, this.graphicsLayer1);
            for (int i = 0; i < stopsData.Count; i++)
            {
                pnt = new Point(stopsData[i].X, stopsData[i].Y);
                pntList.Add(pnt);
                curRoad.AddNode(stopsData[i].StopName, stopsData[i].X, stopsData[i].Y, "../images/bus/stop.PNG");
            }

            IMSPolyline line = new IMSPolyline(CoordinateType.Logic);

            line.Points          = pntList;
            line.Stroke          = new SolidColorBrush(Colors.Red);
            line.StrokeThickness = 2;
            line.Draw();
            line.Flicker();
            this.graphicsLayer1.AddGraphics(line);
            this.iMSMap1.SetCenter(pntList[0].X, pntList[0].Y);
            //return list;
        }
Example #3
0
 void ShowRoad(int roadIndex)
 {
     if (curRoad != null)
     {
         curRoad.Clear();
         curRoad = null;
     }
     if (roadIndex > -1 && roadIndex < _road.Count)
     {
         _road[roadIndex].Draw();
         curRoad = _road[roadIndex];
     }
 }