1

I want to change the style of my Google Maps. I am using jQuery-UI-Map, but I can't figure out how.

Here's the code I am using right now:

$(document).ready(function(){
    $("#changeMap").click(function(){
        alert('About to change style...');
        $('#map_canvas').gmap({styles: mapStyleRed});
    });
});

The message box is being fired, but the map is not being updated to my "mapStyleRed".

Hamster_NL
  • 153
  • 1
  • 14

1 Answers1

0

It's always nice to find the answer a few minutes after posting a question...

$(document).ready(function(){
    $("#changeMap").click(function(){
        alert('About to change style...');
        $('#map_canvas').gmap('get','map').setOptions({styles: mapStyleRed});
    });
});
Hamster_NL
  • 153
  • 1
  • 14