This documentation provides setup guide for ola maps web
SDK v2 only.
For the older setup guide for Web SDK v1, please refer to the
Web SDK v1 setup guide.
Setup
There are two ways to setup the Ola Maps Web SDK:
- Use directly from a CDN (Content Delivery Network)
- Using Package Manager
Use directly from a CDN (Content Delivery Network)
Inject the minified script into your app using script tag
Using Package Manager
Install via npm
Import the
OlaMaps class in your code
Initialization
Get
Api Key from credentials and initialize
OlaMapsCall
init method to render the map
If you encounter any issues while integrating the SDK, please report them on our
GitHub Issues page.
Example
If you want to render multilingual maps in local languages, check the languages we support in style json in vector map tiles APIs. You need to add
-[LANGUAGE CODE] to
styleName.
To initialize 3d maps, we need to use additional parameter 'mode' and need to give the tileset endpoint.