I am using Ionic 1.3 and creating a Map screen, this screen will have a menu to select the specific destinations and another that is the maps with the location.
Example of the destination choice screen:
Controller:
var mapasJson = {
"Foo": {
"0": {
"titulo": "local 1",
"coordenadas": "001,002"
},
"1": {
"titulo": "local 2",
"coordenadas": "001,002"
}
}
};
app.controller('mapasItemsCtrl', ['$scope', '$stateParams', function ($scope, $stateParams, $http) {
$scope.destinos = mapasJson;
}]);
Template:
<div class="item item-divider">
Foo
</div>
<div class="item item-button-right item-text-wrap" ng-repeat="d in destinos.Foo">
{{d.titulo}}
<a class="button button-positive" href="">
<i class="icon ion-ios-navigate-outline"></i>
</a>
</div>
Result:
Myquestionis,howdoIgetthecoordinatesforthe<a>
tagtowhenIclickonittocallthemapscreenandthengotothelocation?
Here'samapdemo: link