想要使用 gmaps4jsf 在地图上标记 link 显示信息
want to display information with link to marker on map using gmaps4jsf
我正在使用 gmaps4jsf jar 文件并在 google 地图上获取动态标记。标记有一些信息,一旦我点击标记然后弹出窗口,我在那里写了 "Click me!" 我想提供 link 标记数据
jsf代码:
<m:map id="map" width="650px" height="450px" latitude="#{map.latitude}" longitude="#{map.longitude}" enableScrollWheelZoom="true" zoom="9">
<m:marker latitude="#{point2.latitude}" longitude="#{point2.longitude}" >
<m:htmlInformationWindow htmlText="Click me!" />
</m:marker>
</m:map>
<p:column>
<p:commandButton value="Display" action="#{map.display}" update="form"/>
</p:column>
你想写这样的东西,
<m:htmlInformationWindow htmlText="Click <a href='info.xhtml' target='_blank'>me!</a>" />
target='_blank' 意味着你 link 将在新标签中打开,如果你想打开相同的标签然后你可以删除目标。
但是在 jsf 中你不能在没有 & 操作符的情况下获得符号所以你需要像这样 < means "<" and > means ">"
<m:htmlInformationWindow htmlText="Click <a href='info.xhtml' target='_blank'>me!</a>" />
我正在使用 gmaps4jsf jar 文件并在 google 地图上获取动态标记。标记有一些信息,一旦我点击标记然后弹出窗口,我在那里写了 "Click me!" 我想提供 link 标记数据
jsf代码:
<m:map id="map" width="650px" height="450px" latitude="#{map.latitude}" longitude="#{map.longitude}" enableScrollWheelZoom="true" zoom="9">
<m:marker latitude="#{point2.latitude}" longitude="#{point2.longitude}" >
<m:htmlInformationWindow htmlText="Click me!" />
</m:marker>
</m:map>
<p:column>
<p:commandButton value="Display" action="#{map.display}" update="form"/>
</p:column>
你想写这样的东西,
<m:htmlInformationWindow htmlText="Click <a href='info.xhtml' target='_blank'>me!</a>" />
target='_blank' 意味着你 link 将在新标签中打开,如果你想打开相同的标签然后你可以删除目标。
但是在 jsf 中你不能在没有 & 操作符的情况下获得符号所以你需要像这样 < means "<" and > means ">"
<m:htmlInformationWindow htmlText="Click <a href='info.xhtml' target='_blank'>me!</a>" />