As we all know, Google changed web mapping when they introduced Google Maps. At the time of writing this, tiled maps are now the norm with web mapping.

For example, with ArcGIS Server, you cache as many of your layers as possible into cached map services, and then if need be, you pull in any of your operational layers via either dynamic or feature services.

Once you have a cached service, there is no way to tweak the cartography without having to build a new cache again.

The v3 Google Maps API allows you to style the Google Tiled Basemap. The styling wizard lets you tinker nearly all aspects of the Google Map, to suit your needs.

I can understand from an API perspective, how you can send your style request in a JSON object.

What I want to know is, how are they doing this at the back end? (Would be good to include a reference)

If I look at the Styling Wizard with Firebug, and make changes to anything, I can see that new GET requests are made to return PNG images back to the client.

enter image description here

There are near infinite variations you could apply, so they cannot have all the tiles pre-cooked and ready to serve out. Therefore, I can only assume they are creating these tiles on demand?

  • 1
    My guess is all the different feature types and labels are pre-cooked transparent PNG tiles that get recolored and merged together on the back end for each request.
    – blah238
    Commented Jun 24, 2012 at 5:10
  • Good theory. If this is true, then there would be A LOT of pre-cooked tiles. Think how many tiles there are anyway, then times that just for showing Sea in every HEX colour.
    – jakc
    Commented Jun 24, 2012 at 9:42
  • 2
    No, I meant that they would be recolored on the fly. Much easier to recolor an existing image than querying real geometry and rendering a new one from scratch. Of course I have no idea how it really works, as you said, it's just a theory :)
    – blah238
    Commented Jun 24, 2012 at 14:10
  • 1
    That's a good theory blah238. They would only need to change the palette in the png rather than the actual raster data. Commented Jun 24, 2012 at 14:56

3 Answers 3


In other implementations (as in, our implementation) this is done with palette modification; you can quickly recolor a PNG image without touching the actual data, if you know the full original palette.

Google doesn't do that; they likely have a tile-based database and tiles of vector data that are rasterized on the fly.

  • Thanks tmcw. However, for a correct answer, im looking for one with supporting evidence. Might well be that we can only theorise how they do it.
    – jakc
    Commented Jun 25, 2012 at 8:19
  • 2
    Good luck finding supporting evidence for any non-PR'ed details of Google's infrastructure :). That said, what leads me to that conclusion (besides whispers from Googlers) is the anti-aliasing quality between colors and the ability to remove features at various levels, combined with the fast re-render cycles.
    – tmcw
    Commented Jun 25, 2012 at 14:35

I know this isn't quite what you are looking for, but I thought you might find it useful anyway. Have you seen this example by Odoe which uses css filters on the maps? Might be limited outside of chrome



  • yea been playing with that to bring in Bing aerials in greyscale. Its great use of css, but the tiles still pop in colour and then change to X after they have loaded. Can be a little distracting. Related q over here but for gmaps API stackoverflow.com/questions/13564712/…
    – jakc
    Commented Jan 16, 2013 at 10:57

There are two patents I found while asking that question myself:

Dynamic map rendering as a function of a user parameter US8103445


Demand based texture rendering in a tile based rendering system US20110254852

Couldn't find any official information on who uses these or similar schemes, yet I guess the second paper's drawings look pretty straight forward to implement and I don't see any reason why the shouldn't have implemented this or something even more efficient in the meantime.

  • Interesting patents. I'm not sure that they completely handle the styling, but it's interesting reading. Commented Apr 2, 2013 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.