gpt4 book ai didi

java - gmaps primefaces 问题

转载 作者:行者123 更新时间:2023-11-29 09:08:51 26 4
gpt4 key购买 nike

当我加载页面时,它会显示 map 并且只显示灰色屏幕。当前显示为图像。这是我的代码:

<html 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"
xmlns:m="http://code.google.com/p/gmaps4jsf/">

<h:head>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>

</h:head>

<h:body>


<h1>Google Map</h1>

<h:form>

<f:view contentType="text/html">
<p:gmap center="41.381542,2.122893" zoom="15" type="HYBIRD"
style="width:600px;height:400px" />
</f:view>

</h:form>
</h:body>

最佳答案

您是否尝试过在没有 f:view 标签的情况下定义 p:gmap?我认为还定义了

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true" />

没有必要。

关于java - gmaps primefaces 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13443142/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com