Skip to content

Commit

Permalink
Remove lib from repo to be untracked, and update .map to m.map for sh…
Browse files Browse the repository at this point in the history
…orthand
  • Loading branch information
brh55 committed Jun 26, 2015
1 parent 76d5c62 commit e403c07
Show file tree
Hide file tree
Showing 63 changed files with 32 additions and 123,765 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ uForage
Powered by (Ionic Framework)[http://ionicframework.com/] and Firebase

# Get Started
```bash
$ git clone [email protected]:CfABrigadePhiladelphia/forage.git
```
Clone the repo or fork the repo to submit PRs.

```bash
$ npm install -g cordova ionic
```
Installs the required cordova and ionic libs.

ssh clone [email protected]:CfABrigadePhiladelphia/forage.git
```bash
$ bower install
```
Downloads required bower package dependencies.

$ npm install -g cordova ionic
<br />
$ ionic serve
```bash
$ ionic serve
```
Serves up the app into your browser in app format.
29 changes: 16 additions & 13 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ app.controller('AppCtrl', function($scope, $ionicModal, $timeout, $http) {
_.each(resp.data, function(datum) {
new google.maps.Marker({
position: datum.l,
map: map,
map: m.map,
title: 'Forage Map'
});
})
Expand All @@ -77,7 +77,8 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
coordinates: {
lat: '',
lng: ''
}
},
map: {}
}

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

var marker = new google.maps.Marker({
map: $scope.map,
map: m.map,
position: pos,
title: 'Forage Map'
});
Expand All @@ -103,10 +104,10 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
lng: pos.F
};

// Broadcast map:geolocated event
// Broadcast map:geolocated event to reverse geo directive
$scope.$broadcast('map:geolocated', m.coordinates);

$scope.map.setCenter(pos);
m.map.setCenter(pos);
$ionicLoading.hide();
});
},
Expand All @@ -115,9 +116,9 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {

geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
$scope.map.setCenter(results[0].geometry.location);
m.map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: $scope.map,
map: m.map,
position: results[0].geometry.location
});
} else {
Expand All @@ -142,15 +143,16 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {

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

$scope.map = map;
// bind
m.map = map;
};

/**
* Builds Google Map Markers
*/
function buildGmarkers () {
// Build map prior before building markers
if (angular.isUndefined($scope.map)) {
if (angular.isUndefined(m.map)) {
buildGmap();
}

Expand All @@ -167,12 +169,12 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
lat: 39.952641,
lng: -75.164052
},
map: $scope.map,
map: m.map,
title: 'Forage Map'
});

google.maps.event.addListener(marker, 'click', function() {
infowindow.open($scope.map, marker);
infowindow.open(m.map, marker);
});
}

Expand All @@ -198,7 +200,7 @@ app.controller('MapCtrl', function($scope, $ionicLoading, $compile, $http) {
lat: data.l[0],
lng: data.l[1]
},
map: map,
map: m.map,
title: 'Forage Map'
});
})
Expand Down Expand Up @@ -232,18 +234,19 @@ app.directive('reverseGeocode', function () {

geocoder.geocode({ 'latLng': latlng }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {

if (results[1]) {
scope.success = true;
scope.currentAddress = results[1].formatted_address;
} else {
scope.success = false;
scope.failureMsg = 'Location not found';
}

} else {
scope.success = false;
scope.currentAddress = 'Geocoder failed due to: ' + status;
}

scope.$apply();
});

Expand Down
7,013 changes: 0 additions & 7,013 deletions www/lib/ionic/css/ionic.css

This file was deleted.

18 changes: 0 additions & 18 deletions www/lib/ionic/css/ionic.min.css

This file was deleted.

Binary file removed www/lib/ionic/fonts/ionicons.eot
Binary file not shown.
Loading

0 comments on commit e403c07

Please sign in to comment.