Ola Map SDK

Installation

How to install and set up the Ola Map SDK

Installation Guide

This guide will help you install and set up the Ola Map SDK in your Node.js project.

Installation

Using npm

Install the SDK using npm:

npm install ola-map-sdk

Using yarn

Alternatively, you can use yarn:

yarn add ola-map-sdk

Next Steps

Now that you have the SDK installed, you'll need to:

  1. Get your API key - Obtain your Ola Maps API key
  2. Initialize the client - Create your first API client instance
  3. Explore the API - Learn about available endpoints

Optional: MapLibre GL Integration

If you plan to display maps, you'll also need MapLibre GL:

npm install maplibre-gl

Learn more about displaying maps with MapLibre.

Troubleshooting

Installation Issues

If you encounter installation issues:

  1. Clear your npm cache: npm cache clean --force
  2. Delete node_modules and package-lock.json
  3. Reinstall: npm install

Version Compatibility

Make sure you're using compatible versions:

# Check your Node.js version
node --version

# Check installed SDK version
npm list ola-map-sdk

TypeScript Support

While the SDK is written in JavaScript, you can use it in TypeScript projects:

// @ts-ignore
import OlaMapsClient from 'ola-map-sdk';
// or
const OlaMapsClient = require('ola-map-sdk');

TypeScript type definitions are planned for a future release.

On this page