diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index b77e665c28..4d225779ce 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -339,6 +339,7 @@ declare namespace google.maps { getCursor(): string; getDraggable(): boolean; getIcon(): string|Icon|Symbol; + getLabel(): MarkerLabel; getMap(): Map|StreetViewPanorama; getOpacity(): number; getPlace(): Place; @@ -353,6 +354,7 @@ declare namespace google.maps { setCursor(cursor: string): void; setDraggable(flag: boolean): void; setIcon(icon: string|Icon|Symbol): void; + setLabel(label: string|MarkerLabel): void; setMap(map: Map|StreetViewPanorama): void; setOpacity(opacity: number): void; setOptions(options: MarkerOptions): void; @@ -390,6 +392,12 @@ declare namespace google.maps { * @type {(string|Icon|Symbol)} */ icon?: string|Icon|Symbol; + /** + * Adds a label to the marker. The label can either be a string, or a MarkerLabel object. + * Only the first character of the string will be displayed. + * @type {(string|MarkerLabel)} + */ + label?: string|MarkerLabel; /** * Map on which to display Marker. * @type {(Map|StreetViewPanorama)} @@ -468,6 +476,19 @@ declare namespace google.maps { url?: string; } + export interface MarkerLabel { + /** The color of the label text. Default color is black. */ + color?: string; + /** The font family of the label text (equivalent to the CSS font-family property). */ + fontFamily?: string; + /** The font size of the label text (equivalent to the CSS font-size property). Default size is 14px. */ + fontSize?: string; + /** The font weight of the label text (equivalent to the CSS font-weight property). */ + fontWeight?: string; + /** The text to be displayed in the label. Only the first character of this string will be shown. */ + text?: string; + } + export interface MarkerShape { coords?: number[]; type?: string;