Skip to content

Commit 8a9e13f

Browse files
committed
Add langugage param
1 parent 971d5c6 commit 8a9e13f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

google-maps-api.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
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({
@@ -79,17 +79,34 @@
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+
* @attribute language
87+
* @type string
88+
* @default null
89+
*/
90+
language: null,
91+
8292
notifyEvent: 'api-load',
8393

8494
ready: function() {
8595
var url = this.defaultUrl + '&v=' + this.version;
8696
url += "&libraries=" + this.libraries;
97+
8798
if (this.apiKey && !this.clientId) {
8899
url += '&key=' + this.apiKey;
89100
}
101+
90102
if (this.clientId) {
91103
url += '&client=' + this.clientId;
92104
}
105+
106+
if (this.language) {
107+
url += '&language=' + this.language;
108+
}
109+
93110
this.url = url;
94111
},
95112

0 commit comments

Comments
 (0)