Skip to content

Commit

Permalink
Merge pull request #17 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
2.4 develop
  • Loading branch information
HuyPhuc98 committed Jul 27, 2023
2 parents b745368 + dc1d625 commit 3db105b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 46 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "mageplaza/module-google-maps",
"description": "Magento 2 Google Maps Extension",
"require": {
"mageplaza/module-core": "^1.4.5"
"mageplaza/module-core": "^1.5.4"
},
"type": "magento2-module",
"version": "4.0.2",
"version": "4.0.3",
"license": "proprietary",
"authors": [
{
Expand Down
86 changes: 43 additions & 43 deletions etc/config.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_GoogleMaps
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<mpgooglemaps>
<module>
<type>1</type>
</module>
<general>
<enabled>1</enabled>
<contact_page>1</contact_page>
<position>1</position>
</general>
<map_setting>
<map_type>roadmap</map_type>
<map_style>default</map_style>
<protocol>1</protocol>
<allow_drag>0</allow_drag>
<zoom_default>20</zoom_default>
</map_setting>
</mpgooglemaps>
</default>
</config>
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_GoogleMaps
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<mpgooglemaps>
<module>
<type>1</type>
</module>
<general>
<enabled>1</enabled>
<contact_page>1</contact_page>
<position>top</position>
</general>
<map_setting>
<map_type>roadmap</map_type>
<map_style>default</map_style>
<protocol>1</protocol>
<allow_drag>0</allow_drag>
<zoom_default>20</zoom_default>
</map_setting>
</mpgooglemaps>
</default>
</config>
9 changes: 8 additions & 1 deletion view/frontend/templates/map.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ $position = $block->getPosition();
};

var map = new google.maps.Map(document.getElementById("mpgooglemaps_map_<?= /** @noEscape */ $block->getNameInLayout() ?>"), mapOptions);
var icon = {
url: mapMarkerIcon,
scaledSize: new google.maps.Size(40, 40),
origin: new google.maps.Point(0,0),
anchor: new google.maps.Point(0, 0)
};

var marker = new google.maps.Marker({
draggable: !!(parseInt(isDraggable)),
position: mapLatLng,
icon: mapMarkerIcon,
icon: icon,
animation: google.maps.Animation.DROP
});
marker.setMap(map);
Expand Down

0 comments on commit 3db105b

Please sign in to comment.