Skip to content

Commit

Permalink
show static google map in add resource form
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Mar 15, 2015
1 parent 8a38ac9 commit eca110a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"angularfire": "1.0.0",
"socialite-js": "2.1",
"elements": "dmitryf/elements",
"angular-sanitize": "~1.3.14"
"angular-sanitize": "~1.3.14",
"angular-google-staticmaps": "~0.3.0"
},
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions client/addResourceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ require('./akermap').controller('addResourceForm',

$scope.categories = require('./categories');

$scope.markers = {
coords: [formModal.data.latitude, formModal.data.longitude]
};

$scope.isAtLeastOneTypeSelected = function(items) {
return _.any(items);
};
Expand Down
3 changes: 2 additions & 1 deletion client/akermap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ module.exports = angular.module('akermap', [
'uiGmapgoogle-maps',
'firebase',
'btford.modal',
'ngSanitize'
'ngSanitize',
'wu.staticGmap'
]);
1 change: 1 addition & 0 deletions client/templates/addResourceForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<span class="hint" translate>ADD_RESOURCE_RESOURCE_ADDRESS_HELP_TEXT</span>
<input id="resource_address" type="text" name="resource_address" ng-model="resource.address" required ng-trim="true">
<span class="error" ng-show="resourceForm.resource_address.$error.required" translate>FORM_REQUIRED</span>
<static-gmap size="100x100" markers="markers" sensor="false" zoom="14"></static-gmap>
</li>

<li>
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = (function() {
'uiGmapgoogle-maps': 'angular-google-maps/dist/angular-google-maps.js',
'btford.modal': "angular-modal",
'ngSanitize': 'angular-sanitize',
'wu.staticGmap': 'angular-google-staticmaps',
"ng": "angular-translate" // workaround for missing ng-module - this loads angular-translate twice :(
}
},
Expand Down

0 comments on commit eca110a

Please sign in to comment.