darshakshah1988 / gmaps4jsf

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

Defining server side event listeners on the map #87

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Defining server side event listeners on the map. like the following:

<m:map action="#{mybean.action}">
</m:map>

Original issue reported on code.google.com by Hazem.sa...@gmail.com on 27 Nov 2009 at 12:42

GoogleCodeExporter commented 8 years ago
I'd like to be able to bind m:eventListeners on the map to fire server events, 
e.g. 
as I've done indirectly using navigation rules, the same way as marker events. 
That 
will give the developer full range of events that can be fired and caught (for 
whatever reason).

Anything the client side can handle the server should be able to handle as well 
with 
a documented api.

Original comment by dapoo...@gmail.com on 30 Nov 2009 at 9:52

GoogleCodeExporter commented 8 years ago
I was wondering whether it is already possible to attach server side events to 
the marker component. I know it is possible to catch a valueChangeEvent in my 
backing bean when dragging a marker. However,  what I would like to do is 
perform an action in my backing bean when the marker is clicked. 

What I actually mean is something like this:

<m:marker latitude="#{bean.lat}" longitude="#{bean.lon}">
<m:eventListener eventName="click" 
jsFunction="#{bean.markerClick}"/>                              <m:htmlInformationWindow 
latitude="#{bean.lat}" longitude="#{bean.lon}" htmlText="#{bean.markertext}"/>
</m:marker>

Is something like this already possible? 

Regards,

Mark

Original comment by mark.kle...@gmail.com on 2 Nov 2010 at 6:44

GoogleCodeExporter commented 8 years ago
@Mark: It will be added to 1.1.4:
http://code.google.com/p/gmaps4jsf/issues/detail?id=108

Original comment by Hazem.sa...@gmail.com on 2 Nov 2010 at 8:48

GoogleCodeExporter commented 8 years ago
I see.

Thanks for the quick reply :). 

Any idea on when this awesome feature will be added? 

Thanks again and keep up the good work!

Regards,

Mark

Original comment by mark.kle...@gmail.com on 3 Nov 2010 at 10:40

GoogleCodeExporter commented 8 years ago
I raise its priority to high because it has 7 stars now.
I will implement it in my next free time slot ;-).

Original comment by Hazem.sa...@gmail.com on 2 Dec 2010 at 11:18

GoogleCodeExporter commented 8 years ago
The feature is now supported in the latest snapshot 1.1.4-preRelease3 snapshot.

You can listen to map server side event using the *new* actionListener 
attribute as follows:
<m:map width="400px" height="400px" latitude="24" longitude="15" 
       jsVariable="map1" zoom="2" 
       actionListener="#{map.addMarkerHere}" 
       submitOnClick="true"/>

The example is included in the (mapServerSideEvents.jsp) in the trunk.

I will deploy the complete examples once 1.1.4-preRelease3 is finalized.

Original comment by Hazem.sa...@gmail.com on 3 Dec 2010 at 6:24

GoogleCodeExporter commented 8 years ago
Here is a working deployed example:
http://www.mashups4jsf.com/gmaps4jsf-examples-1.1.4/pages/mapServerSideEvents.js
f

Original comment by Hazem.sa...@gmail.com on 4 Dec 2010 at 9:57

GoogleCodeExporter commented 8 years ago
The GMaps4JSF preRelease3 jar:
http://gmaps4jsf.googlecode.com/files/gmaps4jsf-1.1.4-preRelease3.jar

Original comment by Hazem.sa...@gmail.com on 4 Dec 2010 at 10:34

GoogleCodeExporter commented 8 years ago
Hi!
I must take the event when I click on a button in the info window for a marker. 
I don't want any event if I click a generic point of the map!

How can I do this?

Thanks

Original comment by davide.b...@gmail.com on 30 Jan 2012 at 6:00