Maps SDK with TypeScript

Create a map with the TypeScript-based SDK. Take advantage of code completion, type safety, accurately documented, and backward compatibility. Get your project done faster with fewer typos and mistakes, no more worrying about API endpoint changes and their impact on your code.

You can pick from a large selection of bundlers and always find the best solution for your project. Whether you prefer Parcel, Webpack, Rollup, Turbopack or anything else

  1. Create a <div> element with a certain id where you want your map to be.

    Add <div> tag into your page. This div will be the container where the map will be loaded.

  2. Include the following code in your TypeScript app.ts file.

  3. Replace YOUR_MAPTILER_API_KEY_HERE with your actual MapTiler API key.

  4. Create the map containter style. Add the map containter style to you stylesheet style.css. The div must have non-zero height. In this case we are going to make a fullscreen map.

Check out the tutorial How to create a map with TypeScript and Parcel.

An extension of MapLibre GL JS