private void OnLocateMeClick(ElementEvent e) { GeoLocationProvider geoLocationProvider = new GeoLocationProvider(_map); GeoLocationOptions options = new GeoLocationOptions(); options.UpdateMapView = true; geoLocationProvider.GetCurrentPosition(options); }
public async Task I_can_get_my_location_from_ip() { // Arrange var locationProvider = new GeoLocationProvider(); // Act var location = await locationProvider.GetLocationAsync(); // Assert location.Latitude.Should().NotBe(default);
public GeoLocationSensorSample(GeoLocationProvider provider, double time, GeoPoint3 location, GeoDatum geoDatum, double?bearing, double?speed, double?accuracy) { _provider = provider; _time = time; _location = location; _geoDatum = geoDatum; _bearing = bearing; _speed = speed; _accuracy = accuracy; }
/// <summary> /// Initializes a new instance of the <see cref="ForecastProvider"/> class. /// </summary> /// <param name="weatherProvider"> /// The weather provider. /// </param> /// <param name="coord"> /// Coordinates of the city to get weather for /// </param> /// <param name="cityName"> /// City name /// </param> /// <param name="countryCode"> /// Country code /// </param> /// <param name="format"> /// Weather output format /// </param> public ForecastProvider( IWeatherProvider weatherProvider, Coordinate coord = null, string cityName = null, string countryCode = null, string format = null) { this.format = format ?? "{0}"; var geoProv = new GeoLocationProvider(); coord = coord ?? new GeoLocationProvider().Coordinate; cityName = cityName ?? geoProv.City; countryCode = countryCode ?? geoProv.CountryCode; weatherProvider.Coordinate = coord; weatherProvider.CityName = cityName; weatherProvider.CountryCode = countryCode; this.WeatherProvider = weatherProvider; this.Coordinate = coord; }
public Geolocator(Func <Context> contextFactory) { _provider = new GeoLocationProvider(contextFactory); }
public GeoIPAdapter(GeoLocationProvider geoLocationProvider) { _geoLocationProvider = geoLocationProvider; }