title: Displaying marker data in primefaces gmap
body: <p>I am using primefaces to manage a gmap. 
  I display some markers on the map that result of a query using some parameters passed by the user. </p>
  
  <p>I would like to display more informations when a user click on the marker but I don't succeed in displaying the marker.data. </p>
  
  <p>map.xhtml : </p>
  
  <pre><code>&lt;p:gmap center="53.483959, -2.244644" zoom="7" type="HYBRID" style="width:100%;height:800px" model="#{poc_InputManager.mymap}" &gt;                    
                  &lt;p:ajax event="overlaySelect" listener="#{poc_InputManager.onMarkerSelect}" /&gt;
                  &lt;p:gmapInfoWindow id="infoWindow"&gt;
                  &lt;p:outputPanel style="text-align: center; display: block; margin: auto"&gt;      
                  &lt;h:outputText value="#{poc_InputManager.marker.data}" /&gt;
  
                  &lt;/p:outputPanel&gt;
                  &lt;/p:gmapInfoWindow&gt;
  &lt;/p:gmap&gt;
  </code></pre>
  
  <p>java code : </p>
  
  <pre><code>public MapModel getMymap() throws Exception {
      mymap=new DefaultMapModel();
      ArrayList&lt;POC_LocationsPostalCode&gt; ad = lpcdao.getCodesFiltered(selectedsta);
  
      for (int  i = 0 ;i&lt;ad.size();i++){          
           LatLng tmpcoord = new LatLng(ad.get(i).getLat(),ad.get(i).getLng());
           Marker m = new Marker(tmpcoord, ad.get(i).getLocationcode());
           m.setData("TEST");
           mymap.addOverlay(m);
      }
      return mymap;
  }
  </code></pre>
  
  <p>In this example, when the user click on the marker it should display "TEST". 
  Ultimately the goal is to display some informations that are retrieved by a query using the title of the marker.</p>