Google maps PrimeFaces Gmap不显示
我想使用primefaces gmap,我的xhtml文件如下:Google maps PrimeFaces Gmap不显示,google-maps,jsf,primefaces,Google Maps,Jsf,Primefaces,我想使用primefaces gmap,我的xhtml文件如下: <ui:fragment xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:
<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript" ></script>
<p:dataGrid id="list" var="l" value="#{bean.list}" columns="1" style="width:100%">
<h:form>
<f:view contentType="text/html">
<p:gmap center="41.381542,2.122893" zoom="15" type="HYBRID" style="width:100%;height:400px"/>
</f:view>
</h:form>
<p:fieldset collapsed="true" toggleable="true" toggleSpeed="500" legend="#{l.username}"
style="text-align:left">
<h:panelGrid columns="2" style="width:100%">
.
.
.
.
</h:panelGrid>
</p:fieldset>
</p:dataGrid>
.
.
.
.
但是地图没有显示,问题是什么?我如何解决它?而不是我使用的ui:fragment
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
代替ui:我使用的片段
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">