I finally figured this one out, you have to add to the json-string parameter in the object, and tell the javascript file to pick up that style from the object. Here’s what I did, you might be able to suggest better code :
- In the cmgp plugin directory > short code.php > line #74 : $map_data_properties[‘styles’] = *your style info here as a json formatted string*
- In the cmgp plugin directory > assets > js > cgmp.framework.min.js file > line #2
-
change :
b.maptypecontrol,panControl:"true"===b.pancontrol,zoomControl:"true"===b.zoomcontrol,scaleControl:"true"===b.scalecontrol,scrollwheel:"true"===b.scrollwheelcontrol,streetViewControl:"true"===b.streetviewcontrol,tilt:"true"===b.tiltfourtyfive?45:null,draggable:"true"===b.draggable,overviewMapControl:!0,overviewMapControlOptions:{opened:!1}});"true"===b.showpanoramio&&p.buildPanoramioLayer(b.panoramiouid);"true"===b.showbike&&p.buildBikeLayer();"true"===b.showtraffic&&p.buildTrafficLayer();null!=b.kml&&
- to :
b.maptypecontrol,panControl:"true"===b.pancontrol,zoomControl:"true"===b.zoomcontrol,scaleControl:"true"===b.scalecontrol,scrollwheel:"true"===b.scrollwheelcontrol,streetViewControl:"true"===b.streetviewcontrol,tilt:"true"===b.tiltfourtyfive?45:null,styles:b.styles,draggable:"true"===b.draggable,overviewMapControl:!0,overviewMapControlOptions:{opened:!1}});"true"===b.showpanoramio&&p.buildPanoramioLayer(b.panoramiouid);"true"===b.showbike&&p.buildBikeLayer();"true"===b.showtraffic&&p.buildTrafficLayer();null!=b.kml&&
I keep the google style info in my theme options as a json formatted string, then use json_decode($string)
to load that into the map_data_properties array
Hope that makes sense/helps!