branflake2267 / GWT-Maps-V3-Api

GWT Maps V3 Javascript Bindings
Other
144 stars 113 forks source link

Marker class could implement HasClickHandlers interface #209

Closed povilasb closed 10 years ago

povilasb commented 10 years ago

As the topic mentions Marker could implement standard gwt interface HasClickHandlers.

twistedpair commented 10 years ago

Thanks for the suggestion @povilasb .

Marker does not use ClickHandler, but rather MapHandler<E> handler. In order to comply with HasClickHandlers we'd need to revamp the underlying click handing, registration and unregistration code.

Since all handlers must be passed to

google.maps.event.addListener(instance:Object, eventName:string, handler:Function)

There is no certainty that all implementations of ClickHandler would be recognized by the GMaps implementation. Accordingly, I don't think we should use the generic GWT handlers, as that would imply we support all implementations of them, while we actually would not.