Skip to content

Commit

Permalink
Add docs on event
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Nov 16, 2014
1 parent bddd55c commit 754ff8c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions google-map-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
@homepage http://googlewebcomponents.github.io/google-map/
-->

<!--
Fired when the search element returns a result.
@event google-map-search-result
@param {Object} detail
@param {number} detail.latitude Latitude of the result.
@param {number} detail.longitude Longitude of the result.
@param {bool} detail.show Whether to showt the result on the map.
-->
<polymer-element name="google-map-search" attributes="query result map">
<script>
Polymer('google-map-search', {
Expand Down Expand Up @@ -71,6 +80,7 @@
places.textSearch({query: this.query}, this.gotResults.bind(this));
}
},

gotResults: function(results, status) {
this.result = {
latitude: results[0].geometry.location.lat(),
Expand Down

0 comments on commit 754ff8c

Please sign in to comment.