Example #1
0
        public void setCoordinates(List <MOBMAP.Coordinates.Coordinate> geoCoordinates)
        {
            _mapMarkersList = new MapGoogleMarkersList();
            List <MapGooglePoint> tmpPathPoint = new List <MapGooglePoint>();

            _mapProperties = new MapGoogleProperties(this._width, this._hight);
            _urlBuilder    = new MapGoogleUrlBuilder(this);
            _mapViewport   = new MapGoogleViewport();

            if (geoCoordinates != null && geoCoordinates.Count > 0)
            {
                int countOfCoord = geoCoordinates.Count;
                int stepOfPoint  = (int)countOfCoord / 50;

                //set markers
                mapMarkersList.Add(new MapGoogleMarker(
                                       new MapGooglePoint(geoCoordinates[0].coordinatePoint.X.ToString(CultureInfo.InvariantCulture.NumberFormat), geoCoordinates[0].coordinatePoint.Y.ToString(CultureInfo.InvariantCulture.NumberFormat)),
                                       "B",
                                       MapGoogleMarker.MarkerColor.green));

                mapMarkersList.Add(new MapGoogleMarker(
                                       new MapGooglePoint(geoCoordinates[countOfCoord - 1].coordinatePoint.X.ToString(CultureInfo.InvariantCulture.NumberFormat), geoCoordinates[countOfCoord - 1].coordinatePoint.Y.ToString(CultureInfo.InvariantCulture.NumberFormat)),
                                       "E",
                                       MapGoogleMarker.MarkerColor.red));
                //setPath
                for (int i = 0; i < countOfCoord; i += stepOfPoint)
                {
                    tmpPathPoint.Add(new MapGooglePoint(geoCoordinates[i].coordinatePoint.X.ToString(CultureInfo.InvariantCulture.NumberFormat), geoCoordinates[i].coordinatePoint.Y.ToString(CultureInfo.InvariantCulture.NumberFormat)));
                }
                _mapPath = new MapGooglePath(tmpPathPoint);
                //setViewport
                _mapViewport.centerPoint = mapViewport.setMapCenterPoint(_mapPath.pathPoint);
            }
        }
Example #2
0
        public void setCoordinates( List<MOBMAP.Coordinates.Coordinate> geoCoordinates)
        {
            _mapMarkersList = new MapGoogleMarkersList();
            List<MapGooglePoint> tmpPathPoint = new List<MapGooglePoint>();
            _mapProperties = new MapGoogleProperties(this._width,this._hight);
            _urlBuilder = new MapGoogleUrlBuilder(this);
            _mapViewport = new MapGoogleViewport();

            if (geoCoordinates != null && geoCoordinates.Count > 0)
            {
                int countOfCoord = geoCoordinates.Count;
                int stepOfPoint = (int)countOfCoord / 50;

                //set markers
                 mapMarkersList.Add(new MapGoogleMarker(
                        new MapGooglePoint(geoCoordinates[0].coordinatePoint.X.ToString(CultureInfo.InvariantCulture.NumberFormat), geoCoordinates[0].coordinatePoint.Y.ToString(CultureInfo.InvariantCulture.NumberFormat)),
                        "B",
                        MapGoogleMarker.MarkerColor.green));

                 mapMarkersList.Add(new MapGoogleMarker(
                         new MapGooglePoint(geoCoordinates[countOfCoord - 1].coordinatePoint.X.ToString(CultureInfo.InvariantCulture.NumberFormat), geoCoordinates[countOfCoord - 1].coordinatePoint.Y.ToString(CultureInfo.InvariantCulture.NumberFormat)),
                         "E",
                         MapGoogleMarker.MarkerColor.red));
                //setPath
                 for (int i = 0; i < countOfCoord;i+=stepOfPoint )
                 {
                     tmpPathPoint.Add(new MapGooglePoint(geoCoordinates[i].coordinatePoint.X.ToString(CultureInfo.InvariantCulture.NumberFormat), geoCoordinates[i].coordinatePoint.Y.ToString(CultureInfo.InvariantCulture.NumberFormat)));
                 }
                 _mapPath = new MapGooglePath(tmpPathPoint);
                //setViewport
                 _mapViewport.centerPoint = mapViewport.setMapCenterPoint(_mapPath.pathPoint);
            }
        }
Example #3
0
 public MapGoogle(int width, int hight)
 {
     this._width     = width;
     this._hight     = hight;
     _mapProperties  = new MapGoogleProperties(_width, hight);
     _mapMarkersList = new MapGoogleMarkersList();
     _mapPath        = new MapGooglePath();
     _mapViewport    = new MapGoogleViewport();
     _urlBuilder     = new MapGoogleUrlBuilder(this);
 }
Example #4
0
 public MapGoogle(int width, int hight)
 {
     this._width = width;
     this._hight = hight;
     _mapProperties = new MapGoogleProperties(_width, hight);
     _mapMarkersList = new MapGoogleMarkersList();
     _mapPath = new MapGooglePath();
     _mapViewport = new MapGoogleViewport();
     _urlBuilder = new MapGoogleUrlBuilder(this);
 }