Ionic directive for a location dropdown that utilizes google maps
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 3 commits ahead, 4 commits behind israelidanny:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test/jasmine
.gitignore
LICENSE
README.md
bower.json
demo.gif
ion-google-place.css
ion-google-place.js
package.json

README.md

ion-google-place

Ionic directive for a location dropdown that utilizes google maps

Animated demo

This is a simple directive for an autocomplete overlay location field built for Ionic Framework.

#Installation

Installation should be dead simple, you can grab a copy from bower:

bower install ion-google-place

Note: In case the installation does not work, you can also try to directly add the following into your index.html file

<script src="bower_component/ion-google-place/ion-google-place.js"></script>
<link href="bower_component/ion-google-place/ion-google-place.css">

Or clone this repository.

For the geolocation service to work, you'll need to have Google Maps javascript API somewhere in your HEAD tag: <script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>

You'll need to add ion-google-place as a dependency on your Ionic app:

angular.module('myApp', [
  'ionic',
  'ion-google-place'
]);

That's pretty much it. Now you can use the directive like so: <ion-google-place placeholder="Enter an address, Apt# and ZIP" ng-model="location" />

You can in this version have the current location by adding to the directive "ion-google-place" the attribute currentLocation to true.

example: <ion-google-place placeholder="Enter an address, Apt# and ZIP" ng-model="location" current-location="true" />

the acceptable value fot the attribute currentLocation are true or false.