GithubHelp home page GithubHelp logo

charlieyqin / bing-maps-v8-typescript-definitions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/bing-maps-v8-typescript-definitions

0.0 2.0 0.0 716 KB

This project contains the TypeScript definitions for the Bing Maps V8 Web Control.

License: MIT License

TypeScript 98.78% JavaScript 1.22%

bing-maps-v8-typescript-definitions's Introduction

Bing Maps Logo

NuGet npm license

Bing Maps V8 TypeScript Definitions

These are the official TypeScript definitions for the Bing Maps V8 Web Control. These can be used to provide intellisense and richer error catching functionality to your IDE.

Bing Maps V8 Intellisense

How to get the definitions

Use the NuGet Package

Using the Bing Maps V8 TypeScript Definitions NuGet package will make it easy to both add the definitions to your project and to also keep them up to date.

If using Visual Studio, open the nuget package manager, select the Browse tab and search for "Bing Maps V8". This should reduce the list of results enough to fine the "Bing Maps V8 TypeScript Definitions" package. The owner of the package is bingmaps.

Alternatively, if you are using the nuget commandline:

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

Download definitions

Simply press the download button for this repository. Unzip the downloaded file, and copy the scripts 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.

/// <reference path="scripts/MicrosoftMaps/CustomMapStyles.d.ts" />
/// <reference path="scripts/MicrosoftMaps/Microsoft.Maps.d.ts" />

If you want to also use some of the Bing Maps modules, you can either update the above reference to the following:

/// <reference path="scripts/MicrosoftMaps/Microsoft.Maps.All.d.ts" />

or you can add a reference to the individual module definitions.

Module Path
Autosuggest scripts/MicrosoftMaps/Modules/Autosuggest.d.ts
Clustering scripts/MicrosoftMaps/Modules/Clustering.d.ts
Contour scripts/MicrosoftMaps/Modules/Contour.d.ts
Data Binning scripts/MicrosoftMaps/Modules/DataBinning.d.ts
Directions scripts/MicrosoftMaps/Modules/Directions.d.ts
Drawing Tools scripts/MicrosoftMaps/Modules/DrawingTools.d.ts
GeoJson scripts/MicrosoftMaps/Modules/GeoJson.d.ts
Heat Map Layer scripts/MicrosoftMaps/Modules/HeatMapLayer.d.ts
Search scripts/MicrosoftMaps/Modules/Search.d.ts
Spatial Data Services scripts/MicrosoftMaps/Modules/SpatialDataServices.d.ts
Spatial Math scripts/MicrosoftMaps/Modules/SpatialMath.d.ts
Traffic scripts/MicrosoftMaps/Modules/Traffic.d.ts
Well Known Text scripts/MicrosoftMaps/Modules/WellKnownText.d.ts

Screenshots

The following shows the intellisense for events. Notice how a list of the supported events are displayed, thus saving you from having to go back to documentation to verify the correct event name. Also notice how the structure of the event argument is known and you can easily access its properties.

Bing Maps V8 Event Intellisense

The following shows the intellisense for adding modules. A list of the supported modules appears, saving you from having to go looking for the correct name/spelling used in Bing Maps V8.

Bing Maps V8 Load Module Intellisense

Q & A

  • Q: When will new Bing Maps features be added to these definitions.
    • A: New features will be added to the definitions when they have graduated out of the experimental branch and into the main release branch of V8. This will often be done in parallel with MSDN documentation updates. A list of new features can be found in the release notes here.

Contributing

We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.

You can reach out to us anytime with questions and suggestions using our communities below:

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

License

MIT

See License for full license text.

Related Projects

Additional Resources

bing-maps-v8-typescript-definitions's People

Contributors

rbrundritt avatar kb3eua avatar msftgits avatar vivienchevallier avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.