Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 549cf89

Browse files
Vladimir LapacekVladimir Lapacek
authored andcommitted
Fixing space formatting
- space formatting in GoogleAddress - space formatting in GoogleGeocoder - added public getter for PlaceId
1 parent bcfc3da commit 549cf89

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Google/GoogleAddress.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class GoogleAddress : Address
1010
readonly GoogleAddressComponent[] components;
1111
readonly bool isPartialMatch;
1212
readonly GoogleViewport viewport;
13-
readonly string place_id;
13+
readonly string placeId;
1414

1515
public GoogleAddressType Type
1616
{
@@ -37,13 +37,18 @@ public GoogleViewport Viewport
3737
get { return viewport; }
3838
}
3939

40+
public string PlaceId
41+
{
42+
get { return placeId; }
43+
}
44+
4045
public GoogleAddressComponent this[GoogleAddressType type]
4146
{
4247
get { return Components.FirstOrDefault(c => c.Types.Contains(type)); }
4348
}
4449

4550
public GoogleAddress(GoogleAddressType type, string formattedAddress, GoogleAddressComponent[] components,
46-
Location coordinates, GoogleViewport viewport, bool isPartialMatch, GoogleLocationType locationType, string place_id)
51+
Location coordinates, GoogleViewport viewport, bool isPartialMatch, GoogleLocationType locationType, string placeId)
4752
: base(formattedAddress, coordinates, "Google")
4853
{
4954
if (components == null)
@@ -54,7 +59,7 @@ public GoogleAddress(GoogleAddressType type, string formattedAddress, GoogleAddr
5459
this.isPartialMatch = isPartialMatch;
5560
this.viewport = viewport;
5661
this.locationType = locationType;
57-
this.place_id = place_id;
62+
this.placeId = placeId;
5863
}
5964
}
6065
}

Google/GoogleGeocoder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private IEnumerable<GoogleAddress> ParseAddresses(XPathNodeIterator nodes)
353353
XPathNavigator nav = nodes.Current;
354354

355355
GoogleAddressType type = EvaluateType((string)nav.Evaluate("string(type)"));
356-
string place_id = (string)nav.Evaluate("string(place_id)");
356+
string placeId = (string)nav.Evaluate("string(place_id)");
357357
string formattedAddress = (string)nav.Evaluate("string(formatted_address)");
358358

359359
var components = ParseComponents(nav.Select("address_component")).ToArray();
@@ -377,7 +377,7 @@ private IEnumerable<GoogleAddress> ParseAddresses(XPathNodeIterator nodes)
377377
bool isPartialMatch;
378378
bool.TryParse((string)nav.Evaluate("string(partial_match)"), out isPartialMatch);
379379

380-
yield return new GoogleAddress(type, formattedAddress, components, coordinates, viewport, isPartialMatch, locationType, place_id);
380+
yield return new GoogleAddress(type, formattedAddress, components, coordinates, viewport, isPartialMatch, locationType, placeId);
381381
}
382382
}
383383

0 commit comments

Comments
 (0)