/**
 * Google maps V3 extras
 * The file extends the google.maps object and ads extra features and functionality
 * @author Radu Almasan
 * @version 0.1
 */



window.google = window.google || {};
google.maps = google.maps || {};



/**
 * Overlayer with street numbers
 */
google.maps.NumberOverlayer = function (tileSize) { this.tileSize = tileSize };
google.maps.NumberOverlayer.prototype.getTile = function(coord, zoom, ownerDocument) {
    coordXScale = this.tileSize.width / 256;
	coordYScale = this.tileSize.height / 256;
	coord256 = {
		x: coord.x * coordXScale,
		y: coord.y * coordYScale
	}

	var div = ownerDocument.createElement('div');
	div.style.width = this.tileSize.width + 'px';
	div.style.height = this.tileSize.height + 'px';

    if (zoom < 15 || zoom > 16) return div; // nr. overlay only available for zoom lvl 15 & 16

	div.style.background = 'url(' + media_url + 'img/maps/gmap_nr/img-' + zoom + '-' + coord.x + '-' + coord.y + '.png)';
	return div;
}
