From 87921294992fb9e393b54243e4b065abc29de414 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Fri, 20 Nov 2020 17:17:55 +0100
Subject: [PATCH] fix: map marker icon position

---
 src/app/map/components/map.component.scss |  2 --
 src/app/map/services/map.service.ts       | 14 ++++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/app/map/components/map.component.scss b/src/app/map/components/map.component.scss
index 9384e8a7b..0c3ea79c1 100644
--- a/src/app/map/components/map.component.scss
+++ b/src/app/map/components/map.component.scss
@@ -60,8 +60,6 @@
       stroke-width: unset !important;
     }
   }
-  margin-top: 0 !important;
-  margin-left: -21px !important;
 }
 
 ::ng-deep .leaflet-popup {
diff --git a/src/app/map/services/map.service.ts b/src/app/map/services/map.service.ts
index e5b7ebdfe..f2664c53f 100644
--- a/src/app/map/services/map.service.ts
+++ b/src/app/map/services/map.service.ts
@@ -10,26 +10,28 @@ export class MapService {
   public markerIconHover = divIcon({
     className: null,
     html: '<svg width="40" height="46"><use xlink:href="assets/ico/sprite.svg#map-marker-locate"></use></svg>',
-    iconSize: [35, 41],
-    iconAnchor: [13, 41],
+    iconSize: [40, 46],
+    iconAnchor: [20, 46],
+    popupAnchor: [0, -46],
   });
   public markerIcon = divIcon({
     className: null,
     html: '<svg width="40" height="46"><use xlink:href="assets/ico/sprite.svg#map-marker"></use></svg>',
-    iconSize: [35, 41],
-    iconAnchor: [13, 41],
+    iconSize: [40, 46],
+    iconAnchor: [20, 46],
+    popupAnchor: [0, -46],
   });
   public markerIconMdm = divIcon({
     className: null,
     html: '<svg width="19" height="24"><use xlink:href="assets/ico/sprite.svg#mdm"></use></svg>',
     iconSize: [19, 24],
-    iconAnchor: [19, 24],
+    iconAnchor: [9, 0],
   });
   public markerIconMdmHover = divIcon({
     className: null,
     html: '<svg width="19" height="24"><use xlink:href="assets/ico/sprite.svg#mdm-hover"></use></svg>',
     iconSize: [19, 24],
-    iconAnchor: [19, 24],
+    iconAnchor: [9, 0],
   });
   constructor() {}
 
-- 
GitLab