Search code examples
google-mapsgoogle-maps-api-3cursor

Do google maps' draggableCursor and draggingCursor options no longer work?


I am trying the following, but the cursor does not change from the default (arrow cursor):

var opts = {
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    center: new google.maps.LatLng(0, 0),
    zoom: 1,
    draggable: true,
    draggingCursor: 'move',
    draggableCursor: 'pointer'
}
var map = new google.maps.Map(document.getElementById('map_canvas'), opts);

Update

@Dr.Molle, good point about browser. In IE8, draggableCursor works but draggingCursor does not. In FF 12.0 and Chrome 23.0.1271.97 m, neither works.


Solution

  • Blast from the past. I figured out where this was coming from, but forgot to return here and answer the question.

    It turns out this was happening because we had a reset.css file that was applying cursor: default; to all div's. The fix was to apply an override like so on the page that rendered the map:

    #google_map_canvas * {
        cursor: inherit;
    }