The solution I found is not pretty at all but you won't have to use any external api, basically you use the label property to display the text and add some extra spaces in the beginning of the text because since the only properties available to the label are (color, fontFamily, fontSize, fontWeight, text) you can't add a style class to it
let markerLabel = {
text: this.stringWithSpaces('King's Cross',15),
color: 'red'
}
stringWithSpaces(string, n){
return Array(n).join('\xa0')+string
}
let marker = new google.maps.Marker({
position: latLon,
label: markerLabel,
map: map,
icon: {...}
});
I haven't done a lot of research on it but if you want you can try using this https://github.com/jesstelford/node-MarkerWithLabel