0.4.2 • Published 9 years ago

ember-cli-map v0.4.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Ember Map

Build Status npm version

Ember Map provides you with google-map and yandex-map components.

Add Maps Libraries

To use google apiKey you need to set it in config/environment.js.

ENV['ember-cli-map'] = {
  googleApiKey: 'MYsecretKEY'
};

Model Setup

Declare fields to use with map component:

asGoogleMap: ['lat', 'long', 'zoom'] // or
asYandexMap: ['lat', 'long', 'zoom']

###Example:

export default DS.Model.extend({
    lat:       DS.attr('number'),
    long:      DS.attr('number'),
    zoom:      DS.attr('number'),
    asGoogleMap: ['lat', 'long', 'zoom']
});

#In your template

{{google-map model=model action='updateModel'}}
{{yandex-map model=model action='updateModel'}}

#In your route/controller

actions: {
  updateModel(newCoordinates) {
    this.get('currentModel').setProperties(newCoordinates);
  }
}

License

Licensed under MIT license

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago