*** ch04/GPSLocationService_org.cs Mon Oct 21 20:20:15 2019
--- ch04/GPSLocationService.cs Wed Oct 23 11:21:53 2019
***************
*** 102,107 ****
--- 102,108 ----
print("GSPLocationService started");
// Access granted and location value could be retrieved
print("Location initialized at: " + Input.location.lastData.latitude + " " + Input.location.lastData.longitude + " " + Input.location.lastData.altitude + " " + Input.location.lastData.horizontalAccuracy + " " + Input.location.lastData.timestamp);
+ Timestamp = Input.location.lastData.timestamp; // added by nitta Oct/21/2019
CenterMap();
IsServiceStarted = true;
}
***************
*** 141,148 ****
mapWorldCenter.x = GoogleMapUtils.LonToX(mapCenter.Longitude);
mapWorldCenter.y = GoogleMapUtils.LatToY(mapCenter.Latitude);
! mapScale.x = GoogleMapUtils.CalculateScaleX(Latitude, MapTileSizePixels, MapTileScale, MapTileZoomLevel);
! mapScale.y = GoogleMapUtils.CalculateScaleY(Longitude, MapTileSizePixels, MapTileScale, MapTileZoomLevel);
var lon1 = GoogleMapUtils.adjustLonByPixels(Longitude, -MapTileSizePixels/2, MapTileZoomLevel);
var lat1 = GoogleMapUtils.adjustLatByPixels(Latitude, MapTileSizePixels/2, MapTileZoomLevel);
--- 142,149 ----
mapWorldCenter.x = GoogleMapUtils.LonToX(mapCenter.Longitude);
mapWorldCenter.y = GoogleMapUtils.LatToY(mapCenter.Latitude);
! mapScale.x = GoogleMapUtils.CalculateScaleX(Longitude, MapTileSizePixels, MapTileScale, MapTileZoomLevel);
! mapScale.y = GoogleMapUtils.CalculateScaleY(Latitude, MapTileSizePixels, MapTileScale, MapTileZoomLevel);
var lon1 = GoogleMapUtils.adjustLonByPixels(Longitude, -MapTileSizePixels/2, MapTileZoomLevel);
var lat1 = GoogleMapUtils.adjustLatByPixels(Latitude, MapTileSizePixels/2, MapTileZoomLevel);
|