npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mapconductor/react-for-maptiler

v0.1.3

Published

MapTiler provider for MapConductor React SDK

Readme

@mapconductor/react-for-maptiler

MapTiler provider for the MapConductor React SDK. Renders a MapTiler Cloud map (via MapLibre GL JS) through MapConductor's provider-independent camera, marker, and overlay API, so the same application code can also run on Google Maps, MapLibre, Mapbox, Leaflet, OpenLayers, ArcGIS, Cesium, HERE, or TomTom.

Installation

npm install @mapconductor/react-for-maptiler @mapconductor/js-sdk-core @mapconductor/js-sdk-react

maplibre-gl (v6) is bundled as a dependency and does the actual rendering.

API key

MapTiler tiles require a MapTiler Cloud API key. Pass it to the view state:

const state = useMapTilerViewState({
  apiKey: import.meta.env.VITE_MAPTILER,
  mapDesignType: MapTilerDesign.Streets,
  cameraPosition,
});

Usage

import {
  MapTilerDesign,
  MapTilerMapView2D,
  useMapTilerViewState,
} from '@mapconductor/react-for-maptiler';
import '@mapconductor/react-for-maptiler/style.css';
import { MapCameraPosition, createGeoPoint } from '@mapconductor/js-sdk-core';

function Map() {
  const state = useMapTilerViewState({
    apiKey: import.meta.env.VITE_MAPTILER,
    mapDesignType: MapTilerDesign.Streets,
    cameraPosition: MapCameraPosition.create({
      position: createGeoPoint({ latitude: 35.6812, longitude: 139.7671 }),
      zoom: 11,
    }),
  });

  return <MapTilerMapView2D state={state} />;
}

Bundler setup (MapLibre GL JS v6)

MapTiler renders through MapLibre GL JS. MapLibre GL JS v6 is ESM-only and loads its Web Worker from a URL. With a bundler (Vite, webpack, esbuild, Rollup) that URL must be registered once, before the first map is created. This package re-exports maplibre's setWorkerUrl as setMapTilerWorkerUrl so you can do it without importing maplibre-gl directly — useful when you depend on @mapconductor/react-for-maptiler alone:

// Vite
import { setMapTilerWorkerUrl } from '@mapconductor/react-for-maptiler';
import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url';

setMapTilerWorkerUrl(workerUrl);
// webpack 5+ / esbuild / Rollup (after copying the worker next to your bundle)
import { setMapTilerWorkerUrl } from '@mapconductor/react-for-maptiler';

setMapTilerWorkerUrl(new URL('maplibre-gl/dist/maplibre-gl-worker.mjs', import.meta.url).toString());

In many setups (e.g. Vite) MapLibre GL v6 resolves the worker automatically and this call is unnecessary. It is also redundant if you already register the worker through @mapconductor/react-for-maplibre in the same app: both share the single deduped maplibre-gl instance, so one registration covers both. For SSR with Vite, add maplibre-gl to ssr.noExternal so the worker-URL import resolves through Vite.

Available designs

MapTilerDesign exposes MapTiler Cloud reference styles, mirroring the android MapTilerDesign: Streets, StreetsDark, StreetsLight, Basic, Bright, Satellite, Outdoor, Winter, Topo, Toner, Dataviz, Backdrop, Ocean, Landscape, Aquarelle, OpenStreetMap.

License

Apache-2.0