Skip to content

Designed to provide a slightly more user-friendly UX for webpages with embeded Google Maps. Essentially, it "locks" the panning and other map control events (on scroll or swipe) for Google Maps when embedded on a webpage for both desktop and mobile devices. At the user's discretion, an onClick/Touch event will unlock the map allowing them to acc…

License

Notifications You must be signed in to change notification settings

dmcclintock/google-maps-pan-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

google-maps-pan-lock

This plugin is designed to provide a slightly more user-friendly UX for webpages with embeded Google Maps. Essentially, it "locks" the panning and other map control events (on scroll or swipe) for Google Maps when embedded on a webpage for both desktop and mobile devices. At the user's discretion, an onClick/Touch event will unlock the map allowing them to access map controls (pan, zoom, etc.). The map will return to it's initial "locked" state when map control is no longer desired, in order to prevent users from getting stuck in mapland.

Name: Google Maps Pan Lock
Author: Daniel McClintock
Author URI: http://about.me/McClintock
Version: v0.1.2
Updated: 08-29-2014

TODO:

Plugin Options

  • API Key - Text Input (Link to Instructions)
  • Zoom Level - Dropdown (default to 10)
  • Map Type - Dropdown (roadmap/terrain/hybrid)
  • Coordinates - Address lookup, populates lat/long text inputs using Geocoding API (see this and this)
  • Styles - Add this later

DEPENDENCIES

- Google Maps API (requires Dev API key)
- jQuery

VERSION HISTORY

v0.1.0
- Rudamentary integration, with button interface to control relocking the map
- Implemented at https://3dadisplay.com/contact-3da-display/

v0.1.2
- Tightened up jQuery (props to @jGoslinga)
- Semantic HTML and cleaner code

About

Designed to provide a slightly more user-friendly UX for webpages with embeded Google Maps. Essentially, it "locks" the panning and other map control events (on scroll or swipe) for Google Maps when embedded on a webpage for both desktop and mobile devices. At the user's discretion, an onClick/Touch event will unlock the map allowing them to acc…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published