Google Map Styled

Component ID

1170046

Component name

Google Map Styled

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

After you style a map using Google Maps API Styled Map Wizard you can use this map as a overlay to other maps using the OpenLayers module.

Use Firebug's net tab, or similar method to view the URL being used to get the Google tiles as you style them with the wizard. A simple example might just remove a lot of features.

After styling a map you might have a tile URL like:

http://mt1.google.com/vt/x=266&y=407&z=10&v=apt.116&hl=en-US&src=apiv3&s=G&lyrs=r&apistyle=s.t:33|p.v:off&apistyle=s.t:49|s.e:l|p.v:on|p.l:50|p.s:24,s.t:5|p.v:off,s.t:6|p.v:off,
s.t:1|p.v:off,s.t:5|p.v:off,s.t:2|p.v:off

When adding your Google Map Styled layer, it would be:

Base path: http://mt1.google.com/vt/

Google tile style:

v=apt.116&hl=en-US&src=apiv3&s=G&lyrs=r&apistyle=s.t:33|p.v:off&apistyle=s.t:49|s.e:l|p.v:on|p.l:50|p.s:24,s.t:5|p.v:off,s.t:6|p.v:off,
s.t:1|p.v:off,s.t:5|p.v:off,s.t:2|p.v:off

Plans to decode the style information given when clicking the Show JSON button would be the next logical major update for this module. Assuming this module appears useful.

The javascript code was based on these examples:
http://docs.openlayers.org/library/spherical_mercator.html

Module code was based reviewing other modules like Mapbox and the OpenLayers module itself.