Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

[POI] Use Foursquare best photo with specified dimensions #1158

Merged
merged 2 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@
{
"type": "Image",
"size": "auto",
"height": "240px",
"width": "380px",
"horizontalAlignment": "center",
"url": "{PointOfInterestImageUrl}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@
{
"type": "Image",
"size": "auto",
"height": "240px",
"width": "380px",
"horizontalAlignment": "center",
"url": "{PointOfInterestImageUrl}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@
{
"text": "Which one?",
"speak": "Which one?"
},
{
"text": "One of these?",
"speak": "One of these?"
}
],
"inputHint": "expectingInput"
Expand Down Expand Up @@ -277,8 +281,8 @@
"PromptForCurrentLocation": {
"replies": [
{
"text": "What address are you at?",
"speak": "What address are you at?"
"text": "What's your address?",
"speak": "What's your address?"
},
{
"text": "Where are you? Try providing a city or address.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public PointOfInterestModel(Venue foursquarePoi)
? foursquarePoi.Id
: Id;
PointOfInterestImageUrl = !string.IsNullOrEmpty(foursquarePoi.BestPhoto?.AbsoluteUrl)
? foursquarePoi.BestPhoto?.AbsoluteUrl
? $"{foursquarePoi.BestPhoto?.Prefix}440x240{foursquarePoi.BestPhoto?.Suffix}"
: PointOfInterestImageUrl;
Name = !string.IsNullOrEmpty(foursquarePoi.Name)
? foursquarePoi.Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed class AzureMapsGeoSpatialService : IGeoSpatialService
private static readonly string FindAddressByCoordinateUrl = $"https://atlas.microsoft.com/search/address/reverse/json?api-version=1.0&query={{0}},{{1}}";
private static readonly string FindNearbyUrl = $"https://atlas.microsoft.com/search/nearby/json?api-version=1.0&lat={{0}}&lon={{1}}&radius={{2}}&limit={{3}}";
private static readonly string FindByCategoryUrl = $"https://atlas.microsoft.com/search/poi/category/json?api-version=1.0&query={{2}}&lat={{0}}&lon={{1}}&radius={{3}}&limit={{4}}";
private static readonly string ImageUrlByPoint = $"https://atlas.microsoft.com/map/static/png?api-version=1.0&layer=basic&style=main&zoom={{2}}&center={{1}},{{0}}&width=380&height=240";
private static readonly string ImageUrlByPoint = $"https://atlas.microsoft.com/map/static/png?api-version=1.0&layer=basic&style=main&zoom={{2}}&center={{1}},{{0}}&width=440&height=240";
private static readonly string GetRouteDirections = $"https://atlas.microsoft.com/route/directions/json?&api-version=1.0&instructionsType=text&query={{0}}";
private static readonly string GetRouteDirectionsWithRouteType = $"https://atlas.microsoft.com/route/directions/json?&api-version=1.0&instructionsType=text&query={{0}}&&routeType={{1}}";
private static string apiKey;
Expand Down