Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 951 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 951 Bytes

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