You need to bind custom controls to the functions that you want to execute on the map itself, but to add a custom control using jQuery to control the DOM, follow these steps:
$(function () {
var myOptions = {
...
mapTypeControl: false
}
map = new google.maps.Map($mapDiv, myOptions);
...
$control = $(".myControlSelector").detach();
map.controls[google.maps.ControlPosition.TOP_RIGHT].push($control[0]);
});
More documentation is here: http://code.google.com/apis/maps/documentation/javascript/controls.html#CustomControls
source
share