Example #1
0
 /// <summary>
 /// Handles the geocoder response by updating coordinates and notifying observers.
 /// </summary>
 /// <param name="res">Res.</param>
 void HandleGeocoderResponse(ReverseGeocodeResponse res)
 {
     _hasResponse = true;
     Response     = res;
     if (OnGeocoderResponse != null)
     {
         OnGeocoderResponse(this, EventArgs.Empty);
     }
 }
Example #2
0
        public void SerializesAndDeserializesReverse()
        {
            // First, deserialize the example response
            ReverseGeocodeResponse reverseResp = _geocoder.Deserialize <ReverseGeocodeResponse>(_reverseResponse);

            // Then deserialize it back to a string.
            string reverseReserialized = JsonConvert.SerializeObject(reverseResp, JsonConverters.Converters);

            // Ensure the two match
            Assert.AreEqual(_reverseResponse, reverseReserialized);
        }
 private void HandleGeocoderResponse(ReverseGeocodeResponse res)
 {
     Address = res.Features[0].PlaceName;
 }
Example #4
0
 void HandleGeocoderResponse(ReverseGeocodeResponse res)
 {
     _output.text = res.Features[0].PlaceName;
     Debug.Log(_output.text);
 }