0 Replies Latest reply on Nov 13, 2010 7:27 PM by alpha.overl0rd_z.yahoo.com

    Adding kml layers to google maps in seam

    alpha.overl0rd_z.yahoo.com

      Hi, I just started using seam framework and I need some help.


      I used seam 2.2.0.GA to generate and deploy web application using postgresql/postgis database to jboss 6.0.0.M5 server. Database contains one table with spatial data. I added google maps on one page using rich:gmap, and now I need to add some KML layers to that map to represent that spatial data from db. But whatever I use, it doesn't work. I found all sorts of examples in html/javascript which are fairly simple and effective, but they don't work in xhtml. I used this:




      <rich:gmap  
        id="map"
        gmapVar="map" 
        gmapKey="...key...."
        style="width:580px;height:400px" 
        lat="41.875696"
        lng="-87.624207"
        zoom="11"
        mapType="G_NORMAL_MAP"
        oninit="init(map)"/>
                                   
      <script type="text/javascript">
      function init(map)
      {               
        var kml = new GGeoXml("http://localhost:8080/swat/KML/cta.kml");
        map.addOverlay(kml)
      }
      </script>



      Can anyone help? Thx.