Yandex Maps on-demand promise-based widget loader.
- Appends Yandex Maps API script to the document body.
- Returns a promise which resolves as soon as the script has loaded and the API is ready.
This way the widget doesn’t load until it’s needed to decrease page load time.
Install from the command line:
npm install ymaps
Use in your code to load the widget:
To use another language simply pass a valid
Running the tests
loadparameter, except when it's set to
package.fullis causing an error "TypeError: s is not a constructor". To reproduce, try to pass
ymaps.loadin the example above. PR is welcome!
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE file for details.