Gmap is blank

UI Components for JSF
Post Reply
deelo55
Posts: 33
Joined: 19 Jul 2010, 22:48

19 Jul 2010, 22:54

I'm trying to use the primefaces 2.1 RC1 google maps component but it comes out blank:

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
       xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
</h:head>
<h:body>
    <p:gmap center="41.381542, 2.122893" zoom="15" type="HYBRID" style="width:600px;height:400px" />
</h:body>
</html>
This renders the following HTML which displays as blank in my browser:

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml"><head> 
<script type="text/javascript" src="/primefaces_resource/2.1-SNAPSHOT/yui/utilities/utilities.js"></script> 
<script type="text/javascript" src="/primefaces_resource/2.1-SNAPSHOT/jquery/jquery.js"></script> 
<script type="text/javascript" src="/primefaces_resource/2.1-SNAPSHOT/primefaces/core/core.js"></script> 
<script type="text/javascript" src="/primefaces_resource/2.1-SNAPSHOT/primefaces/gmap/gmap.js"></script> 
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script></head><body><div id="j_idt4" style="width:600px;height:400px"></div><script type="text/javascript"> 
//<![CDATA[
widget_j_idt4 = new PrimeFaces.widget.GMap('j_idt4',{mapTypeId:google.maps.MapTypeId.HYBRID,center:new google.maps.LatLng(41.381542, 2.122893),zoom:15});
//]]>
</script></body> 
</html>
Last edited by deelo55 on 03 Aug 2010, 07:59, edited 1 time in total.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

20 Jul 2010, 00:48

Does the online showcase work for you with your browser? Can you do a quick test using;

http://www.primefaces.org:8080/prime-sh ... pBasic.jsf

deelo55
Posts: 33
Joined: 19 Jul 2010, 22:48

20 Jul 2010, 15:49

I was missing the f:view tags...

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

21 Jul 2010, 16:16

Thanks for sharing the solution.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 58 guests