First of all let me say how much I am enjoying gmaps4jsf. Really great stuff.
I've started a new project this week using version 3 of GMaps and gmaps4jsf version 3.0.0.
I'm using the binding attribute of the map component and dynamically generating some markers with custom icons and updating them successfully based on some list choices from elsewhere on the page.
<m:map width="800px" height="800px" binding="#{mappingSessionBean.newMap}" >
I think I have all the functionality I need here to move forward except a mechanism for putting a text label next to the markers similiar to the javascript MarkerWithLabel.
I noticed the bean variables have a declaration for .setLabel and .setTitle, but they do not seem to have any effect on the marker on the map.
Here is a snippet of a test declaration of a marker I'm current working on.
com.googlecode.gmaps4jsf.component.marker.Marker mark = new com.googlecode.gmaps4jsf.component.marker.Marker();
mark.setLatitude("49.47805");
mark.setLongitude("-123.84716");
mark.setJsVariable("office1");
mark.setId("mark1");
mark.setLabel("Marco");
mark.setTitle("Polo");
com.googlecode.gmaps4jsf.component.icon.Icon icon = new com.googlecode.gmaps4jsf.component.icon.Icon();
mark.getChildren().add(icon);
newMap.getChildren().add(mark);
I'm sure I am just missing something, can you help me out? I would rather stick the the binding of the map into the bean, but I've had some luck getting the other features I need with the ui:repeat function and tying that data to my list of markers in the bean as well. I'd be glad to switch back to that if I need too. Just as long as I can find a way to add this darn label.
Mike