Fix map marker positioning.

This commit is contained in:
Senén Rodero Rodríguez
2017-08-08 11:37:00 +02:00
parent 130e4533ac
commit 3b04f881e7
2 changed files with 22 additions and 17 deletions

View File

@@ -24,8 +24,10 @@ App.Map =
editable = $(element).data('marker-editable')
marker = null;
markerIcon = L.divIcon(
iconSize: null
html: '<div class="map-marker"></div>')
className: 'map-marker'
iconSize: [30, 30]
iconAnchor: [15, 40]
html: '<div class="map-icon"></div>')
createMarker = (latitude, longitude) ->
markerLatLng = new (L.LatLng)(latitude, longitude)

View File

@@ -977,24 +977,27 @@ table {
height: 350px;
.map-marker {
visibility: visible;
width: 30px;
height: 30px;
border-radius: 50% 50% 50% 0;
background: #00cae9;
position: absolute;
transform: rotate(-45deg);
left: 50%;
top: 50%;
margin: -45px 0 0 -15px;
}
.map-marker:after {
content: "";
width: 14px;
height: 14px;
margin: 8px 0 0 8px;
background: white;
position: absolute;
border-radius: 50%;
margin-top: -5px;
.map-icon{
transform: rotate(-45deg);
width: 30px;
height: 30px;
border-radius: 50% 50% 50% 0;
background: #00cae9;
transform: rotate(-45deg);
}
.map-icon:after {
content: "";
width: 14px;
height: 14px;
margin: 8px 0 0 8px;
background: white;
position: absolute;
border-radius: 50%;
}
}
.map-attributtion{
visibility: visible;