in CSharp/BotBuilderLocation/Azure/AzureMapsSpatialService.cs [44:80]
public string GetLocationMapImageUrl(Bing.Location location, int? index = null)
{
if (location == null)
{
throw new ArgumentNullException(nameof(location));
}
var point = location.Point;
if (point == null)
{
throw new ArgumentNullException(nameof(point));
}
int zoom = 15;
if (location.BoundaryBox != null && location.BoundaryBox.Count >= 4)
{
LatLng center;
CalculateMapView(location.BoundaryBox, 500, 280, 0, out center, out zoom);
point.Coordinates = new List<double>()
{
center.Latitude, center.Longitude
};
}
string imageUrl = string.Format(
CultureInfo.InvariantCulture,
ImageUrlByPoint,
point.Coordinates[0],
point.Coordinates[1],
zoom,
this.apiKey);
return GetMapImage(imageUrl, index.ToString());
}