2017 © Pedro Peláez
 

magento2-module magento2-googlemap

A Magento 2 module for Google Map embeed

image

lcbrq/magento2-googlemap

A Magento 2 module for Google Map embeed

  • Thursday, April 12, 2018
  • by Tomasz-Silpion
  • Repository
  • 7 Watchers
  • 7 Stars
  • 462 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 6 Versions
  • 80 % Grown

The README.md

Add Google Map to any place of your Magento 2 store

Usage

Declare:, (*1)

<block class="LCB\GoogleMap\Block\Render" name="map" as="map" template="map.phtml"/>, (*2)

in your layout xml, (*3)

and <?php echo $this->getChildHtml('map'); ?>, (*4)

in your template file., (*5)

Example for contact_index_index.xml, (*6)

<referenceContainer name="content" htmlClass="row contact-page" htmlTag="div">
    <block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml">
        <block class="LCB\GoogleMap\Block\Render" name="map" as="map" template="map.phtml"/>
    </block>
</referenceContainer>

Configuration

Magento2 Google Maps configuration, (*7)

You can as well use following syntax on any page:, (*8)

<div id="map"></div>
<script type="text/javascript">// <![CDATA[
    var apiKey = '<GOOGLE_MAPS_API_KEY>';
    require([
        'LCB_GoogleMap/js/map'
    ], function (map) {
        map.render(
                document.getElementById('map'),
                latitude,
                longitude,
                zoom
                );
    });
    // ]]>
</script>

Known issues

Lack of map width and height. Add:, (*9)

#map {
    min-width: 640px;
    min-height: 320px;
}

to your stylesheet., (*10)

The Versions

12/04 2018

dev-feature/places

dev-feature/places

A Magento 2 module for Google Map embeed

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

by Silpion Tomasz Gregorczyk

25/10 2017

dev-master

9999999-dev

A Magento 2 module for Google Map embeed

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • magento/framework >=100.0.0
  • php >=5.5.0

 

by Silpion Tomasz Gregorczyk

25/10 2017

dev-develop

dev-develop

A Magento 2 module for Google Map embeed

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php >=5.5.0
  • magento/framework >=100.0.0

 

by Silpion Tomasz Gregorczyk

25/10 2017

1.0.2

1.0.2.0

A Magento 2 module for Google Map embeed

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php >=5.5.0
  • magento/framework >=100.0.0

 

by Silpion Tomasz Gregorczyk

17/06 2017

1.0.1

1.0.1.0

A Magento 2 module for Google Map embeed

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php >=5.5.0
  • magento/framework >=100.0.0

 

by Silpion Tomasz Gregorczyk

07/06 2017

1.0.0

1.0.0.0

A Magento 2 module for Google Map embeed

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/framework >=100.0.0

 

by Silpion Tomasz Gregorczyk