﻿GbgMap.API.Popup = OpenLayers.Class(OpenLayers.Popup, {
    
    size : new OpenLayers.Size(272, 'auto'),


    updatePosition: function () {

        if ((this.lonlat) && (this.map)) {
            var px = this.map.getLayerPxFromLonLat(this.lonlat);
            if (px) {
                
                px.x -= this.contentDiv.style.width.split('px')[0] / 2;
                px.y = px.y - this.contentDiv.style.height.split('px')[0] - 10;
                this.moveTo(px);
            }
        }
    },

    CLASS_NAME: "GbgMap.API.Popup"
});

