New
Apps 6,233Makers 6,212This week 13
Promote your app−30%
MapMetrics GL JS screenshot 1
1views in
the last 30 days

MapMetrics GL JS

Open-source GL JS library for interactive vector maps

Built with Claude Code

by mapmetrics · Unclaimed · added Nov 3, 2026
no ratings0 comments

Mapmetrics Logo

Mapmetrics GL JS

The Maps API allows you to retrieve vector tiles generated by the MapMetrics. You can use some libraries like Leaflet or MapMetrics GL for JavaScript, Android or iOS to add a map to your website.

Getting Started

Using CDN

Include the JavaScript and CSS files in the <head> of your HTML file.

<link href="https://unpkg.com/@mapmetrics/mapmetrics-gl/dist/mapmetrics-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/@mapmetrics/mapmetrics-gl/dist/mapmetrics-gl.js"></script>

Include the following code in the <body> of your HTML file.

<div id="map" style="width: 400px; height: 300px;"></div>
<script>
    var map = new mapmetricsgl.Map({
        container: "map",
        style: `{accessToken}`, // stylesheet location
        center: [-74.5, 40], // starting position [lng, lat]
        zoom: 9, // starting zoom
    });
</script>

Using NPM Library

Install npm library

npm i @mapmetrics/mapmetrics-gl
import React, { useEffect, useRef } from "react";
import mapmetricsgl from "@mapmetrics/mapmetrics-gl";
import "@mapmetrics/mapmetrics-gl/dist/mapmetrics-gl.css";

const App = () => {
  const mapContainerRef = useRef<HTMLDivElement>(null);
  const mapRef = useRef<mapmetricsgl.Map | null>(null);

  const accessToken = ``;
  useEffect(() => {
    if (!mapContainerRef.current || mapRef.current) return;

    const map = new mapmetricsgl.Map({
      container: mapContainerRef.current,
      style: `${accessToken}`,
      center: [2.349902, 48.852966],
      zoom: 11,
      minZoom: 1,
      maxZoom: 24,
      attributionControl: false,
      cooperativeGestures: true,
    });

    mapRef.current = map;

    return () => {
      map.remove();
      mapRef.current = null;
    };
  }, []);

  return (
    <div
      id="map"
      ref={mapContainerRef}
      style={{ height: "100vh", width: "100%" }}
    ></div>
  );
};

export default App;

Enjoy the map!


Documentation

Full documentation for this library is available here.

Check out the features through examples

Description taken from the repository README.

Ratings

–
0 ratings
5 0
4 0
3 0
2 0
1 0

Rate this app

Sign in to rate

Comments 0

Sign in to comment

No comments yet.

Related apps

#maps · #webgl · #javascript