File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 3636@event api-load
3737-->
3838
39- < polymer-element name ="google-maps-api " extends ="core-shared-lib " attributes ="version apiKey clientId libraries ">
39+ < polymer-element name ="google-maps-api " extends ="core-shared-lib " attributes ="version apiKey clientId libraries language ">
4040< script >
4141
4242 Polymer ( {
7979 */
8080 version : '3.exp' ,
8181
82+ /**
83+ * The localized language to load the Maps API with. For more information
84+ * see https://developers.google.com/maps/documentation/javascript/basics#Language
85+ *
86+ * Note: the Maps API defaults to the preffered language setting of the browser.
87+ * Use this parameter to override that behavior.
88+ *
89+ * @attribute language
90+ * @type string
91+ * @default null
92+ */
93+ language : null ,
94+
8295 notifyEvent : 'api-load' ,
8396
8497 ready : function ( ) {
8598 var url = this . defaultUrl + '&v=' + this . version ;
8699 url += "&libraries=" + this . libraries ;
100+
87101 if ( this . apiKey && ! this . clientId ) {
88102 url += '&key=' + this . apiKey ;
89103 }
104+
90105 if ( this . clientId ) {
91106 url += '&client=' + this . clientId ;
92107 }
108+
109+ if ( this . language ) {
110+ url += '&language=' + this . language ;
111+ }
112+
93113 this . url = url ;
94114 } ,
95115
You can’t perform that action at this time.
0 commit comments