Loki_MapComponents
Jump to User Docs
Trial
Components
PHP
8.1 - 8.4
Magento
2.4.7 | 2.4.8
CSP
Yes
PHPStan
5
Magento PHPCS
7
Latest Release
1.0.5
This Magento 2 module is an add-on package to Loki Components. It contains templates, Alpine.js components and PHP classes to build maps into other modules. It can be used within the LokiCheckout but also on other Magento pages.
Installation
Install this package via composer:
composer require loki/magento2-map-components
Next, enable this module:
bin/magento module:enable Loki_MapComponents
Support
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/Loki_MapComponents.git
Configuration Options
The following options of this module can be configured via the Store Configuration:
Generic Settings > Map Type
loki_map_components/generic/map_type
Generic Settings > Default longitude
loki_map_components/generic/default_longitude
Longitude to center the map towards at the beginning
Generic Settings > Default latitude
loki_map_components/generic/default_latitude
Latitude to center the map towards at the beginning
Google Maps Settings > API key
loki_map_components/google/api_key
Enter your Google API key for using Google Maps and Google GeoLocation
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
Loki_Base
Loki_Components
Loki_CssUtils
Magento_Backend
Magento_Config
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Quote
Magento_Store
Magento_Theme
Yireo_CspUtilities
Composer details
Magento module name
Loki_MapComponents
Composer name
loki/magento2-map-components
Composer version
1.0.5
Default branch
main
Requirements
ext-json: *
ext-pcre: *
guzzlehttp/guzzle: ^7.10
loki/magento2-components: ^2.2
loki/magento2-css-utils: ^1.0
magento/framework: ^103.0
magento/module-backend: ^102.0
magento/module-customer: ^103.0
magento/module-store: ^101.1
psr/log: ^1.0 | ^2.0 | ^3.0
Releases
1.0.5
22 April 2026
1.0.4
22 April 2026
1.0.3
22 April 2026
1.0.2
22 April 2026
1.0.1
22 April 2026
1.0.0
22 April 2026
0.2.7
22 April 2026
0.2.6
22 April 2026
0.2.5
22 April 2026
0.2.4
22 April 2026
0.2.3
22 April 2026
0.2.2
22 April 2026
0.2.1
22 April 2026
0.2.0
22 April 2026
0.1.10
22 April 2026
0.1.9
22 April 2026
0.1.8
22 April 2026
0.1.7
22 April 2026
0.1.6
22 April 2026
0.1.5
22 April 2026
Changelog
[1.0.5] - 08 April 2026
Fixed
Add missing images
If mapLocation is false, do not submit it via AJAX
If marker is empty, dont add it
Prevent error with marker without lat and lng
Mapkit snippets
[1.0.4] - 27 March 2026
Fixed
Remove duplicate methods from MapLocation that come from Location
Convert Leaflet sources from unpkg.com to local
New structure of shipping locations and delivery dates
Cleanup mapLocation constructor
Export location distance to Alpine as well
Rename various component partials
Add LokiCheckoutConfiguredMapComponentPartial that serves configured map type
[1.0.3] - 17 March 2026
Fixed
Fix non-root error with Google Maps click in popup
Allow for map-config to select either Leaflet or GoogleMaps
Backend config of map type (google, leaflet)
[1.0.2] - 12 March 2026
Fixed
Loosen constraints on psr/log
Return var directly
[1.0.1] - 12 March 2026
Fixed
[1.0.0] - 12 March 2026
Working Leaflet implementation
Working Google Maps implementation
Fixed
Remove deprecated MarkerViewModel
Destroy data in store on refresh
Fix toggling of Google Maps markers
Attempt to fix markers that disappear after AJAX refresh
Fix icon width in Google Maps
Make sure mapLocations always include right iconHtml
Consolidate all maps in Loki_MapComponents
Move Zoom to right
Fix switching in between markers
Make icon props configurable via XML layout
Toggle CSS class active/inactive in marker
Add reusable blocks
Rename marker title into marker label
[0.2.7] - 20 February 2026
Fixed
Add #[\ReturnTypeWillChange] to allow for removal of mixed type hint
[0.2.6] - 13 February 2026
Fixed
Working map with stores
If a Leaflet marker has no icon, use the default
Temporarily disable jump to marker due to bug
Differentiate between Marker code and Marker ID
Add Geolocation parsing of address to add lat and lng
Change wording of Google API key to also include Geolocation
Allow for one ComponentContext to inherit from multiple others
Heavily refactor Location, Address and Marker objects and factories
[0.2.5] - 12 February 2026
Fixed
Allow PHP Config to read from current store level
[0.2.4] - 03 February 2026
Fixed
Rewrite to composable AbstractComponentContext
[0.2.3] - 28 January 2026
Fixed
Add PHPCS ignore for md5() usage
Fix Leaflet jump to marker issue
Fix popup button handler in Leaflet map
Fix non-existing ref to setView
Working map functionality
Render markers via Alpine.js instead of PHP
Allow for Leaflet JS maps
[0.2.2] - 23 January 2026
Fixed
[0.2.1] - 22 October 2025
Fixed
[0.2.0] - 23 September 2025
Fixed
Implement new imageRenderer
Change XML layout container name
Only scroll into view if element exists
Move map store into loki.script.store
[0.1.10] - 17 September 2025
Fixed
Make MapViewModel non-abstract
[0.1.9] - 16 September 2025
Fixed
Allow saving data into session easily
Make sure to include templates in Tailwind config
Predefine Loki Components group loki-map-components
[0.1.8] - 04 September 2025
Fixed
[0.1.7] - 28 August 2025
Fixed
Add CI files
Replace yireo/opensearch with yireo/opensearch-dummy in Gitlab CI
[0.1.6] - 26 August 2025
Fixed
048c0f7 Add GitLab CI files
[0.1.5] - 21 August 2025
Fixed
Replace LokiComponentsUtilBlockCssClass with LokiCssUtilsUtilCssClass
Declare used PHP namespaces
Add missing strict_types declaration
[0.1.4] - 18 August 2025
Fixed
Lower requirements to PHP 8.1
Rename tab in Store Config from "Yireo" to "Loki"
Add escaping to templates
[0.1.3] - 15 August 2025
Fixed
Move config from Yireo tab to Loki tab
[0.1.2] - 06 August 2025
Fixed
Lower PHP requirement to PHP 8.2+
[0.1.1] - 24 July 2025
Fixed
Rename jumpTo to jumpToMarker
Create separate store for markers and maps
[0.1.0] - 21 July 2025
Fixed
Rename PHP namespace from Yireo_Loki* to Loki*
Rename composer package from yireo/magento2-loki* to loki/magento2*
[0.0.2] - 08 July 2025
Fixed
Remove dep with LokiCheckout
[0.0.1] - 19 June 2025
Initial release
Jump to User Docs
Last modified: September 1, 2025