-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yvonne Yip
committed
Jan 10, 2014
1 parent
9b410dc
commit 2e10936
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<link rel="import" href="../polymer/polymer.html"> | ||
|
||
<polymer-element name="google-map-search" attributes="query result map"> | ||
<script> | ||
Polymer('google-map-search', { | ||
result: { | ||
latitude: '37.77493', | ||
longitude: '-122.41942', | ||
show: false | ||
}, | ||
search: function() { | ||
var places = new google.maps.places.PlacesService(this.map); | ||
places.textSearch({query: this.query}, this.gotResults.bind(this)); | ||
}, | ||
gotResults: function(results, status) { | ||
this.result = { | ||
latitude: results[0].geometry.location.lat(), | ||
longitude: results[0].geometry.location.lng(), | ||
show: true | ||
} | ||
} | ||
}); | ||
</script> | ||
</polymer-element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters