添加标签后,地图不会呈现。当我删除标签时,地图将呈现。请协助。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title></title>
<h:outputStylesheet library="css" name="base.css" />
</h:head>
<h:body>
<h:form>
<p:gmap
center="#{initParam['centerLatitude']}, #{initParam['centerLongitude']}"
zoom="#{initParam['centerZoom']}" type="map"
style="width:100%;height:100%" model="#{mapBean.mapModel}">
<p:ajax listener="#{mapBean.onMarkerSelect}" event="overlaySelect" />
</p:gmap>
</h:form>
<script
src="https://maps.googleapis.com/maps/api/js?key=#{initParam['googleApiKey']}&callback=initMap"></script>
</h:body>
</html>
当我从样式标签中的100%高度更改为600px时,地图再次显示。问题似乎是100%的高度。