for example we have one bus the route is fix in that route all Bus stand covered by marker how can we do in angular with leaflet map which is show in image
for example we have one bus the route is fix in that route all Bus stand covered by marker how can we do in angular with leaflet map which is show in image
u can use @angular/google-maps
html
<google-map [center]="center"
[zoom]="zoom">
<map-marker *ngFor="let markerPosition of markerPositions"
[position]="markerPosition"
[options]="markerOptions"></map-marker>
<map-polyline [path]="vertices"></map-polyline>
</google-map>
ts
public center: google.maps.LatLngLiteral = { lat: 13, lng: 13 };
public zoom = 4;
public markerPositions: google.maps.LatLngLiteral[] = [
{ lat: 13, lng: 13 },
{ lat: 13, lng: 12 },
{ lat: 13, lng: 11 },
{ lat: 13, lng: 10 },
{ lat: 13, lng: 9 },
{ lat: -13, lng: 0 },
{ lat: 13, lng: -13 },
];
public markerOptions: google.maps.MarkerOptions = { draggable: false };
public vertices: google.maps.LatLngLiteral[] = [
{ lat: 13, lng: 13 },
{ lat: 13, lng: 12 },
{ lat: 13, lng: 11 },
{ lat: 13, lng: 10 },
{ lat: 13, lng: 9 },
{ lat: -13, lng: 0 },
{ lat: 13, lng: -13 },
];
check this link Use Google Maps to see how u create a Key and load the maps API