Homepage and demo: http://miguelcobain.github.io/ember-leaflet/
This view represents a Leaflet Map instance. It has some bidirectional bindings to some map's variables. This is the view class that you'll use in your templates, or extend to provide additional behaviours.
zoomLevel
This property holds the current zoom level of the map. Two-way binding.
moving
Property that holds true
if the map is moving (panning), or false
if it isn't.
center
An ember object that holds the current center of the map. Two-way binding.
markers
An array that holds objects for creting leaflet markers. Its elements must have a property named marker
that creates a Leaflet.Marker
instance. Check Ember.LeafletMarkerMixin
for a convenient way to define your objects.
paths
An array that holds objects for creting leaflet paths. Its elements must have a property named marker
that creates a Leaflet.Marker
instance. Check Ember.LeafletPathMixin
for a convenient way to define your objects.
createMap
Overidable hook responsible for creating the leaflet map instance. Useful for adding custom plugin logic. By default it instanciates a simple map with OpenStreetMap layer.
marker
A computed property with no dependencies that is responsible for creating a leaflet marker instance.
icon
A leaflet icon object that holds the current icon of the marker.
zIndex
A property that holds the current z-index of the marker.
Essencially EmberLeaflet is a wrapper on top of Leaflet that exposes Ember properties. This way, the leaflet map is updated when an Ember property changes and Ember properties are updated when the user interacts with the map
This project is in its enfancy. You can learn by inspecting the code of the demo in gh-pages branch and/or of the component itself.
If you are an Ember/Leaflet/Javascript master, please help! It would be great to improve features, implement geometry binding, add documentation, tests, etc. Please help anything you can. Pull requests are very welcome on github.