Search code examples
google-mapsgoogle-maps-api-3google-maps-styling

Google Maps v3 - how to style the "baloon" and to color a country?


does anybody knows how can style the baloon that appears in the Google Maps v3 when you click a place? I wish to change the default "comic-style".

Second question: is it possible to automatically (or in some other way) color a country (i.e. I wish to have the US with a red overlay, Canada with a yellow overlay and so on)?

Thank you, da


Solution

  • As I can see infowindow baloons have inline styles, so, it's a problem to apply styling to them. So, one of alternatives is to create own class for bubbles (or find the one, for example look here: Google Maps: How to create a custom InfoWindow?).

    Your second question: there are no simple and generalized way to show overlay like you want. I mean, there is no such API call. But it can be done relatively easily using polygons. (look at How do i Add and Remove polygons on a Google Map (version 3)?), you just need country boundaries, which you can find over the net.