public void Update(float delta)
        {
            if (Input.location.status == LocationServiceStatus.Initializing)
            {
                return;
            }

            var locationData = Input.location.lastData;
            var position     = new LatLonCoordinate(locationData.longitude, locationData.latitude);

            if (player != null)
            {
                player.Position = position;
            }
        }
Example #2
0
        public static LatLonBounds TileBounds(int zoom, int xtile, int ytile)
        {
            double ny = Math.Pow(2.0, zoom);
            double nX = Math.Pow(2.0, zoom + 1);

            LatLonCoordinate coordMin = new LatLonCoordinate();

            coordMin.Lon = ((xtile / nX) * 360) - 180;
            coordMin.Lat = ((ytile / ny) * 180) - 90;
            LatLonCoordinate coordMax = new LatLonCoordinate();

            coordMax.Lon = coordMin.Lon + ((1 / nX) * 360);
            coordMax.Lat = coordMin.Lat + ((1 / ny) * 180);
            var llb = new LatLonBounds();

            llb.Min = coordMin;
            llb.Max = coordMax;
            return(llb);
        }
Example #3
0
 public ActionResult AddCoordinate(LatLonCoordinate latLonCoordinate)
 {
     throw new NotImplementedException();
 }