Created
May 29, 2014 06:16
-
-
Save abbood/06cd185fc9e6ab20fe18 to your computer and use it in GitHub Desktop.
code to fill google markers
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
propertyControllers.controller 'PropertyListCtrl', ['$scope', 'Properties', ($scope, Properties) -> | |
angular.extend $scope, | |
map: | |
control: {} | |
zoom: 3 | |
dragging: false | |
bounds: {} | |
center: | |
latitude:33.889762 | |
longitude: 35.506408 | |
clusterOptions: | |
title: 'Hi I am a Cluster!' | |
gridSize: 60 | |
ignoreHidden: true | |
minimumClusterSize: 2 | |
imageExtension: 'png' | |
imagePath: 'assets/cluster' | |
imageSizes: [72] | |
markers: [] | |
$scope.properties = Properties.query {}, (properties) -> | |
_.each $(properties), (property) -> | |
$scope.map.markers.push | |
latitude: property.latitude | |
longitude: property.longitude | |
title: property.title | |
idkey: property.id | |
icon: 'assets/blue_marker.png' | |
_.last($scope.map.markers).onClicked = -> | |
console.log "marker " + property.title + "clicked" | |
window.location.href = "#/"+property.id | |
return false | |
return | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment