explaingit

sanderdesnaijer/map-gesture-controls

Analysis updated 2026-05-18

96TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A JavaScript library that lets people pan, zoom, and rotate web maps using webcam-tracked hand gestures instead of a mouse or touchscreen.

Mindmap

mindmap
  root((Map Gesture Controls))
    What it does
      Tracks hands via webcam
      Pans zooms rotates map
      Runs fully in browser
    Tech stack
      TypeScript
      WebAssembly
      MediaPipe
    Use cases
      Kiosk installations
      Museum exhibits
      Touchless accessibility
    Audience
      Developers
      Map builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add touchless gesture controls to an existing web map for a kiosk

USE CASE 2

Build accessible, hands-free map interfaces for museum exhibits

USE CASE 3

Let users pan and zoom a map with fist or pinch gestures

USE CASE 4

Integrate gesture controls into an OpenLayers, Google Maps, or Leaflet app

What is it built with?

TypeScriptWebAssemblyMediaPipeOpenLayersGoogle MapsLeaflet

How does it compare?

sanderdesnaijer/map-gesture-controlsardupilot/node-mavlinknickustinov/itsyconnect-macos
Stars969696
LanguageTypeScriptTypeScriptTypeScript
Last pushed2025-08-26
MaintenanceQuiet
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

The start() call must be triggered by a user action to satisfy browser camera permission rules.

In plain English

Map Gesture Controls is a JavaScript library that lets users navigate web maps using hand gestures detected through their webcam, with no mouse or touch screen required. The hand tracking runs entirely inside the browser using WebAssembly (a technology that lets high-performance code run in the browser without a server), so no video data ever leaves the user's device. The gesture mapping is straightforward: making a fist or pinch with your left hand pans the map (moves it around), doing the same with your right hand zooms in and out based on vertical movement, and using both hands simultaneously rotates the map. Users can choose between fist or pinch gestures for each action, whichever feels more comfortable. The library supports three popular web mapping tools: OpenLayers, Google Maps, and Leaflet. Each has its own package that integrates directly with that map's API, so adding gesture controls to an existing map takes only a few lines of code, create a GestureMapController, pass in your existing map object, and call start() (which must be triggered by a user action to satisfy browser security requirements for camera access). The technology uses MediaPipe, a hand-tracking toolkit by Google, which detects 21 points on each hand in three dimensions from each video frame. This information is then classified into gesture states and translated into smooth map movement commands, with smoothing and debounce filters to prevent jittery behavior. This is particularly useful for kiosk installations, museum exhibits, and accessibility use cases where touchless interaction is valuable. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Add Map Gesture Controls to my Leaflet map with a GestureMapController
Prompt 2
Show me how MediaPipe hand tracking translates into pan, zoom, and rotate in this library
Prompt 3
Set up touchless gesture navigation for a kiosk using Map Gesture Controls and Google Maps
Prompt 4
Explain how Map Gesture Controls keeps webcam video from ever leaving the device

Frequently asked questions

What is map-gesture-controls?

A JavaScript library that lets people pan, zoom, and rotate web maps using webcam-tracked hand gestures instead of a mouse or touchscreen.

What language is map-gesture-controls written in?

Mainly TypeScript. The stack also includes TypeScript, WebAssembly, MediaPipe.

How hard is map-gesture-controls to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is map-gesture-controls for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.