Skip to content

tether/pf-ion-mapref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ion-MapRef

Open in Maps href

Installation

bower install pf-ion-mapref

Usage

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/…

Heads Up!

You'll need to add those URLs to angular's whitelist:

app.config(['$compileProvider', function ($compileProvider) {
  $compileProvider.aHrefSanitizationWhitelist(/^(maps|geo):/);
}]);

License Creative Commons License

Creative Commons Attribution 4.0 International


Proudly brought to you by PetroFeed.

Pedro