Thanks, Guust.
I found this on Google’s developer site at https://developers.google.com/maps/documentation/javascript/trafficlayer#bicycling_layer.
function initialize() {
var myLatlng = new google.maps.LatLng(42.3726399, -71.1096528);
var mapOptions = {
zoom: 14,
center: myLatlng
};
var map = new google.maps.Map(
document.getElementById('map-canvas'),
mapOptions);
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
Looking at the code on the page you linked to, I am thinking I could modify it like this:
add_action('wp_footer' , 'geodir_set_custom_map_style');
function geodir_set_custom_map_style()
{
?>
<script>
var geodir_custom_map_style =[
// Google Map Bicycling Layer Starts Here
function initialize() {
var map = new google.maps.Map(
document.getElementById('map-canvas'),
mapOptions);
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
// Google Map Bicycling Later End Here
]
</script>
<?php
}
Your thoughts?