views:

1515

answers:

4

How much control do I have regarding the styling of a google map?

Can I make it more closely resemble a site's colour scheme or are we stuck with pastels?

+6  A: 

You can probably change around all the controls, perhaps by making your own or subclassing the google default versions. You won't be able to change the colors on the map itself without generating all new map images, at which point you are probably better off using something other than google. If thats what you want, you should consider OpenStreetMaps.

TokenMacGuy
http://www.openstreetmap.org/ Link to OpenStreetMap so others don't have to google it.
docgnome
Seems like Open Street Maps servers up images in the same way that google does (http://b.tile.openstreetmap.org/5/15/10.png), so does using this give you any more flexibility that using Google Maps?
Cannonade
OpenStreetMap works in a fundamentally similar way, but with google, there is access to the original GIS data used to generate the street images. OpenStreetMaps does have this, allowing you to easily render tiles in a different manner.
TokenMacGuy
Sounds cool. I guess if you are rendering the images using the GIS data from OpenStreetMaps, you could you use Google Maps or OpenStreetMaps to display the new tileset. (assuming OpenStreetMaps has custom tileset support).
Cannonade
A: 

Last I checked, you were stuck with the colors you were given (this was a year ago). You can check http://code.google.com/apis/maps/ for more info.

nikudesu
+1  A: 

I've looked into this before. From what I've found is that the styles of layers/overlays on the map are pretty much determined by Google (minus a few size option for some overlays). What I have found is that you'll either need to subclass the existing overlays or create entirely new overlays that mimic the existing functionality, which in some cases can be painful given their complexity (such as street view and others).

mjmarsh
+5  A: 

Controls

There is a decent description of the process to override the set of builtin Controls. So you have total control over the UI elements overlaying the map.

Map Tiles

I don't agree with the previous answers that you are out of luck if you want to change the images in the map itself.

The range of map types available give you a few options outside the pastel default map:

G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP, G_MAPMAKER_NORMAL_MAP,
G_MAPMAKER_HYBRID_MAP, G_SATELLITE_3D_MAP, G_DEFAULT_MAP_TYPES, G_MAPMAKER_MAP_TYPES 

Obviously, this only works if you are willing to create the tiles, but Custom Tilesets are quite well supported by the Google Maps API and there a few good examples out there:

Update

Google recently announced support for Styled Maps in the Google Maps API. You can extensively customize the color scheme used by Google Maps. So you can customize the look of your mashup, without resorting to custom tilesets.

Cannonade
Wow, Batmud tileset is awesome!
Yeah, very impressed with that one. Such a clever use of the technology.
Cannonade
Changing the color scheme of actual earth street data, would require re-rendering the entire map with available data. This is not likely to be so easy. The other map types show different data, rather than the same data in a different color scheme.
TokenMacGuy
@TokenMacGuy - Yep, re-rendering the entire earth tileset for aesthetic reasons would be a massive project. I put the other map types (Satellite, physical etc) first for that reason.
Cannonade
@TokenMacGuy - and yep, I agree the other map types do show different information, not just a different aesthetic scheme. However, something like G_HYPBRID_MAP does provide the same info as G_NORMAL_MAP, with a very different look (using the satellite tiles).
Cannonade