emnadridi / gmaps4jsf

Automatically exported from code.google.com/p/gmaps4jsf
0 stars 0 forks source link

htmlInfoWindow should be a child of the marker component #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As requested by damian:

"This came about from viewing the examples and seeing that there was no
clean support for opening/closing information boxes. The example is to
show simple and complex coordinate between the m:map and other jsf
components.

Simple: There are 9 markers on a map, each one a member of the Brady
family. Clicking on a marker should bring up an information box with a
picture of the Brady and bio data. Potentially the marker could be a
thumbnail.

Viewing the source markers and infos are tied to a coordinate. Having
checked in the google maps api a marker has an info 'set' on it. This
binding could be done in jsf two ways:

<m:marker info="${bean.myinfo}" .../>

or:

<m:marker ...
<!-- child element-->
<m:info/>
</m:marker>

Inside the m:map a suitable iterator can produce m:markers (possibly
ice:panelSeries - which has nothing to do with panels). jstl tags
don't like to cooperate inside jsf.

Complex: There is a 3x3 grid of the Brady Bunch family next to a map.
Clicking on a Brady family member creates a marker on the map or moves
to the marker. clicking on the marker opens the info. This will be a
common scenario of locating 'things', such as members of a dvd store
and where rented out dvds are. e.g. query for Iron Man dvd, get a
result set, and start locating rented copies.

damian."

Original issue reported on code.google.com by Hazem.sa...@gmail.com on 27 Sep 2008 at 9:12

GoogleCodeExporter commented 9 years ago

Original comment by Hazem.sa...@gmail.com on 27 Sep 2008 at 9:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Solved, you can now attach information to the marker using the 
htmlInformationWindow
component.

Here is an example)
    <m:marker>
            <m:htmlInformationWindow htmlText="Iam MarkerA"/>
    </m:marker>

By default the information will appear when clicking the Marker component. 
However,
you can change the event of information showing by using the 
"showInformationEvent"
attribute in the marker.

Original comment by Hazem.sa...@gmail.com on 27 Sep 2008 at 11:01

GoogleCodeExporter commented 9 years ago

Original comment by Hazem.sa...@gmail.com on 13 Apr 2009 at 5:52

GoogleCodeExporter commented 9 years ago

Original comment by Hazem.sa...@gmail.com on 13 Apr 2009 at 5:54

GoogleCodeExporter commented 9 years ago
When you attach the information window to the marker, how do you have the 
information
show by default (without requiring the user to click the marker first)? I tried
several events, including "load", but nothing seems to work. I also tried 
leaving off
attribute showInformationalEvent, but it seems to default to "click". I would 
just
like the marker to show up. Thanks.
<m:marker>
  <m:htmlInformationWindow rendered="true" htmlText="#{countryList.list[quiz.answer]}"/>
</m:marker>

I am using gmaps4jsf-1.1.3-SNAPSHOT.jar

Thanks very much!

Original comment by g...@asgteach.com on 17 Mar 2010 at 5:36

GoogleCodeExporter commented 9 years ago
@gail:

You can do this by:

<m:map>
  <m:marker longitude="lng1" latitude="lat1"/>
  <m:htmlInformationWindow longitude="lng1" latitude="lat1"/>
</m:map>

As you see, you should make the marker and htmlInformationWindow coordinates 
the same.

This is all about.

Thanks for using GMaps4JSF, and if you can give us a URL to your application, 
we will
appreciate much!

Original comment by Hazem.sa...@gmail.com on 17 Mar 2010 at 6:23

GoogleCodeExporter commented 9 years ago
Thanks, Hazem, for your quick reply. The solution you have provided does indeed
display both the marker and the information window by default. However, I would 
like
the information window to appear on top of the marker, which is the visual
arrangement you get when you make the information window tag a child of marker. 
It
looks much better this way.

But, making it a child of marker apparently prohibits you from displaying the
information window by default? Or, is there another solution?

Thanks very much!
Gail

Original comment by g...@asgteach.com on 18 Mar 2010 at 1:25

GoogleCodeExporter commented 9 years ago
I understand your point, please open a feature request here so it will be 
included soon:
http://code.google.com/p/gmaps4jsf/issues/list

Original comment by Hazem.sa...@gmail.com on 18 Mar 2010 at 6:41