← Blog

August 19, 2026 · 6 min read

How to Add a Store Locator Map to Magento 2 Without a Google Maps API Key

Any merchant with physical retail locations eventually needs a "Find Our Stores" page. The default answer is a Google Maps embed — and the default answer comes with an API key, a billing account, and per-load charges that can turn into a surprise if that key ever leaks.

The Google Maps API key problem

A store locator needs a map, and for a long time the obvious choice was the Google Maps JavaScript API. The catch is that it requires an API key tied to a Google Cloud billing account, and every map load and geocoding lookup is metered. For a low-traffic store page that's a rounding error. For a busy locations page, or a key that gets copied into a public repo or exposed in client-side JS and picked up by a scraper, usage can spike well past what the merchant expected — and the bill follows.

That risk exists independent of whether the store actually needs anything Google-specific. Most store locator pages just need pins on a map with an address and some basic info — they don't need satellite imagery, Street View, or Google-specific routing.

The exposure is asymmetric. A leaked key doesn't just risk quota — it risks a bill that scales with however aggressively it gets abused before anyone notices and rotates it. For a feature as simple as "show our store locations on a map," that's a lot of downside for very little upside.

Self-hosted map tiles instead

Store Locator builds the map on Leaflet with OpenStreetMap tiles instead of the Google Maps API. There's no API key to provision, no billing account to link, and no per-load metering to worry about — the map renders from open tile data rather than a metered Google endpoint.

Store data itself is managed from an admin grid: name, address, coordinates, phone, and hours per location. Coordinates are validated server-side on save, so a typo or a copy-paste mistake in latitude/longitude can't slip through and produce a pin sitting in the ocean or on the wrong continent — the kind of broken map that undermines trust in the whole page the moment a visitor notices it.

  • Leaflet + OpenStreetMap tiles — no Google Maps API key, no billing account, no per-load charges.
  • Admin grid for store locations: name, address, coordinates, phone, hours.
  • Server-side coordinate validation on save, so bad data can't produce a broken pin.
  • A dedicated storefront locator page, ready to link from the main navigation.

Show shoppers where to find you — no API key, no surprise bill.

Get Store Locator — free