In this code {draggable:'true'}
feature is not accepted and makes error:
import { Component, OnInit } from '@angular/core';
import { NavController } from 'ionic-angular';
import * as Leaflet from 'leaflet';
@Component({
selector: 'page-street',
templateUrl: 'street.html'
})
export class StreetPage {
private latLng: any;
private marker: any;
private map: any;
constructor(public navCtrl: NavController) {
}
ngOnInit(): void {
this.drawMap();
}
drawMap(): void {
let map = Leaflet.map('map');
Leaflet.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
maxZoom: 15
}).addTo(map);
map.locate({ setView: true});
function onLocationFound(e) {
var radius = e.accuracy / 3;
Leaflet.marker(e.latlng, {draggable:'true'}).addTo(map);
Leaflet.circle(e.latlng, radius).addTo(map);
}
map.on('locationfound', onLocationFound);
//alert on location error
function onLocationError(e) {
alert(e.message);
}
map.on('locationerror', onLocationError);
}
}
any Idea to solve it?