I'm adding the results of a search to a map using OpenStreetMap
. For each returned search result, I need to plot the latitude and longitude on a map as such:
L.marker([39.616886,-86.310997]).addTo(map)
.bindPopup('the institutions name')
.openPopup();
How do I do that within a forEach
loop? Here's what I attempted, but I'm getting an error:
The name L doesn't exist in the current context.
@foreach (var u in Model.listschools)
{
L.marker([@u.lat, @u.longt]).addTo(map)
.bindPopup(@u.instnm)
.openPopup();
}