void HandleGeocoderResponse(ForwardGeocodeResponse res) { _hasResponse = true; if (null != res.Features && res.Features.Count > 0) { var center = res.Features[0].Center; _inputField.text = string.Format("{0},{1}", center.x, center.y); _coordinate = res.Features[0].Center; } Response = res; OnGeocoderResponse(res); }
void ForwardGeocoder_OnGeocoderResponse(ForwardGeocodeResponse response) { if (response == null) { return; } _camera.transform.position = _cameraStartPos; if (null != response.Features && response.Features.Count > 0) { _map.UpdateMap(response.Features[0].Center, (int)_zoomSlider.value); } }
public void SerializesAndDeserializesForward() { // First, deserialize the example response ForwardGeocodeResponse forwardResp = this.geocoder.Deserialize <ForwardGeocodeResponse>(this.forwardResponse); // Then deserialize it back to a string. string forwardReserialized = JsonConvert.SerializeObject(forwardResp, JsonConverters.Converters); // Ensure the two match Assert.AreEqual(this.forwardResponse, forwardReserialized); }
void ForwardGeocoder_OnGeocoderResponse(ForwardGeocodeResponse response, bool resetCamera) { if (response == null) { return; } if (resetCamera) { _camera.transform.position = _cameraStartPos; } ForwardGeocoder_OnGeocoderResponse(response); }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { _hasResponse = true; if (null != res.Features && res.Features.Count > 0) { _coordinate = res.Features[0].Center; } Response = res; if (OnGeocoderResponse != null) { OnGeocoderResponse(this, EventArgs.Empty); } }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { _features = res.Features; _isSearching = false; this.Repaint(); //_hasResponse = true; //_coordinate = res.Features[0].Center; //Response = res; //if (OnGeocoderResponse != null) //{ // OnGeocoderResponse(this, EventArgs.Empty); //} }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { //null if no internet connection if (res != null) { //null if invalid token if (res.Features != null) { _features = res.Features; } } _isSearching = false; this.Repaint(); }
private void HandleGeocoderResponse(ForwardGeocodeResponse res) { _hasResponse = true; if (null == res) { _inputField.text = "no geocode response"; } else if (null != res.Features && res.Features.Count > 0) { var center = res.Features[0].Center; _coordinate = res.Features[0].Center; } Response = res; OnGeocoderResponse(res); }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { _hasResponse = true; if (null == res) { Debug.Log("no geocode response"); } else if (null != res.Features && res.Features.Count > 0) { var center = res.Features[0].Center; _coordinate = res.Features[0].Center; } Response = res; OnGeocoderResponse(res); myLoc = res.Features[0].Center; }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { //null if no internet connection if (res != null) { //null if invalid token if (res.Features != null) { _features = res.Features; } } _isSearching = false; this.Repaint(); //_hasResponse = true; //_coordinate = res.Features[0].Center; //Response = res; //if (OnGeocoderResponse != null) //{ // OnGeocoderResponse(this, EventArgs.Empty); //} }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { _hasResponse = true; if (null == res) { //_inputField.text = "no geocode response"; } else if (null != res.Features && res.Features.Count > 0) { var center = res.Features[0].Center; //_inputField.text = string.Format("{0},{1}", center.x, center.y); _coordinate = res.Features[0].Center; } Response = res; //OnGeocoderResponse(res); dungeonsUpdated[dungeonsUpdated.Count - 1].Lat = _coordinate.x; dungeonsUpdated[dungeonsUpdated.Count - 1].Lon = _coordinate.y; ConvertDungeons(); }
void GeocodeInput_OnGeocoderResponse(ForwardGeocodeResponse response) { Cleanup(); FetchWorldData(_geocodeInput.Coordinate); }
private void SearchLocation_OnGeocoderResponse(ForwardGeocodeResponse response) { _resultsText.text = JsonConvert.SerializeObject(_searchLocation.Response, Formatting.Indented, JsonConverters.Converters); }
/// <summary> /// New search location has become available, begin a new _map query. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> private void SearchLocation_OnGeocoderResponse(ForwardGeocodeResponse response) { _map.Center = _searchLocation.Coordinate; _map.Update(); }
/// <summary> /// Start location geocoder responded, update start coordinates. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> void StartLocationGeocoder_OnGeocoderResponse(ForwardGeocodeResponse response) { _coordinates[0] = _startLocationGeocoder.Coordinate; //print("goofy"); }
/// <summary> /// End location geocoder responded, update end coordinates. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> void EndLocationGeocoder_OnGeocoderResponse(ForwardGeocodeResponse response) { _coordinates[1] = _endLocationGeocoder.Coordinate; }
void ForwardGeocoder_OnGeocoderResponse(ForwardGeocodeResponse response) { _camera.transform.position = _cameraStartPos; _map.Initialize(response.Features[0].Center, (int)_zoomSlider.value); }
void HandleGeocoderResponse(ForwardGeocodeResponse res) { base.HandleGeocoderResponse(res); }
/// <summary> /// Search location was changed. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> private void SearchLocation_OnGeocoderResponse(ForwardGeocodeResponse response) { Redraw(); }