alfamegaxq/simple-g-maps

google maps apis wrapper bundle

Installs: 24

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:symfony-bundle

1.1.1 2016-12-24 20:40 UTC

This package is auto-updated.

Last update: 2024-11-07 01:08:33 UTC


README

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

<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

Just preserve idea, that each feature should be realy easy to implement.