Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Google/GoogleAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class GoogleAddress : Address
readonly GoogleAddressComponent[] components;
readonly bool isPartialMatch;
readonly GoogleViewport viewport;
readonly string place_id;

public GoogleAddressType Type
public GoogleAddressType Type
{
get { return type; }
}
Expand Down Expand Up @@ -42,7 +43,7 @@ public GoogleAddressComponent this[GoogleAddressType type]
}

public GoogleAddress(GoogleAddressType type, string formattedAddress, GoogleAddressComponent[] components,
Location coordinates, GoogleViewport viewport, bool isPartialMatch, GoogleLocationType locationType)
Location coordinates, GoogleViewport viewport, bool isPartialMatch, GoogleLocationType locationType, string place_id)
: base(formattedAddress, coordinates, "Google")
{
if (components == null)
Expand All @@ -53,6 +54,7 @@ public GoogleAddress(GoogleAddressType type, string formattedAddress, GoogleAddr
this.isPartialMatch = isPartialMatch;
this.viewport = viewport;
this.locationType = locationType;
}
this.place_id = place_id;
}
}
}
5 changes: 3 additions & 2 deletions Google/GoogleGeocoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ private IEnumerable<GoogleAddress> ParseAddresses(XPathNodeIterator nodes)
XPathNavigator nav = nodes.Current;

GoogleAddressType type = EvaluateType((string)nav.Evaluate("string(type)"));
string formattedAddress = (string)nav.Evaluate("string(formatted_address)");
string place_id = (string)nav.Evaluate("string(place_id)");
string formattedAddress = (string)nav.Evaluate("string(formatted_address)");

var components = ParseComponents(nav.Select("address_component")).ToArray();

Expand All @@ -376,7 +377,7 @@ private IEnumerable<GoogleAddress> ParseAddresses(XPathNodeIterator nodes)
bool isPartialMatch;
bool.TryParse((string)nav.Evaluate("string(partial_match)"), out isPartialMatch);

yield return new GoogleAddress(type, formattedAddress, components, coordinates, viewport, isPartialMatch, locationType);
yield return new GoogleAddress(type, formattedAddress, components, coordinates, viewport, isPartialMatch, locationType, place_id);
}
}

Expand Down