Skip to content

eventurous/ember-cli-map

 
 

Repository files navigation

Ember Map

Build Status npm version

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

Version

0.2.2

Add Maps Libraries

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;key={ApiKey}&libraries=places"></script>
<script src="http://api-maps.yandex.ru/2.0/?load=package.standard&lang=ru-Ru"></script>

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}}

For yandex-map component, you should also pass childId parameter - unique id that will be given to the div this map is rendered into.

{{yandex-map model=model childId='yandex-map'}}

License

[Licensed under MIT license] 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • CoffeeScript 52.1%
  • JavaScript 47.9%