使用 gmaps4jsf 显示标记(不是 google api)
Display marker using gmaps4jsf(not google api)
我正在使用 gmaps4jsf jar 并尝试在地图上显示标记。标记显示正常但不是自动缩放功能。每次我需要改变缩放值时,gmaps4jsf 中是否有任何选项以便我们可以获得自动缩放功能?
<m:map latitude="10.132567" longitude="10.132567" height="400px" width="400px" zoom="6">
<ui:repeat var="p" value="#{pointBean.points2}" varStatus="status" offset="0" step="1" size="#{pointBean.points2.size()}">
<m:marker latitude="#{p.latitude}" longitude="#{p.longitude}" >
<m:htmlInformationWindow htmlText="#{p.latitude}-#{p.longitude}" />
</m:marker>
</ui:repeat>
</m:map>
提前致谢!!!
您需要将 autoReshape="true"
放在地图标签中,例如
<m:map autoReshape="true">.....</map>
autoReshape 只是在地图上调整标记,你只会得到标记显示。
我正在使用 gmaps4jsf jar 并尝试在地图上显示标记。标记显示正常但不是自动缩放功能。每次我需要改变缩放值时,gmaps4jsf 中是否有任何选项以便我们可以获得自动缩放功能?
<m:map latitude="10.132567" longitude="10.132567" height="400px" width="400px" zoom="6">
<ui:repeat var="p" value="#{pointBean.points2}" varStatus="status" offset="0" step="1" size="#{pointBean.points2.size()}">
<m:marker latitude="#{p.latitude}" longitude="#{p.longitude}" >
<m:htmlInformationWindow htmlText="#{p.latitude}-#{p.longitude}" />
</m:marker>
</ui:repeat>
</m:map>
提前致谢!!!
您需要将 autoReshape="true"
放在地图标签中,例如
<m:map autoReshape="true">.....</map>
autoReshape 只是在地图上调整标记,你只会得到标记显示。