我正在使用gmaps4jsf
在我的應用程序中顯示Google地圖,但我想在用戶鍵入他/她的延伸,城市,州和國家後更新地圖。這樣我可以動態地給gmaps4jsf
提供更準確的信息。如何刷新JSF中的模糊事件後的組件
但是我每次填充一些字段時,地圖就消失了。我與state
這樣做,例如:
State:<h:message id="m_state" for="state" styleClass="red" /><br/>
<h:selectOneMenu id="state" value="#{propertyC.property.addressState.state}">
<f:selectItem itemLabel="" itemValue="" />
<f:selectItems value="#{addressB.states('US')}" var="state" itemValue="#{state.key}" itemLabel="#{state.value}" />
<f:ajax event="blur" render="m_state map" />
</h:selectOneMenu>
<br/>
// others fields
<m:map id="map" width="425px" height="250px" address="#{propertyC.property.street}, #{propertyC.property.addressCity.city}, #{propertyC.property.addressState.state}, #{propertyC.property.addressCountry.country}, #{propertyC.property.cep}" zoom="25" autoReshape="true" >
<m:marker>
<m:icon imageURL="http://i.imgur.com/WFJo62Q.png"/>
</m:marker>
</m:map>
我怎樣才能顯示在地圖動態爲用戶鍵入他/她的地址是什麼?
哪您使用的是GMaps4JSF版本嗎? – 2013-04-29 13:48:32
@AlexandreLavoie,最後一個版本3. – 2013-04-29 21:49:07
昨天我試了一下你的例子,同樣的問題,我會在1.1.4這個晚上試試我的舊項目,很快回來! – 2013-04-30 00:12:51