

bqc.ClusterMarker = Class.create(bqc.Marker, {

    getIcon: function() {
        return bqc.clusterIcon;
    },

    clickHandler: function() {
        var bounds = new GLatLngBounds(
            new GLatLng(this.json.extent.ymin, this.json.extent.xmin),
            new GLatLng(this.json.extent.ymax, this.json.extent.xmax));
        this.map.closeInfoWindow();
        this.map.setCenter(bounds.getCenter(), this.map.getBoundsZoomLevel(bounds));
        bounds = getIncreasedBounds(this.map, bqc.markedIconAnchor.x, bqc.markedIconAnchor.y, bqc.markedIconAnchor.x);
        this.map.setCenter(bounds.getCenter(), this.map.getBoundsZoomLevel(bounds));
    },

    showTooltip: function() {
         if (this.marker != null) {
            this.searchManager.tooltipManager.showCustomTooltip(this.marker.getLatLng(), this.json.nb+  bqc.locale.tooltip.clusterPoints);
        }
    }
});

bqc.createClusterIcon = function(img) {
    var iconNode = new GIcon();
    iconNode.image = img;
    iconNode.shadow = '';
    iconNode.transparent='images/cluster_trans.png';
    iconNode.imageMap=[0,0, 16,0, 16,16, 0,16];
    iconNode.iconSize = new GSize(21, 21);
    iconNode.shadowSize = new GSize(0, 0);
    iconNode.iconAnchor = new GPoint(8, 7);
    iconNode.infoWindowAnchor = new GPoint(8, 0);
    iconNode.dragCrossSize = GSize(1, 1);
    iconNode.maxHeight = 1;
    return iconNode;
}
bqc.clusterIcon = bqc.createClusterIcon('images/cluster.png');
