From e03005ed568369c97fd1a369a05b2cafe237c8c4 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 25 May 2020 13:52:56 +0200 Subject: [PATCH] Fix maps and tidy up groups map code --- .../darkswarm/controllers/group_page_controller.js.coffee | 5 +---- app/views/groups/show.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/darkswarm/controllers/group_page_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/group_page_controller.js.coffee index 7b44cb749b..ff7a695777 100644 --- a/app/assets/javascripts/darkswarm/controllers/group_page_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/group_page_controller.js.coffee @@ -1,6 +1,3 @@ -Darkswarm.controller "GroupPageCtrl", ($scope, enterprises, Enterprises, MapConfiguration, OfnMap) -> +Darkswarm.controller "GroupPageCtrl", ($scope, enterprises, Enterprises) -> $scope.Enterprises = Enterprises - - $scope.map = angular.copy MapConfiguration.options - $scope.mapMarkers = OfnMap.enterprise_markers enterprises $scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1 diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index e8318faef9..654dfac11e 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -33,11 +33,11 @@ active: "tabs.map.active", select: "select(\'map\')"} .map-container - %map{"ng-if" => "(isActive(\'/map\') && (mapShowed = true)) || mapShowed"} + %map{"ng-controller" => "MapCtrl", "ng-if" => "(isActive(\'/map\') && (mapShowed = true)) || mapShowed"} %ui-gmap-google-map{options: "map.additional_options", center: "map.center", zoom: "map.zoom", styles: "map.styles", draggable: "true"} %map-osm-tiles %map-search - %ui-gmap-markers{models: "mapMarkers", fit: "true", + %ui-gmap-markers{models: "OfnMap.enterprises", fit: "true", coords: "'self'", icon: "'icon'", click: "'reveal'"} %tab{heading: t(:groups_about),