Skip to content

Repository files navigation

Ember Map

Build Statusnpm 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:

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

#In your template

{{google-mapmodel=modelaction='updateModel'}}
{{yandex-mapmodel=modelaction='updateModel'}}

#In your route/controller

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

License

[Licensed under MIT license] 1

About

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

Resources

Stars

25 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages