New Google Maps URLs – Data Options Reference

Maps’ data options are located following the term /data= in the URL. The options section is made up of one or more elements, each of which have the following general format:

  • An exclamation point (!) as the first character
  • An index number which indicates what this element represents (meaning is context-sensitive).
  • A letter indicating the data type
  • The value of the element.

The following data types have been observed:

  • b – Binary (0 = off/no, 1 = on/yes)
  • d – Decimal (value is a decimal – i.e., floating-point – number)
  • e – Enumerated (0 = 1st option, 1 = 2nd option, etc.)
  • i – Integer (value is a numeric integer)
  • j – Julian Date? (value is an integer indicating the number of seconds since the start of Jan 1, 1970)
  • m – Marker? (marks the start of a collection of elements; value is an integer indicating the number of following elements “contained” by this one)
  • s – String (value is a text string, possibly an encoding of some sort)

The following data elements have been observed (some identifications are tentative, or just educated guesses):

  • 3m   Type of map/display
    • 1e   Type of map/display
      • 1e0 = Street Map
      • 1e1 = Street View or See Inside
      • 1e2 = User Photos
      • 1e3 = Satellite
    • 3m   Photo/image information
      • 1s   Unknown
      • 2e   Unknown
      • 3e   Unknown
      • 6s   URL of the photo/image content
      • 7i   Uncertain, possibly image width in pixels
      • 8i   Uncertain, possibly image height in pixels
    • 4b   Uncertain. Maps occasionally inserts this as a ‘!3m1!4b1’ block. When used with a place request, including it seems to override the MAP_POSITION section and zoom in on the requested place.
  • 4m   Map/route/display contents
    • 3m   Unknown (appears to be related to Street View)
      • 1s   Unknown
    • 4m   Directions
      • 1m   Stop along the route
        • 1m   Stop stored details
          • 1s   Encoded string
        • 2m   Stop stored location
          • 1d   Longitude (decimal degrees)
          • 2d   Latitude (decimal degrees)
        • 3m   Waypoint encountered after this stop
          • 1m   Waypoint location
            • 1d   Longitude (decimal degrees)
            • 2d   Latitude (decimal degrees)
          • 3s   Waypoint stored details (encoded string)
      • 2m   Route options
        • 1b   Avoid highways
        • 2b   Avoid tolls
        • 3b   Avoid ferries
        • 4e   Preferred transit criterion (mutually exclusive; uses final one)
          • 4e0, 4e1 = Prefer best route (i.e., fastest time) (default); not sure what the difference is, or if there even is one
          • 4e2 = Prefer fewest transfers
          • 4e3 = Prefer less walking
        • 5e   Preferred transit type (multiple OK)
          • 5e0 = Bus
          • 5e1 = Subway
          • 5e2 = Train
          • 5e3 = Tram/light rail
          • Omitted = Any
        • 6e   Designate arrival/departure time (mutually exclusive; uses final one). Appears to have no effect without the 8j element.
          • 6e0 = Depart at (default)
          • 6e1 = Arrive by
          • Omitted = Do not use arrival/departure time
        • 7e   Uncertain. Appears to have no effect without 8j element. If omitted, arrival/departure time used is four hours before the specified time.
          • 7e2 = Only value that appears to allow arrival/departure time to work properly
        • 8j   Arrival/departure time specification.
      • 3e   Type of transportation to use (mutually exclusive; uses final one)
        • 3e0 = Driving (car)
        • 3e1 = Bicycling
        • 3e2 = Walking/Hiking
        • 3e3 = Transit
        • 3e4 = Flight
        • Omitted = Any
      • 4e   Distance units to use (mutually exclusive; uses final one)
        • 4e0 = Kilometers
        • 4e1 = Miles
        • Omitted = Automatic (default for that area)
      • 5i   Route to select (mutually exclusive; uses final one). Zero-based integer index, so ‘5i0’ means select the first route, ‘5i1’ the second, etc. If the value is higher than the number of routes returned, the first route will be “selected” but not highlighted on the map.
  • 5m   Map layers
    • 1e   Type of layer (multiple OK; in conflicts, priority goes to last listed)
      • 1e1 = Traffic
      • 1e2 = Transit
      • 1e3 = Bicycling
      • 1e4 = Terrain
      • 1e5 = Images (Street View, Photo Spheres, See Inside)
      • 1e6 = Flight
  • 6m   Unknown
    • 1e   Unknown. There always seems to be a ‘!6m1!1e1’ at the end of Street View and User Photo URLs.

How these elements are used to customize Maps will be covered in subsequent posts.

Return to New Google Maps URLs introduction

This entry was posted in Google Maps, Online Maps and tagged , . Bookmark the permalink.

4 Responses to New Google Maps URLs – Data Options Reference

  1. Vittorio Pavesi says:

    Have you ever understood what encoding has been used for “s – String” ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s