By using Google map API in ionic I can fix marker in the center:
#centerMarker {
width: 22px;
height: 40px;
display: block;
content: ' ';
position: absolute;
top: 50%;
left: 50%;
margin: -40px 0 0 -11px;
background: url('https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi_hdpi.png');
background-size: 22px 40px;
pointer-events: none; }
Drop Marker Function:
DropMarker(){
let source = "origin";
let image = 'assets/img/Untitled-1.png';
let marker = new google.maps.Marker({
map: this.map,
animation: google.maps.Animation.DROP,
position: this.map.getCenter(),
draggable: true, icon: image
});
I am using leaflet Js ver: 1.3.1
I don’t know how to do this with leaflet