我gmaps4jsf
以前在我的应用程序中显示谷歌地图,但我想在用户输入他/她的街道、城市、州和国家/地区后更新地图。这样我可以gmaps4jsf
动态地提供更准确的信息。
但是每次我填写一些字段时,地图就消失了。例如,我正在这样做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>
当用户输入他/她的地址时,如何动态显示地图?