承接 lcbrq/magento2-googlemap 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lcbrq/magento2-googlemap

Composer 安装命令:

composer require lcbrq/magento2-googlemap

包简介

A Magento 2 module for Google Map embeed

README 文档

README

Usage

Declare:

<block class="LCB\GoogleMap\Block\Render" name="map" as="map" template="map.phtml"/>

in your layout xml

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

in your template file.

Example for contact_index_index.xml

<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

You can as well use following syntax on any page:

<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:

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

to your stylesheet.

统计信息

  • 总下载量: 862
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 5
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2017-06-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固