The startng point for this project was the Vanilla TS sample project listed on the ViteJS guide page.
Then, we install Maptiler SDK:
npm install @maptiler/sdk
The main difference from the Vite boilerplate is in the tsconfig.json
file of the project, where we set the property "moduleResolution"
to "node"
instead of "bundler"
. You can read more about this property on TypeScript website.
Then don't forget to replace the MapTiler API key with your own in the file src/main.ts
. Get one for free with a generous plan here https://cloud.maptiler.com/.
Find tons of examples on our SDK page!