angular-ui / angular-google-maps

AngularJS directives for the Google Maps Javascript API
http://angular-ui.github.io/angular-google-maps
2.52k stars 1.07k forks source link

Two-way binding of map center doesn't work and support of GeoJSON Point after map drag was gone (directive ui-gmap-google-map) #1924

Open AbstractVisions opened 8 years ago

AbstractVisions commented 8 years ago

After this commit https://github.com/angular-ui/angular-google-maps/pull/1748/commits map.center (directive ui-gmap-google-map) has not changes after map drag and support of two-way binding GeoJSON Point was gone

The reason of a problem is as follows (updateCenter function) in this code: https://github.com/angular-ui/angular-google-maps/blob/master/src/coffee/directives/api/map.coffee#L144

With ver 2.3.2 (angular-google-maps) works good. the problem has appeared starting with version 2.3.3

gillez commented 8 years ago

Hi, I have also noticed this. I also think the demo (http://angular-ui.github.io/angular-google-maps/#!/demo) shows the same thing) - I didn't see this with the previous version, but I think the center numeric display on the right should update if you drag the map around.

For my purposes I wouldn't actually need two-way binding if there was a getCenter method. There is in the standard google maps API, but I don't know how to call this from angular-google-maps. Can anyone help?

Thanks, Giles

gillez commented 8 years ago

I think this is a duplicate of #1865.

AbstractVisions commented 7 years ago

prepared PR https://github.com/angular-ui/angular-google-maps/pull/1950

AbstractVisions commented 7 years ago

to gillez: look at control parameter of ui-gmap-google-map directive http://angular-ui.github.io/angular-google-maps/#!/api/google-map