javascript - Styling standard Zoom control in Google Maps v3 -
is there easy way style zoom control in google maps javascript api v3? want change standard image (http://maps.gstatic.com/intl/en_all/mapfiles/mapcontrols3d6.png) 1 without implementing of custom control. tried change in dom jquery cannot find right place this. tips appreciated
so came solution following on tilesloaded
event of map
:
var stylezoomcontrol = function () { var imgs = mapcanvas.find('img[src$="mapfiles/mapcontrols3d6.png"]'); if (imgs.length > 0 || mapcanvas.find('img[src$="mapfiles/szc3d.png"]').length > 0) { if (imgs.length > 0) imgs.attr('src', '/design/consumer/images/zoom-control.png'); } else { settimeout(stylezoomcontrol, 200); } }
Comments
Post a Comment