This repository was archived by the owner on Apr 19, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ < link rel ="import " href ="../polymer/polymer.html ">
2+
3+ < polymer-element name ="google-map-search " attributes ="query result map ">
4+ < script >
5+ Polymer ( 'google-map-search' , {
6+ result : {
7+ latitude : '37.77493' ,
8+ longitude : '-122.41942' ,
9+ show : false
10+ } ,
11+ search : function ( ) {
12+ var places = new google . maps . places . PlacesService ( this . map ) ;
13+ places . textSearch ( { query : this . query } , this . gotResults . bind ( this ) ) ;
14+ } ,
15+ gotResults : function ( results , status ) {
16+ this . result = {
17+ latitude : results [ 0 ] . geometry . location . lat ( ) ,
18+ longitude : results [ 0 ] . geometry . location . lng ( ) ,
19+ show : true
20+ }
21+ }
22+ } ) ;
23+ </ script >
24+ </ polymer-element >
Original file line number Diff line number Diff line change 2626 < script >
2727 ( function ( ) {
2828 var CALLBACK_NAME = 'polymer_google_map_callback' ;
29- var MAP_URL = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&callback=' + CALLBACK_NAME ;
29+ var MAP_URL = 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places& sensor=false&callback=' + CALLBACK_NAME ;
3030 var pendingCallbacks = [ ] ;
3131 var loading ;
3232
Original file line number Diff line number Diff line change 1616 < template id ="imports ">
1717 < link rel ="import " href ="google-map-directions.html ">
1818 </ template >
19- </ x-meta >
19+ </ x-meta >
20+
21+ < x-meta id ="google-map-search " label ="Google Map Search ">
22+ < template >
23+ < google-map-search > </ google-map-search >
24+ </ template >
25+ < template id ="imports ">
26+ < link rel ="import " href ="google-map-search.html ">
27+ </ template >
28+ </ x-meta >
You can’t perform that action at this time.
0 commit comments