diff -uNr wt-3.2.1-rc3/src/Wt/WGoogleMap wt-3.2.1-rc3-mod/src/Wt/WGoogleMap
--- wt-3.2.1-rc3/src/Wt/WGoogleMap	2012-03-23 13:14:23.000000000 +0100
+++ wt-3.2.1-rc3-mod/src/Wt/WGoogleMap	2012-04-03 16:23:06.922752459 +0200
@@ -129,7 +129,7 @@
 
   /*! \brief Adds a marker overlay to the map.
    */
-  void addMarker(const Coordinate &pos);
+  void addMarker(const Coordinate &pos, const WString& aMessage = "");
 
   /*! \brief Adds a polyline overlay to the map.
    *
@@ -152,7 +152,8 @@
 
   /*! \brief Adds a icon marker overlay to the map.
    */
-  void addIconMarker(const Coordinate &pos, const std::string& iconURL);
+  void addIconMarker(const Coordinate &pos, const std::string& iconURL,
+                      const WString& aMessage = "");
 
   /*! \brief Removes all overlays from the map.
    */
@@ -320,6 +321,7 @@
   void setMapOption(const std::string &option, 
 		    const std::string &state);
 
+  static volatile boost::uint32_t markerIndex_;
 private:
   ApiVersion apiVersion_;
 };
diff -uNr wt-3.2.1-rc3/src/Wt/WGoogleMap.C wt-3.2.1-rc3-mod/src/Wt/WGoogleMap.C
--- wt-3.2.1-rc3/src/Wt/WGoogleMap.C	2012-03-23 13:14:23.000000000 +0100
+++ wt-3.2.1-rc3-mod/src/Wt/WGoogleMap.C	2012-04-03 16:35:41.582752247 +0200
@@ -13,6 +13,7 @@
 
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>
+#include <boost/interprocess/detail/atomic.hpp>
 
 #include <string>
 #include <utility>
@@ -102,6 +103,10 @@
 // example javascript code from :
 // http://code.google.com/apis/maps/documentation/
 
+
+volatile boost::uint32_t WGoogleMap::markerIndex_ = 0;
+
+
 WGoogleMap::WGoogleMap(ApiVersion version, WContainerWidget *parent)
  : clicked_(this, "click"),
    doubleClicked_(this, "dblclick"),
@@ -277,7 +282,7 @@
     additions_.push_back(jscode);
 }
 
-void WGoogleMap::addMarker(const Coordinate& pos)
+void WGoogleMap::addMarker(const Coordinate& pos, const WString& aMessage)
 {
   std::stringstream strm;
 
@@ -286,20 +291,36 @@
 	 << pos.latitude() << ", " << pos.longitude() << "));"
 	 << jsRef() << ".map.addOverlay(marker);";
   } else {
-    strm << "var position = new google.maps.LatLng("
-	 << pos.latitude() << ", " << pos.longitude() << ");"
-	 << "var marker = new google.maps.Marker({"
-	 << "position: position,"
-	 << "map: " << jsRef() << ".map"
-	 << "});"
-	 << jsRef() << ".map.overlays.push(marker);";
+    // Atomically increment the index and returns the pre-increment variable value
+    std::string mySuffixString = boost::lexical_cast<std::string>(boost::interprocess::detail::atomic_inc32(&markerIndex_));
+
+    strm  << "var position = new google.maps.LatLng("
+          << pos.latitude() << ", " << pos.longitude() << ");"
+
+          << "var marker_" + mySuffixString + " = new google.maps.Marker({"
+	        << "position: position,"
+	        << "map: " << jsRef() << ".map"
+	        << "});";
+
+    if (not aMessage.empty()) {
+      strm  << "var infowindow_" + mySuffixString + " = new google.maps.InfoWindow({"
+	          << "content: " << WWebWidget::jsStringLiteral(aMessage) << ","
+	          << "size: new google.maps.Size(50,50) });"
+
+	          << "google.maps.event.addListener(marker_" + mySuffixString + ", 'click', function() {"
+	          << "infowindow_" + mySuffixString + ".open(" << jsRef() << ".map" << ", marker_" + mySuffixString + ");"
+	          << "});";
+    }
+
+    strm  << jsRef() << ".map.overlays.push(marker_" + mySuffixString + ");";
   }
 
   doGmJavaScript(strm.str());
 }
 
 void WGoogleMap::addIconMarker(const Coordinate &pos,
-                               const std::string& iconURL)
+                               const std::string& iconURL,
+                               const WString& aMessage)
 {
   std::stringstream strm;
   
@@ -307,16 +328,30 @@
     throw std::logic_error("WGoogleMap::addIconMarker is not supported "
                            "in the Google Maps API v2.");
   } else {
-    strm << "var position = new google.maps.LatLng("
-         << pos.latitude() << ", " << pos.longitude() << ");"
-      
-         << "var marker = new google.maps.Marker({"
-	 << "position: position,"
-	 << "icon: \"" <<  iconURL << "\","
-         << "map: " << jsRef() << ".map"
-	 << "});"
-      
-         << jsRef() << ".map.overlays.push(marker);";
+    // Atomically increment the index and returns the pre-increment variable value
+    std::string mySuffixString = boost::lexical_cast<std::string>(boost::interprocess::detail::atomic_inc32(&markerIndex_));
+
+    strm  << "var position = new google.maps.LatLng("
+          << pos.latitude() << ", " << pos.longitude() << ");"
+     
+          << "var marker_" + mySuffixString + " = new google.maps.Marker({"
+          << "position: position,"
+          << "icon: \"" <<  iconURL << "\","
+          << "map: " << jsRef() << ".map"
+          << "});";
+
+    if (not aMessage.empty()) {
+      strm  << "var infowindow_" + mySuffixString + " = new google.maps.InfoWindow({"
+            << "content: " << WWebWidget::jsStringLiteral(aMessage) << ","
+            << "size: new google.maps.Size(50,50) });"
+
+            << "google.maps.event.addListener(marker_" + mySuffixString + ", 'click', function() {"
+            << "infowindow_" + mySuffixString + ".open(" << jsRef() << ".map" << ", marker_" + mySuffixString + ");"
+            << "});";
+    }
+
+    strm  << jsRef() << ".map.overlays.push(marker_" + mySuffixString + ");";
+
   }
  
   doGmJavaScript(strm.str());
