Open in Maps href
bower install pf-ion-mapref
angular.module('MyModule', ['pf-ion-mapref']);
<a pf-ion-mapref latitude="51.053236" longitude="-114.095222" target="_blank">Open in Maps</a>
Will render your href
set according to the platform you're on:
- iOS:
maps://…
- Android:
geo://…
- Otherwise:
http://maps.google.com/…
You'll need to add those URLs to angular's whitelist:
app.config(['$compileProvider', function ($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^(maps|geo):/);
}]);
Creative Commons Attribution 4.0 International
Proudly brought to you by PetroFeed.