Google map angular set centre position
Hi,
I am trying to set the centre position of the google map component in an Angular app using the controller.
When I put {{variable_x}} into the centre field of the map component in the design view the html code comes out wrong when debugging the app.
I don't know a great deal about this but it almost seems like dependency injection does not work as ui-gmap-google-map center="{{variable_x}}" should not look like this {{variable_x}} should be a value???
In the controller I am setting variable x and writing it to the console like this:
$scope.variable_x= "{'latitude': '40.1451', 'longitude': '-99.6680'}";
console.log($scope.variable_x)
Console output
{'latitude': '40.1451', 'longitude': '-99.6680'}
With this in place all I get is white space where the map is.
I know you do not support custom code but how do I dynamically set the centre of the map - nothing in the documentation here:
I have read this over and over again but I cannot see what is missing: