sanderdesnaijer / map-gesture-controls
PublicLightweight JavaScript library for adding touch gestures (pinch-to-zoom, pan) to interactive web maps
Browser-based JavaScript library for controlling OpenLayers maps using hand gestures detected via webcam with MediaPipe hand tracking.
How It Works
You find a fun demo where a map moves just by waving your hands in front of a webcam, perfect for touchless kiosks or easy access.
You copy a few lines of ready-made instructions into your map page to bring the hand controls to life.
Your existing map or a simple world map appears on the screen, ready for hands-free adventure.
Tap a button to wake up the webcam preview in the corner, grant permission, and watch it track your hands instantly.
Hold a fist with your left hand to pan, right hand to zoom up or down, or both to rotate – it feels natural after a quick try.
Move the small camera window to a corner, adjust size or fade it, so it doesn't block your map view.
Your map dances to your gestures smoothly, ideal for exhibits, presentations, or anyone wanting touchless fun!
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.