I developed and donated an open source module to Mage-OS Lab: MageOS_StoreLocator, a complete store locator module for Mage-OS and Magento 2.
What it does
The module lets merchants manage their physical stores directly from the Magento admin panel, and lets customers find the nearest store on the storefront through text search and geolocation.
On the admin side, there is a full CRUD under Stores → Store Locator → Manage Stores: for each store you manage the address, geographic coordinates, opening hours for each day of the week, and visibility per store view. The module’s global configuration is under Stores → Configuration → Store Locator and covers map provider, API key, default zoom, search radius, distance unit, geolocation toggle, and recurring closing days.
Dual map provider
The module supports two providers: Google Maps (requires an API key, to be set in the backend — it is stored encrypted) and Leaflet/OpenStreetMap, which requires no key and has no cost. You choose between them in the configuration.
Hyvä frontend
The storefront template is written for Hyvä, with Tailwind CSS and Alpine.js. The logic specific to each map provider is isolated in view/frontend/web/js/store-locator-map.js, so it is easy to extend or replace the provider without touching the rest.
The page URL is configurable — default /storelocator — and is handled by a custom router. The CSP whitelist for the map providers’ external domains is already included.
REST API and testing
The module exposes REST endpoints for search, get, save, and delete, protected by the ACL resource MageOS_StoreLocator::store. A CLI command is also available to populate demo stores:
bin/magento storelocator:demo:createUnit tests live in Test/Unit and are run with PHPUnit from the Magento root.
Installation
bin/magento module:enable MageOS_StoreLocator
bin/magento setup:upgrade
bin/magento cache:flushWhy I donated it to Mage-OS Lab
Because a store locator is a feature that many projects need, and it shouldn’t have to be rebuilt from scratch every time or bought as a commercial extension. Having it available as an open source module, under the Mage-OS umbrella, makes sense — both for the community and for those who build projects on this platform every day.
The code is on GitHub: github.com/mage-os-lab/module-store-locator
The module is free. Full details, features and requirements are on the Threecommerce module page (in Italian): Store locator con Google Maps o OpenStreetMap per Magento 2.