dco5
November 16, 2014, 4:59pm
1
How do I launch the default map app with an address from the ionic app? I am not looking to integrate google maps with my app. I am currently using this:
the view:
<div class="list card">
<i class="icon ion-ios7-location"></i>
<a href="#" ng-click="vm.goToLocation()" >{{vm.event.Address}}</a>
</div>
the controller:
vm.goToLocation = function(){
window.location = "geo: " + vm.event.Address ;
};
When I do try it from my android it launches google maps but it does not show the address, the search bar is empty.
wedgybo
November 16, 2014, 8:07pm
2
I think you need to add in the q parameter.
vm.goToLocation = function(){
window.location = "geo: ?q=" + vm.event.Address ;
};
dco5
November 16, 2014, 9:22pm
3
No, I can access the address directly in the controller. I figure it out:
vm.goToLocation = function(){
window.location = “geo:0,0?q=”+ vm.eventAddress() ;
};
also add this to the config.xml:
< access origin=“geo:*” launch-external=“yes” />
This is for android, I think for iOS is different, but I have no way to test it.
I had the same problem you solution saved me big time , THANKS
Have you guys tried https://github.com/leecrossley/cordova-plugin-directions ? I just installed it but I’m having issues getting it working…
Could you share some code to help debug the problem
uxtx
October 23, 2015, 8:17pm
7
anyone know of any ng-cordova directions plugin?