Angularjs With Angular-google-maps: Add Marker Through Fomr And Find Me
I am trying to reproduce the example from http://nlaplante.github.io/angular-google-maps/ because it does 90% of what i want. But so far i'm not having much success, it can find my
Solution 1:
this code is good. You're only missing one variable.
Instead of $scope.center, you have to add $scope.map.center like so:
$scope.map.center = {latitude: position.coords.latitude, longitude: position.coords.longitude};
Same for scope.markers. Try scope.map.markers. Haven't tested but it should work.
Solution 2:
If you are loading the position on the fly(Through your browser) you should add ng-if="position" When that becomes available, if will flip the ng-if statement and a digest will start.
add the ng-if on the marker element
Post a Comment for "Angularjs With Angular-google-maps: Add Marker Through Fomr And Find Me"