🏑 Home πŸ“– Chapter πŸ‘ˆ Prev πŸ‘‰ Next

⚑  GMapsBook.com is crafted by Jozef Sorocin (🟒 Book a consulting hour) and powered by:

Remember the last time you took a trip with Uber/Lyft/Bolt? Just as the trip ended, you probably got an email containing the receipt and trip summary. This trip summary then contained the route β€œscreenshot”:

Sample Uber trip summary

Sample Uber trip summary

The map β€œscreenshot” is what we call a static map.

In contrast to dynamic maps which you can zoom, pan, and move, static maps are image snapshots (GIF, PNG, or JPEG) of a given viewport.

<aside> πŸ”‘ As you remember from the chapter on map tiles, dynamic raster maps are themselves composed of styled image tiles. The Static API lets you request the very same tiles β€” on demand.

</aside>

In this chapter, you’ll learn how to leverage the Google Maps Static API to:

Scenario

For my ride-hailing app I’m working on an email that contains an image snapshot of the route. I’d like to visually differentiate between the origin and the destination. Plus, I need to make sure the map pins are correctly positioned:

A static map consistent with my brand displaying visually distinct markers

A static map consistent with my brand displaying visually distinct markers

Approach