dylanfprice / angular-gm

AngularJS Google Maps Directives
MIT License
197 stars 47 forks source link

Bind event handlers for gm-map directive #18

Closed hxu closed 11 years ago

hxu commented 11 years ago

Pull request for #16.

This implements Three things:

angulargmUtils.getEventHandlers now correctly handles event names with underscores. It'll parse attributes specified as gm-on-center-changed to be the callback for the center-changed event, for example.

angulargmController._listeners is now a hash of listeners, where keys are event names and values are the Google Maps listeners, if there is only one, or an array of listeners, if there is more than one.

gmMap directive now also takes event handlers via gm-on-*event*