angular-heremaps

AngularJS Provider for working with the HERE Maps API

Module License: Apache License, Version 2.0

Added by: Sam Deering

GitHub

Repository

azzlack/angular-heremaps

Stats

Stars: 3

Watchers: 3

Forks: 1

Module Description

angular-heremaps

AngularJS Provider for working with the HERE Maps API

Getting started

  1. Add the eyecatch.heremaps module to your app:

     angular.module('MyApp', ['eyecatch.heremaps'])
    
  2. Inject the heremaps provider to your controller/directive/module:

     angular.module('MyApp', [ 'eyecatch.heremaps'])
         .run(function ($rootScope, $state, $stateParams, $angularCacheFactory, $http, $log, heremaps) {
             ...
         }
         
    
  3. Add HERE Maps config inside the run method above

     heremaps.appId("xyz");
     heremaps.appCode("xyz");
     
    
  4. Subscribe to the heremaps-loaded message on the $rootScope that indicates that the map resources are ready

     $rootScope.$on('heremaps-loaded', function () {
         $scope.map = new nokia.maps.map.Display('mapContainerID', {
             components: [
                 new nokia.maps.map.component.Behavior()
             ],
             zoomLevel: 4,
             center: [64, 10]
         });
     });
     
    

Events

There are currently 3 events that you can subscribe to:

heremaps-initialized The map script has been loaded, but not configured
heremaps-loaded The map features have been loaded, and the map can be configured with appId, appCode, etc.
heremaps-error An error occured while loading the map script

Contributing

  1. Fork the repository

  2. Install grunt

  3. Run npm install to install dependencies

  4. To test your contribution, run grunt

  5. When all tests are passing, run grunt build to minify all files

  6. Submit a pull request.

Changelog

1.0.0

Initial release

Module stats last updated: 2015-06-08 00:24:06

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!