// gmapper -- modified createMarker with centered anchor
function createSquareMarker(point, image, title) {
	var icon = new GIcon();
	icon.image = image[0];
	icon.iconSize = new GSize(image[1], image[2]);
	var anchor = parseInt(image[1]/2);
	icon.iconAnchor= new GPoint(anchor, anchor);
	var marker = new GMarker(point,{icon:icon,title:title});
	return marker;
}

// gmapper -- modified createOtherMarker with centered anchor
function createOtherSquareMarker(point,info,image) {
	var icon = new GIcon();
	icon.image = image[0];
	icon.iconSize = new GSize(image[1], image[2]);
	var anchor = Math.ceil(image[1]/2);
	icon.iconAnchor= new GPoint(anchor, anchor);
	var infoanchor = image[2] / 3;
	infoanchor = Math.floor(infoanchor);
	icon.infoWindowAnchor = new GPoint(infoanchor, 2);
	var marker = new GMarker(point,{icon:icon,zIndexProcess:importanceOrder});
	GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(info);});
	return marker;
}

// fix z-index
function importanceOrder (marker,b) {
	return GOverlay.getZIndex(marker.getPoint().lat()) + marker.importance*1000000;
}

