Before the MarkerImage class becomes obsolete (which means it is still supported, but needs to be replaced) in favor of the Icon object, you could write something like this for a simple image:
var qthIconHouse20 = new google.maps.MarkerImage( 'grafx/house_icon_20.png', new google.maps.Size(20, 20), new google.maps.Point(0, 0), new google.maps.Point(10, 10) );
Now, using the Icon object, you should write this:
var qthIconHouse20 = { url: 'grafx/house_icon_20.png', size: new google.maps.Size(20, 20), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(10, 10), scaledSize: new google.maps.Size(20, 20) };
Pay attention to the additional parameter scaledSize: for simple images, this is the size of the original image, which in this particular case coincides with the size parameter.
For sprites where you have multiple images contained in a single image file, you can use something like this:
var qthIconBlueSpot16 = { url: 'grafx/qth_icon_spots_16.png', size: new google.maps.Size(16, 16), origin: new google.maps.Point(0, 32), anchor: new google.maps.Point(8, 8), scaledSize: new google.maps.Size(16, 48) };
Please note that in this example, the beginning was indicated as (0, 32) in the sprite containing several 16 * 16-pixel images: therefore, here we select the third image in the sprite. Within this part of the image, we set the snap (8, 8) - that is, in the middle of the selected part of the image that should be displayed. Finally, scaledSize here refers to the size of the entire sprite.