Skip to content

Commit e403c07

Browse files
committed
Remove lib from repo to be untracked, and update .map to m.map for shorthand
1 parent 76d5c62 commit e403c07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+32
-123765
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ uForage
44
Powered by (Ionic Framework)[http://ionicframework.com/] and Firebase
55

66
# Get Started
7+
```bash
8+
$ git clone [email protected]:CfABrigadePhiladelphia/forage.git
9+
```
10+
Clone the repo or fork the repo to submit PRs.
711

12+
```bash
13+
$ npm install -g cordova ionic
14+
```
15+
Installs the required cordova and ionic libs.
816

9-
ssh clone [email protected]:CfABrigadePhiladelphia/forage.git
17+
```bash
18+
$ bower install
19+
```
20+
Downloads required bower package dependencies.
1021

11-
$ npm install -g cordova ionic
12-
<br />
13-
$ ionic serve
22+
```bash
23+
$ ionic serve
24+
```
25+
Serves up the app into your browser in app format.

www/js/controllers.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ app.controller('AppCtrl', function($scope, $ionicModal, $timeout, $http) {
5353
_.each(resp.data, function(datum) {
5454
new google.maps.Marker({
5555
position: datum.l,
56-
map: map,
56+
map: m.map,
5757
title: 'Forage Map'
5858
});
5959
})
@@ -77,7 +77,8 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
7777
coordinates: {
7878
lat: '',
7979
lng: ''
80-
}
80+
},
81+
map: {}
8182
}
8283

8384
// Action
@@ -92,7 +93,7 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
9293
var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
9394

9495
var marker = new google.maps.Marker({
95-
map: $scope.map,
96+
map: m.map,
9697
position: pos,
9798
title: 'Forage Map'
9899
});
@@ -103,10 +104,10 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
103104
lng: pos.F
104105
};
105106

106-
// Broadcast map:geolocated event
107+
// Broadcast map:geolocated event to reverse geo directive
107108
$scope.$broadcast('map:geolocated', m.coordinates);
108109

109-
$scope.map.setCenter(pos);
110+
m.map.setCenter(pos);
110111
$ionicLoading.hide();
111112
});
112113
},
@@ -115,9 +116,9 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
115116

116117
geocoder.geocode( { 'address': address}, function(results, status) {
117118
if (status == google.maps.GeocoderStatus.OK) {
118-
$scope.map.setCenter(results[0].geometry.location);
119+
m.map.setCenter(results[0].geometry.location);
119120
var marker = new google.maps.Marker({
120-
map: $scope.map,
121+
map: m.map,
121122
position: results[0].geometry.location
122123
});
123124
} else {
@@ -142,15 +143,16 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
142143

143144
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
144145

145-
$scope.map = map;
146+
// bind
147+
m.map = map;
146148
};
147149

148150
/**
149151
* Builds Google Map Markers
150152
*/
151153
function buildGmarkers () {
152154
// Build map prior before building markers
153-
if (angular.isUndefined($scope.map)) {
155+
if (angular.isUndefined(m.map)) {
154156
buildGmap();
155157
}
156158

@@ -167,12 +169,12 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
167169
lat: 39.952641,
168170
lng: -75.164052
169171
},
170-
map: $scope.map,
172+
map: m.map,
171173
title: 'Forage Map'
172174
});
173175

174176
google.maps.event.addListener(marker, 'click', function() {
175-
infowindow.open($scope.map, marker);
177+
infowindow.open(m.map, marker);
176178
});
177179
}
178180

@@ -198,7 +200,7 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
198200
lat: data.l[0],
199201
lng: data.l[1]
200202
},
201-
map: map,
203+
map: m.map,
202204
title: 'Forage Map'
203205
});
204206
})
@@ -232,18 +234,19 @@ app.directive('reverseGeocode', function () {
232234

233235
geocoder.geocode({ 'latLng': latlng }, function (results, status) {
234236
if (status == google.maps.GeocoderStatus.OK) {
237+
235238
if (results[1]) {
236239
scope.success = true;
237240
scope.currentAddress = results[1].formatted_address;
238241
} else {
239242
scope.success = false;
240243
scope.failureMsg = 'Location not found';
241244
}
245+
242246
} else {
243247
scope.success = false;
244248
scope.currentAddress = 'Geocoder failed due to: ' + status;
245249
}
246-
247250
scope.$apply();
248251
});
249252

www/lib/ionic/css/ionic.css

Lines changed: 0 additions & 7013 deletions
This file was deleted.

www/lib/ionic/css/ionic.min.css

Lines changed: 0 additions & 18 deletions
This file was deleted.

www/lib/ionic/fonts/ionicons.eot

-99.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)