I am trying to work with angular -google-maps. I have all the settings as instructed, but I cannot get around this error:
angular -google-maps: could not find a valid center property
I have this in the page controller:
angular.extend($scope, {
center: {
latitude: 0,
longitude: 0,
},
markers: [],
zoom: 8,
});
And this is in my html
<google-map center="center" zoom="zoom" markers="markers" refresh="!isMapElementHidden" style="height: 400px"></google-map>
A few points: - It seems that the angular -google-maps directive code is called before my controller code, so the $ scope.center variable has not yet been created
When I hard code the center in it,
I try this, but no luck, since the map never updates the new cope values set in the controller:
center = "center? center: {latitude: 36.990282103105066, longitude: -122.06149578094482}"
I also tried to implement Angular Leaflet cards and get the same issue
!