This project implements Neshan map as an angular library ,it has used Leaflet to implement the map. This library is written for the needs of our company. If you have any questions or suggestions to improve it ,create an issue.
npm:
You can access to Leaflet Maps L
, map
objects by using onInit
.
ngOnInit(): void {
this.initMap();
}
initMap() {
this._map = new leafletNeshan.Map('map', {
key: this.key,
center: this.center,
zoom: this.zoom,
poi: this.poi,
maptype: this.mapType,
traffic: this.traffic,
});
leafletNeshan.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 20
}).addTo(this._map);
}
}