When Google Maps go bad…

Note: This post is over a year old and the content may no longer be accurate.

This week I noticed that a number of google maps had stopped working out of the blue, not dying in a spectacular javascript car crash, just a subdued failure and no map.

Looking in Firefox error console I see G_MAP_TYPE is not defined; – WTF? it was working…

Well looking into it, it is an easy fix. It seems that a lot of people (myself included) have been using depreceated constant names for the maps types, and that there will be quite a few Javascript Plugins (for things like jQuery) that may need updating.

The usual (i.e. correct) types we should now be using now are:

Old Constant name New Constant Name Description
G_MAP_TYPE G_NORMAL_MAP This map type (which is the default) displays a normal street map.
G_SATELLITE_TYPE G_SATELLITE_MAP This map type displays satellite images.
G_HYBRID_TYPE G_HYBRID_MAP This map type displays a transparent layer of major streets on satellite images.

This map type displays maps with physical features such as terrain and vegetation. This map type is not displayed within map type controls by default. (Since 2.94)

See: http://code.google.com/apis/maps/documentation/reference.html#GMapType

For a bit of an actual explanation I found this post on Google Groups


Note: This post is over a year old and the content may no longer be accurate.

Everything is looking a bit grey on the page lately. I’ve been meaning to put up a bit of colour for a while, we did have the odd flash of summer I suppose…