Bing Maps APIs
De Banane Atomic
Aller à la navigationAller à la recherche
Get a Static Map
https://dev.virtualearth.net/REST/v1/Imagery/imagerySet/centerPoint/zoomLevel?
imagerySet | Type d'image de carte: Road |
centerPoint | Un Point (latitude and longitude) 47.610,-122.107 |
zoomLevel | 0 - 21 |
mapSize | largeur(80-2000px),hauteur(80-1500px) |
pp | pushpin (punaise): latitude,longitude;iconStyle;label pp=47.610,-122.107;21;Mon%20Label |
key | Bing Maps Key |
Getting a Bing Maps Key
- Creating a Bing Maps Account
- Générer une nouvelle clé
BingMapsRESTToolkit: bibliothèque .NET
var imageryRequest = new ImageryRequest() { CenterPoint = new Coordinate(46.223774, 6.107064), ZoomLevel = 15, MapWidth = 302, MapHeight = 226, ImagerySet = ImageryType.Road, Pushpins = new List<ImageryPushpin>() { new ImageryPushpin() { Location = new Coordinate(46.223774, 6.107064), IconStyle = 21, Label = "Office" } }, BingMapsKey = "xxx" }; string url = imageryRequest.GetRequestUrl(); Response response = await imageryRequest.Execute(); |
URL site carte Bing
// FormattableString.Invariant pour conversion des nombres en string en utilisant des . comme séparateur décimal var linkUrl = FormattableString.Invariant($"https://www.bing.com/maps?cp={latitude}~{longitude}&lvl=17&sp=point.{latitude}_{longitude}_My%20Label"); |