• bluegreenproject

    (@bluegreenproject)


    This plugin has a lot of potential to help out on a personal project I’m working on, but I’d like to make maps more feature rich. Just curious to know if there was an easy way to drop in the google maps traffic or transit layers onto the map.

    I found this in the Google API and saw something similar in venue-utils.js but was unable to get it working:

    var map = new google.maps.Map(document.getElementById(‘map-canvas’), mapOptions);

    var trafficLayer = new google.maps.TrafficLayer();
    trafficLayer.setMap(map);
    }

    Thanks!

    https://wordpress.org/plugins/event-organiser/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    At this point, unfortunately not.

    However in 3.0.0 the internal handling of Google maps will change to make it easier to modify or target the map (for, for example, adding layers).

    This can be done by loading the following javascript onto the page. E.g:

    wp.hooks.addAction( 'eventorganiser.google_map_loaded', function( eomap ){
    	var trafficLayer = new google.maps.TrafficLayer();
    	trafficLayer.setMap( eomap.map );
    });

    There’s no ETA for 3.0.0, but it’s a big update so there will be a correspondingly long beta period to iron out any issues.

    Thread Starter bluegreenproject

    (@bluegreenproject)

    OK, thanks for the help! I’ll keep a lookout for 3.0

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Maps Layers?’ is closed to new replies.