From eca110ae044f1f5899d2ab7ff088a1d327210141 Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Sun, 15 Mar 2015 17:53:02 +0100 Subject: [PATCH] show static google map in add resource form --- bower.json | 3 ++- client/addResourceForm.js | 4 ++++ client/akermap.js | 3 ++- client/templates/addResourceForm.html | 1 + webpack.config.js | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index c1d31e2..43ba023 100644 --- a/bower.json +++ b/bower.json @@ -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", diff --git a/client/addResourceForm.js b/client/addResourceForm.js index 6888e1d..b04d548 100644 --- a/client/addResourceForm.js +++ b/client/addResourceForm.js @@ -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); }; diff --git a/client/akermap.js b/client/akermap.js index 59a8f03..810318a 100644 --- a/client/akermap.js +++ b/client/akermap.js @@ -5,5 +5,6 @@ module.exports = angular.module('akermap', [ 'uiGmapgoogle-maps', 'firebase', 'btford.modal', - 'ngSanitize' + 'ngSanitize', + 'wu.staticGmap' ]); diff --git a/client/templates/addResourceForm.html b/client/templates/addResourceForm.html index da9c6ac..ece8196 100644 --- a/client/templates/addResourceForm.html +++ b/client/templates/addResourceForm.html @@ -33,6 +33,7 @@ ADD_RESOURCE_RESOURCE_ADDRESS_HELP_TEXT FORM_REQUIRED +
  • diff --git a/webpack.config.js b/webpack.config.js index ebde719..d0574bd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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 :( } },