Design Google Maps on the web: map tiles, pan and zoom, viewport loading, search and directions
Problem
Design the web version of a map product like Google Maps (maps.google.com) or OpenStreetMap's website. Users can:
- see a map of the whole world and zoom smoothly from continents down to individual buildings;
- pan by dragging, zoom with the wheel, a trackpad pinch, a touch pinch, double click or the keyboard;
- search for a place or address with suggestions as they type, and see results as pins and in a list;
- get directions between two places, see one or more routes drawn on the map, and read the steps;
- share a link that opens the same place at the same zoom;
- keep a saved area working when the connection is poor or gone.
Ref. UR-1468 · © UIRound · uiround.com/questions/design-google-maps-on-the-web-map-tiles-pan-and-zoom-viewport-loading-search-and-directions
Unlock this question
The full problem and its complete answer are part of Pro.
- 2
- code listings
- 5
- follow-up questions
What's inside
- The full problem, with examples
- Step-by-step
- Requirements
- Architecture
- Data model and state
- Key flows and trade-offs
- Performance and reliability
- Follow-up questions
- Card worldwide
- UPI and net banking in India
- One-time payment, nothing renews
Stuck? Take a hint
- 1Start with the tile pyramid: the world in Web Mercator, split into z/x/y tiles. Decide raster or vector tiles first, because it changes rendering, labels, styling and caching.
Practise this round first
Work through the steps of a design framework on a 45-minute clock, writing notes as you would say them out loud. The model answer stays hidden until you finish, then you check your design against 8 checkpoints.
Requirements, Architecture, Data model, Interface, Optimizations. The common choice for frontend rounds. How it works
Private, and saved in this browser as you type. All your notes are on My lists.