-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MapsSearchClient.cs #47252
base: main
Are you sure you want to change the base?
Update MapsSearchClient.cs #47252
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
|
@@ -505,7 +506,7 @@ | |
{ | ||
return null; | ||
} | ||
|
||
//bybytvyvy | ||
foreach (GeocodingQuery query in queries) | ||
{ | ||
GeocodingBatchRequestItem item = new GeocodingBatchRequestItem(); | ||
|
@@ -518,6 +519,11 @@ | |
{ | ||
item.BoundingBox = new GeoBoundingBox(query.BoundingBox.West, query.BoundingBox.South, query.BoundingBox.East, query.BoundingBox.North); | ||
} | ||
if(item.Query == item.CountryRegion) | ||
{ | ||
item.Query = new GeoPosition(Convert.ToDouble(query.Coordinates?.Longitude + query.Locality), Convert.ToDouble(query.Coordinates?.Latitude + query.Locality)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
} | ||
if (query.LocalizedMapView != null) | ||
{ | ||
item.View = query.LocalizedMapView.ToString(); | ||
|
@@ -533,7 +539,7 @@ | |
item.PostalCode = query.PostalCode; | ||
items.Add(item); | ||
} | ||
return new GeocodingBatchRequestBody(items); | ||
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET60_PackageRef_Debug)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET60_PackageRef_Debug)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Analyze)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Analyze)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Analyze)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Analyze)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET80_ProjectRef_Release)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET80_ProjectRef_Release)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test MacOS_NET60_PackageRef_Debug)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test MacOS_NET60_PackageRef_Debug)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test MacOS_NET80_ProjectRef_Release)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test MacOS_NET80_ProjectRef_Release)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542
|
||
} | ||
} | ||
} | ||
Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET60_PackageRef_Debug)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545
Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Analyze)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545
Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET80_ProjectRef_Release)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545
Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test MacOS_NET60_PackageRef_Debug)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545
Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs Azure Pipelines / net - maps - ci (Build Test MacOS_NET80_ProjectRef_Release)sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?