This application requires JavaScript.
maps for javascript

JavaScript maps, the boring infra part sorted.

For a static HTML page, the script-tag path is the fastest: include maplibre-gl from a CDN, call new maplibregl.Map({...}) after DOMContentLoaded. No bundler.

install
<!-- index.html --> <link href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" /> <script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
html
<script>
  const MAP_STYLE = 'https://maps.guru/api/v1/styles/standard/light/style.json?key=YOUR_API_KEY';

  document.addEventListener('DOMContentLoaded', () => {
    const map = new maplibregl.Map({
      container: 'map-canvas',
      style: MAP_STYLE,
      center: [77.209, 28.6139],
      zoom: 11,
      hash: true,
    });

    map.addControl(new maplibregl.NavigationControl());

    new maplibregl.Marker()
      .setLngLat([77.209, 28.6139])
      .setPopup(new maplibregl.Popup().setText('New Delhi'))
      .addTo(map);
  });
</script>

<style>
  #map-canvas { width: 100%; height: 480px; }
</style>

<div id="map-canvas"></div>
live · JavaScript preview

Why JavaScript teams ship on maps.guru

Free-tier generous enough for real production traffic. 50,000 tile requests/month , no credit card.

  • Zero build. Perfect for static sites, landing pages, and prototypes.
  • Pulls from a CDN; ships the WebGL2 context straight to the browser.
  • Same maplibre-gl API as the npm package.

Frequently asked

Ready to build with
beautiful basemaps?

Join developers worldwide who trust maps.guru for their mapping needs. Start free, no credit card required.

Contact us
Free forever plan
5-minute setup
No credit card