3

I am using gmaps4jsf jar file and getting dynamic marker on google map. marker having some information and once i click on marker then get the popup and i wrote there "Click me!" i want to provide link on marker data

jsf code:

<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>
Piyush Gupta
  • 2,181
  • 3
  • 13
  • 28
  • you mean you want to display information on marker and that information should be linkable? – Piyush Gupta Dec 10 '15 at 11:17
  • Yes on marker showing "click me". i want to provide link only me not click, Is it possible? –  Dec 10 '15 at 11:20
  • I have a lots of solution using google api but i want to output through gmaps4jsf –  Dec 10 '15 at 11:21

1 Answers1

1

you want to write somthing like this,

<m:htmlInformationWindow htmlText="Click <a href='info.xhtml' target='_blank'>me!</a>" />

target='_blank' means you link will be open in new tab if you want to open same tab then you can remove the target.

but in jsf you can't acheive symbol without & operater so you need to like this where &lt; means "<" and &gt means ">"

<m:htmlInformationWindow htmlText="Click &lt;a href='info.xhtml' target='_blank'&gt;me!&lt;/a&gt;" />
Piyush Gupta
  • 2,181
  • 3
  • 13
  • 28