|
It can be a child of the (map) component. AttributesBeside the JSF UIComponent standard attributes. | Component Attribute | Required | Description | Default value | | longitude | false | The longitude of the marker. If not set then the parent map longitude will be taken. | NA | | latitude | false | The latitude of the marker. If not set then the parent map latitude will be taken. | NA | | draggable | false | This flag determines whether the marker is draggable. | false | | jsVariable | false | This flag determines the Javascript variable you want to use for referring to the marker. Use this attribute if you want to use write additional Javascript code for the marker to customize it. | NA | | showInformationEvent (since 1.1.1) | false | This attribute determines the event on which the marker information will be shown. The marker information should be represented as a child htmlInformationWindow component of the marker component. | click | | showLocationNotFoundMessage (since 1.1.2) | false | This attribute determines whether to show an error message when the location is not found. | false | | submitOnValueChange (since 1.1.2) | false | This attribute determines whether to submit when the marker value changed. | false |
|
The marker tag does not seem to respect the rendered attribue: I tried marker rendered="false" and it still renders. Am I doing something wrong?
Please file an issue here, http://code.google.com/p/gmaps4jsf/issues/list
I filed the issue1?, and fixed it for you.
http://code.google.com/p/gmaps4jsf/issues/detail?id=8
I uploaded the last snapshot jar.
For creating multiple markers on a map, is there a way to dynamically set the zoom and center of the map to fit all the markers? It's possible to do this using JS by using the GBounds class. I can provide the JS to do this if you'd like.
Please do this, and open adding new feature issue here: http://code.google.com/p/gmaps4jsf/issues/list
Thanks!
I've opened the following issue for this: http://code.google.com/p/gmaps4jsf/issues/detail?id=10
The marker is always bouncy if draggable. Is there a way to set "bouncy=false"? Please advice.
I think that this behavior cannot be changed from the Google Maps APIs. If you find a way, please tell us, and we will add this as a new feature.
I can do this in JavaScript? as follows:
markerOptions = { draggable:true, bouncy:false }; marker = new GMarker(point, markerOptions);
The reason I am trying to set "bouncy=false" is that in my JSF page when the marker bounces it triggers the eventListner twice??!!!
<m:eventListener eventName="dragend" jsFunction="findStreetView"/>
In this case, if the street view for the marker location is not available I am doing a JS alert
alert("Sorry, there is no street view available for this location!");
When using GMaps4JSF it trigger this alert twice because the marker is bouncy. I think this is a bug since I have tried the same in JS and it didn't trigger the alert twice.
Please look into this and let me know if I need to do something, or if I am doing something wrong.
I will work on supporting this scenario.
Thank you!
First of all - forgive me if this is a dumb question (I'm rather new to JSF), but I didn't find anything like this in the examples here...
Is there a simple way to add multiple markers to a map, based on a dynamic list of coordinates from a managed JSF bean? I tried something like the following within the <m:map> (using tomahawk), to no effort...
<t:dataList var="loc" layout="simple" value="#{locbean.locations}"> <m:marker latitude="#{loc.latitude}" longitude="#{loc.longitude}"> </m:marker> </t:dataList>I'm working on this issue here: http://code.google.com/p/gmaps4jsf/issues/detail?id=9 to provide a simpler interface to do this.
Thank you!
I don't know if this is possible, but could markerComponent be extended to use "A", "B", "C" and similar letters for the markers? It seems possible based on an example of Google's static map API: http://code.google.com/apis/maps/documentation/staticmaps/
This would make my search results a little slicker. Very happy with gmaps4jsf so far! Thanks for the good work.
@tmw:
Can you please send us a sample code?
I think I want something like this, but the last two attributes would be new attributes on marker. I'm basing this on info from this page: http://code.google.com/apis/maps/documentation/staticmaps/#MarkerDescriptors
I'm hoping this is a very small and easy thing to add, just exposing functionality in Google Maps that already exists.
<m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="red" character="A"/> <m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="blue" character="B"/> <m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="green" character="C"/>Based on the reference page, the supported colors are {black, brown, green, purple, yellow, blue, gray, orange, red, white}, but I would suggest having that just be a pass-through in case more colors are added in the future.
The "character" can only be a single lowercase alphanumeric character from the set {a-z, 0-9}.
Adding this would let me drop a bunch of icons I'm currently using to identify locations from A-Z.
While I'm at it, how about three new attributes instead of two? All based on that same markerdescriptors page above.
The new attributes are: color, character, and size. All three of these are already supported by Google maps, so the trick here is just exposing that same functionality in Gmaps4JSF, assuming things work the way I think they do. (I could be wrong...)
Does this seem doable? I haven't looked at the code yet to see if I could submit a patch, but I could try that once time permits.
<m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="red" character="a" size="tiny"/> <m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="blue" character="b" size="mid"/> <m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="green" character="c" size="small"/> <m:marker latitude="#{loc.geoLat}" longitude="#{loc.geoLng}" color="green" character="d" /> <!-- no size, so "normal" used -->Note: I fixed the example so the characters are lowercase. My first example was invalid...
Please open adding new feature issue here: http://code.google.com/p/gmaps4jsf/issues/list
Thanks!
is there any way to track a click ?... I mean, grab the server side event of a click, like the dragging events?..
regards!!..