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

MultiPolygon will not render with lodash 4.x #1822

Open sime opened 8 years ago

sime commented 8 years ago

Trying to find the Polygon (within a MultiPolygon) with the most points fails with lodash 4.x.

error within chunking iterator: TypeError: Cannot read property 'max' of undefined

http://plnkr.co/edit/fugjhdeVZ10IRcgVj0td?p=preview

_.forEach does not accept a 3rd parameter as it is implemented here:

https://github.com/angular-ui/angular-google-maps/blob/cbd17a3a225dfe543faa124eb295e66db566f27c/src/coffee/directives/api/utils/gmap-util.coffee#L152-L156

I'm assuming lodash v4 is a hard dependency.

Update: Seems to happen with all 4.x version.s

onlywei commented 8 years ago

Could this be the culprit?

https://github.com/angular-ui/angular-google-maps/blob/cbd17a3a225dfe543faa124eb295e66db566f27c/src/coffee/directives/api/models/child/window-child-model.coffee#L21

_.clone() no longer accepts a second argument for "isDeep" in Lodash 4.x.