Giter Site home page Giter Site logo

angular-heremaps's Introduction

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

angular-heremaps's People

Contributors

azzlack avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.