void LocationProvider_OnLocationUpdated(Unity.Location.Location location) { _locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated; _map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom); transform.position = new Vector3(0, 0, 0); }
void LocationProvider_OnLocationUpdated(Unity.Location.Location location) { _locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated; //initialize the map to Peel Park every time //_map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom); _map.Initialize(new Vector2d(53.486786, -2.271412), 16); }
private void LocationProvider_OnFirstLocationUpdate(Unity.Location.Location location) { _locationProvider.OnLocationUpdated -= LocationProvider_OnFirstLocationUpdate; _map.OnInitialized += () => { _isMapInitialized = true; _locationProvider.OnLocationUpdated += LocationProvider_OnLocationUpdated; }; _map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom); }
public void initiliazeMap(Vector2 latLong, int zoomFactor) { //convert Vector2 to proper format Mapbox.Utils.Vector2d MBLatLong = new Mapbox.Utils.Vector2d((double)latLong.x, (double)latLong.y); Debug.Log(MBLatLong); //initialize map at location basicMap = (Mapbox.Unity.Map.AbstractMap)GetComponent(typeof(Mapbox.Unity.Map.AbstractMap)); basicMap.Initialize(MBLatLong, zoomFactor); }
void LocationProvider_OnLocationUpdated(Unity.Location.Location location) { _locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated; _map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom); }
void LocationProvider_OnLocationUpdated(Location location) { Debug.Log("InitializeMapWithLocationProvider: " + "WTF"); _locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated; _map.Initialize(location.LatitudeLongitude, _map.Zoom); }
void LocationProvider_OnLocationUpdated(Unity.Location.Location location) { _locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated; _map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom); //LocationText.GetComponent<Text>().text = location.LatitudeLongitude.ToString(); }
void LocationProvider_OnLocationUpdated(object sender, Location.LocationUpdatedEventArgs e) { _locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated; _map.Initialize(e.Location, _map.Zoom); }