2017 © Pedro Peláez
 

symfony-bundle simple-g-maps

google maps apis wrapper bundle

image

alfamegaxq/simple-g-maps

google maps apis wrapper bundle

  • Saturday, December 24, 2016
  • by alfamegaxq
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

google maps places snippets bunde

Whats inside?

  • City autocomplete input for defined country.

Requirements

  • jQuery
  • jQuery UI
  • bundle depends on GuzzleHttp/guzzle

Installation

  • in AppKernel.php
new SimpleGMapsBundle\SimpleGMapsBundle(),
  • add routes in routing.yml
google_autosuggest:
    resource: "@SimpleGMapsBundle/Controller/"
    type:     annotation

-include scripts, (*1)

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

Usage

  • render action in where you want input to be
    {{ render(controller('GMapsBundle:Suggest:renderCitySuggest', {
        inputParams: 'name="text" class="city_suggest"',
        language: 'de',
        country: 'de'
    })) }}
  • stylize how you want. Don't forget to include "Powered by google" logo if oyu dont use google map

Extending

Feel free to create pull requests to add more google places features, (*2)

Just preserve idea, that each feature should be realy easy to implement., (*3)

The Versions