Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 7 additions & 1 deletion sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs
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.

Expand Down Expand Up @@ -505,7 +506,7 @@
{
return null;
}

//bybytvyvy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

foreach (GeocodingQuery query in queries)
{
GeocodingBatchRequestItem item = new GeocodingBatchRequestItem();
Expand All @@ -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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query.Locality is a string for characters, not a string number. I believe this won't work.

}
}
if (query.LocalizedMapView != null)
{
item.View = query.LocalizedMapView.ToString();
Expand All @@ -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

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET60_PackageRef_Debug)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,13): Error CS1519: Invalid token 'return' in class, record, struct, or interface member declaration

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET60_PackageRef_Debug)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,55): Error CS1001: Identifier expected

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Analyze)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,13): Error CS1519: Invalid token 'return' in class, record, struct, or interface member declaration

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Analyze)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,13): Error CS1519: Invalid token 'return' in class, record, struct, or interface member declaration

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Analyze)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,55): Error CS1001: Identifier expected

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Analyze)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,55): Error CS1001: Identifier expected

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET80_ProjectRef_Release)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,13): Error CS1519: Invalid token 'return' in class, record, struct, or interface member declaration

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET80_ProjectRef_Release)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,55): Error CS1001: Identifier expected

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test MacOS_NET60_PackageRef_Debug)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,13): Error CS1519: Invalid token 'return' in class, record, struct, or interface member declaration

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test MacOS_NET60_PackageRef_Debug)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,55): Error CS1001: Identifier expected

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test MacOS_NET80_ProjectRef_Release)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,13): Error CS1519: Invalid token 'return' in class, record, struct, or interface member declaration

Check failure on line 542 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test MacOS_NET80_ProjectRef_Release)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L542

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(542,55): Error CS1001: Identifier expected
}
}
}

Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET60_PackageRef_Debug)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(545,1): Error CS1022: Type or namespace definition, or end-of-file expected

Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Analyze)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(545,1): Error CS1022: Type or namespace definition, or end-of-file expected

Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test Ubuntu2004_NET80_ProjectRef_Release)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(545,1): Error CS1022: Type or namespace definition, or end-of-file expected

Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test MacOS_NET60_PackageRef_Debug)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(545,1): Error CS1022: Type or namespace definition, or end-of-file expected

Check failure on line 545 in sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs

View check run for this annotation

Azure Pipelines / net - maps - ci (Build Test MacOS_NET80_ProjectRef_Release)

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs#L545

sdk/maps/Azure.Maps.Search/src/MapsSearchClient.cs(545,1): Error CS1022: Type or namespace definition, or end-of-file expected
Loading