Skip to content

RedYetiDev/bingmaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caution

The following notice must be thoroughly read and understood before using this package.

This repository was made for education purposes, and follows the guidelines outlined in the Bing Maps API Documentation. I, the author of this repository, am not affiliated with Microsoft in any way, shape, or form. I do not own the Bing Maps API, nor do I claim to. I am not responsible for any damages caused by the use of this repository. Use at your own risk.

Microsoft, if you are viewing this package and would like it removed, I am here to oblige. Please contact me at redyetidev@gmail.com. Thank you.

Bing Maps API

The Bing Maps API provides a powerful set of features for working with maps, directions, places, and vector tiles. This README.md file guides you through the installation and initialization process to get started with the Bing Maps API.

Installation

To use the Bing Maps API in your project, follow these installation steps:

  1. Install the Bing Maps API package via npm:

    npm install bingmaps-api

    This command installs the necessary dependencies and sets up the Bing Maps API package in your project.

  2. Include the Bing Maps API in your project:

    import BingMapsAPI from 'bingmaps-api';

    Now, you can use the BingMapsAPI class to access the functionality provided by the API.

Initialization

To initialize the Bing Maps API, follow these steps:

  1. Initialize the Bing Maps API:

    const bingMaps = await BingMapsAPI.instantiate();

    If you would like to use your own Bing Maps API key, you can pass it to the instantiate method:

    const bingMaps = await BingMapsAPI.instantiate("OPTIONAL_API_KEY");

    [!TIP] There is no difference between using your own API key and not using an API key. I suggest using your own API key if you plan on using the Bing Maps API in a commercial application, as supporting Microsoft by using their API key is a nice gesture.

  2. Start Using the API:

    Now that the Bing Maps API is initialized, you can start using its features. For example, you can work with maps, calculate directions, retrieve place information, and access vector tiles.

    // Example: Get a route between two waypoints
    const directions = bingMaps.Directions;
    const route = await directions.fromWaypoints(['47.6062100,-122.3320700', '45.523064,122.676483'], 'driving');
    
    // Example: Get information about a place
    const place = await bingMaps.Place.fromQuery('Space Needle, 400 Broad St, Seattle, WA, United States');
    console.log(`Place Name: ${place.name}`); // The Space Needle!
  3. Explore API Documentation:

    For detailed information about the available classes, methods, and properties, refer to the API.md file included with this package.

Now you are ready to explore and integrate the Bing Maps API into your project. Happy hacking mapping!

Important

This package is licensed under the MIT License.

About

A Node.JS Wrapper for the Bing Maps API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published