com.lamatek.tags.google
Interface GoogleMapEventHandler

All Known Implementing Classes:
DefaultEventListenerBean, DefaultEventListenerServlet

public interface GoogleMapEventHandler

GoogleMapEventHandler This interface defines the behaviour of classes that receive GoogleMaps events. Developers should not override this interface, but Objects that are used to handle events should either implement this interface or (better yet) extend the DefaultEventListenerBean or DefaultEventListenerServlet.

Version:
0.40
Author:
Tom Cole

Method Summary
 void process(GoogleMapTag map, ServletRequest request)
          This method is called after all the event based methods have been called.
 void processClickEvent(GoogleMapTag map, double longitude, double latitude)
          This method is called when a click event is detected that was generated by a GoogleMapTag (<googlemaps:map>).
 void processDoubleClickEvent(GoogleMapTag map, double longitude, double latitude)
          This method is called when a double-click event is detected that was generated by a GoogleMapTag (<googlemaps:map>).
 void processMapTypeChangedEvent(GoogleMapTag map, java.lang.String type)
          This method is called when a maptypechanged event is detected.
 void processMoveEndEvent(GoogleMapTag map, double longitude, double latitude)
          This method is called when a moveend event is detected.
 void processOverlayClickEvent(GoogleMapTag map, java.lang.String id, java.lang.String type)
          This method is called if a click event is detected that was generated by an overlay (box, circle, marker, polygon, polyline).
 void processOverlayDoubleClickEvent(GoogleMapTag map, java.lang.String id, java.lang.String type)
          This method is called when a double-click event is detected that was generated by an overlay (box, circle, marker, polygon, polyline).
 void processZoomEvent(GoogleMapTag map, int zoom)
          This method is called when a zoom event is detected.
 

Method Detail

process

void process(GoogleMapTag map,
             ServletRequest request)
This method is called after all the event based methods have been called. Developers can use this method to handle non-event based requests. The default implementation is empty to there is no need to call super.process().

Parameters:
map - The GoogleMapTag that generated the event.
request - The original ServletRequest.

processOverlayClickEvent

void processOverlayClickEvent(GoogleMapTag map,
                              java.lang.String id,
                              java.lang.String type)
This method is called if a click event is detected that was generated by an overlay (box, circle, marker, polygon, polyline). The default implementation is empty so there is no need to call super.processMarkerClickEvent().

Parameters:
map - The GoogleMapTag parent of the marker clicked.
id - The id of the overlay that was clicked.
type - The type of overlay clicked (marker, box, circle, polygon, polyline)

processClickEvent

void processClickEvent(GoogleMapTag map,
                       double longitude,
                       double latitude)
This method is called when a click event is detected that was generated by a GoogleMapTag (<googlemaps:map>). The default implementation of this method is empty so there is no need to call super.processClickEvent().

Parameters:
map - The GoogleMapTag that generated the event.
longitude - The longitude (in decimal form) where the click occured.
latitude - The latitude (in decimal form) where the click occured.

processOverlayDoubleClickEvent

void processOverlayDoubleClickEvent(GoogleMapTag map,
                                    java.lang.String id,
                                    java.lang.String type)
This method is called when a double-click event is detected that was generated by an overlay (box, circle, marker, polygon, polyline). The default implementation of this method is empty so there is no need to call super.processMarkerDoubleClickEvent().

Parameters:
map - The GoogleMapTag parent of the marker double-clicked.
id - The id of the overlay double-clicked.
type - The type of overlay double-clicked (marker, circle, box, polygon, polyline)

processDoubleClickEvent

void processDoubleClickEvent(GoogleMapTag map,
                             double longitude,
                             double latitude)
This method is called when a double-click event is detected that was generated by a GoogleMapTag (<googlemaps:map>). The default implementation of this method is empty so there is no need to call super.processDoubleClickEvent().

Parameters:
map - The GoogleMapTag that generated the event.
longitude - The longitude (in decimal form) where the double-click occured.
latitude - The latitude (in decimal form) where the double-click occured.

processZoomEvent

void processZoomEvent(GoogleMapTag map,
                      int zoom)
This method is called when a zoom event is detected. The default implementation of this method simulates the default behaviour of a Google Map and any subclasses should call super.processZoomEvent() to ensure consistent behaviour.

Parameters:
map - The GoogleMapTag that generated the event.
zoom - The new requested zoom level.

processMoveEndEvent

void processMoveEndEvent(GoogleMapTag map,
                         double longitude,
                         double latitude)
This method is called when a moveend event is detected. The default implementation of this method simulates the default behaviour of a Google Map and any subclasses should call super.processMoveEndEvent() to ensure consistent behaviour.

Parameters:
map - The GoogleMapTag that generated the event.
longitude - The new center longitude (in decimal form).
latitude - The new center latitude (in decimal form).

processMapTypeChangedEvent

void processMapTypeChangedEvent(GoogleMapTag map,
                                java.lang.String type)
This method is called when a maptypechanged event is detected. The default implementation of this method simulates the default behaviour of a Google Map and any subclasses should call super.processMapTypeChangedEvent() to ensure consistent behaviour.

Parameters:
map - The GoogleMapTag that generated the event.
type - The new requested map type (map | satellite | hybrid).