alfamegaxq/simple-g-maps

谷歌地图API包装包

安装: 23

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

语言:JavaScript

类型:symfony-bundle

1.1.1 2016-12-24 20:40 UTC

This package is auto-updated.

Last update: 2024-09-07 00:37:41 UTC


README

### 包含内容:

  • 定义国家的城市自动完成输入。

要求

  • jQuery
  • jQuery UI
  • 此包依赖于GuzzleHttp/guzzle

安装

  • AppKernel.php
new SimpleGMapsBundle\SimpleGMapsBundle(),
  • routing.yml中添加路由
google_autosuggest:
    resource: "@SimpleGMapsBundle/Controller/"
    type:     annotation

-包含脚本

<script src="{{ asset('bundles/gmaps/js/script.js') }}"></script>

使用方法

  • 在您想要输入的地方渲染动作
    {{ render(controller('GMapsBundle:Suggest:renderCitySuggest', {
        inputParams: 'name="text" class="city_suggest"',
        language: 'de',
        country: 'de'
    })) }}
  • 按照您想要的风格定制。如果您不使用谷歌地图,别忘了包含“由谷歌提供”的标志。

扩展

请随意创建拉取请求以添加更多谷歌地点功能

只需保持每个功能都应非常易于实现的想法。