/**
 * Document geographic info component.
 * 
 * @namespace Alfresco
 * @class Alfresco.DocumentGeographicInfo
 */
(function()
{
   /**
    * YUI Library aliases
    */
   var Dom = YAHOO.util.Dom;
   
   /**
    * Alfresco Slingshot aliases
    */
   var $html = Alfresco.util.encodeHTML;
   
   /**
    * DocumentGeographicInfo constructor.
    * 
    * @param {String} htmlId The HTML id of the parent element
    * @return {Alfresco.DocumentGeographicInfo} The new DocumentGeographicInfo instance
    * @constructor
    */
   Alfresco.DocumentGeographicInfo = function(htmlId)
   {
      Alfresco.DocumentGeographicInfo.superclass.constructor.call(this, "Alfresco.DocumentGeographicInfo", htmlId);
      
      /* Decoupled event listeners */
      YAHOO.Bubbling.on("documentDetailsAvailable", this.onDocumentDetailsAvailable, this);
      
      return this;
   };
   
   YAHOO.extend(Alfresco.DocumentGeographicInfo, Alfresco.component.Base,
   {
      /**
       * Event handler called when the "documentDetailsAvailable" event is received
       *
       * @method: onDocumentDetailsAvailable
       */
      onDocumentDetailsAvailable: function DocumentGeographicInfo_onDocumentDetailsAvailable(layer, args)
      {
         var docData = args[1].documentDetails;
         this.mapContainer = Dom.get(this.id + "-map");

         if (typeof(docData.geolocation) === "object" &&
               typeof(docData.geolocation.latitude) !== "undefined")
         {
            this.initializeMap(docData);
            Dom.removeClass(this.id + "-body", "hidden");
         }
      },
   
      /**
       * Initialise the map itself
       * @method initializeMap
       */
      initializeMap: function SiteGeotaggedContent_initializeMap(doc)
      {
         var latLng = new google.maps.LatLng(doc.geolocation.latitude, doc.geolocation.longitude);
         var myOptions = 
         {
            zoom: 10,
            center: latLng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
         }
         var map = new google.maps.Map(this.mapContainer, myOptions);
         var marker = new google.maps.Marker(
         {
            position: latLng,
            map: map,
            title: doc.fileName
         });
      }
   });
})();
@@ -950,32 +950,245 @@
 %0A   %7B%0A      /**%0A
+       * GMap object%0A       */%0A      map: null,%0A      %0A      /**%0A       * GMap marker%0A       */%0A      marker: null,%0A      %0A      /**%0A       * Map container div%0A       */%0A      mapContainer: null,%0A      %0A      /**%0A
        * Event h
@@ -1679,49 +1679,8 @@
   %7B%0A
-            this.initializeMap(docData);%0A
     
@@ -1733,16 +1733,311 @@
 dden%22);%0A
+            %0A            if (this.map == null)%0A            %7B%0A               this.initializeMap(docData);%0A            %7D%0A            else%0A            %7B%0A               this.updateMap(docData);%0A            %7D%0A         %7D%0A         else%0A         %7B%0A            Dom.addClass(this.id + %22-body%22, %22hidden%22);%0A
         
@@ -2475,20 +2475,21 @@
         
-var 
+this.
 map = ne
@@ -2546,20 +2546,724 @@
         
-var 
+this.marker = new google.maps.Marker(%0A         %7B%0A            position: latLng,%0A            map: this.map,%0A            title: doc.fileName%0A         %7D);%0A      %7D,%0A   %0A      /**%0A       * Update the map view%0A       * @method updateMap%0A       */%0A      updateMap: function SiteGeotaggedContent_updateMap(doc)%0A      %7B%0A         // First clear any existing marker%0A         if (this.marker != null)%0A         %7B%0A            this.marker.setMap(null);%0A            this.marker = null;%0A         %7D%0A         // Then re-center the map%0A         var latLng = new google.maps.LatLng(doc.geolocation.latitude, doc.geolocation.longitude);%0A         this.map.panTo(latLng);%0A         // Then add the new marker to the map%0A         this.
 marker =
@@ -3345,16 +3345,21 @@
    map: 
+this.
 map,%0A   

Fix UI rendering glitches in Document Geographic Details component, plus hide the map if the Geographic aspect is removed.