Created
September 10, 2013 13:07
-
-
Save knownasilya/6509141 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildingMarkers: function () { | |
var results = Ember.ArrayProxy.create({ content: Ember.A([]) }), | |
buildings = this.get('content'); | |
mapController = this.get('map'), | |
marker, | |
bin, | |
latlng, | |
building; | |
for (building in buildings) { | |
building = buildings[building]; | |
if (building && building.constructor === Ember.Object) { | |
bin = building.get('bin'); | |
latlng = building.get('latlng'); | |
marker = new google.maps.Marker({ | |
position: new google.maps.LatLng(latlng.lat, latlng.lng), | |
map: gmap, | |
animation: google.maps.Animation.DROP, | |
title: bin, | |
bin: bin, | |
source: building.get('source'), | |
}); | |
this.bindMarkerClick(marker, mapController); | |
results.pushObject(marker); | |
} | |
} | |
return results; | |
}.property('content.@each'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment