These are the official TypeScript definitions for the Bing Maps V8 SDK. These can be used to provide intellisense and rich error detection to your IDE.
npm install bingmaps!Bing Maps Logo



PM> Install-Package Microsoft.BingMaps.V8.TypeScript
`
Install npm package
Using the Bing Maps V8 TypeScript npm package is another easy way to add the definitions to your project and keep them up to date.
`
npm install -g bingmaps
`
Use DefinitelyTyped
Use DefinitelyTyped version of these definitions via npm:
`
npm install --save @types/bingmaps
`
Download definitions
Simply press the download button for this repository. Unzip the downloaded file, and copy the _types_ folder into your project. Note that you will need to do this process again from time to time if you want to have the most recent definitions. This should only be needed if you want to use newer features or if bugs in the definitions have been corrected.
Usage ##
If using Visual Studio, you can add a reference to the core Bing Maps V8 functionality by adding the following to the top of your TypeScript file.
`
///
///
`
If you want to also use some of the Bing Maps modules, you can either update the above reference to the following:
`
///
`
or you can add a reference to the individual module definitions.
| Module | Path |
|---------------------------------------------------------------------------------|----------------------------------------------------------|
| Autosuggest | types/MicrosoftMaps/Modules/Autosuggest.d.ts |
| Clustering | types/MicrosoftMaps/Modules/Clustering.d.ts |
| Contour | types/MicrosoftMaps/Modules/Contour.d.ts |
| Data Binning | types/MicrosoftMaps/Modules/DataBinning.d.ts |
| Directions | types/MicrosoftMaps/Modules/Directions.d.ts |
| Drawing Tools | types/MicrosoftMaps/Modules/DrawingTools.d.ts |
| GeoJSON | types/MicrosoftMaps/Modules/GeoJson.d.ts |
| GeoXml | types/MicrosoftMaps/Modules/GeoXml.d.ts |
| Heat Map Layer | types/MicrosoftMaps/Modules/HeatMapLayer.d.ts |
| Search | types/MicrosoftMaps/Modules/Search.d.ts |
| Spatial Data Services | types/MicrosoftMaps/Modules/SpatialDataServices.d.ts |
| Spatial Math | types/MicrosoftMaps/Modules/SpatialMath.d.ts |
| Traffic | types/MicrosoftMaps/Modules/Traffic.d.ts |
| Well Known Text | types/MicrosoftMaps/Modules/WellKnownText.d.ts |
Note:
This project is just TypeScript definitions and not actual API code. You will need to add a script reference to the Bing Maps V8 Web Control in your application to load the functional API. For example:
`
``