When Google Maps go bad…

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.
  G_PHYSICAL_MAP

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

One thought to “When Google Maps go bad…”

  1. I have a lot of problems with Google Maps recently. It can find a street but not the street number or if it finds the street numbers, it put it’s on the wrong end of the street. Definitely not fun when you end up on the wrong end of town.

    And I do have the occasional total failure to load Google maps. Go figure.

Comments are closed.