Leaflet Error: Invalid LatLng object: (, NaN)

Viewed 3532

I am trying to create a circle with leaflet and I am getting this error:

Error: Invalid LatLng object: (50.5, NaN)

I am using this code in Angular 2 to create my circle:

L.circle([50.5, 30.5], {radius: 200}).addTo(map);

I don't know why but this code below is OK:

L.circleMarker([50.5, 30.5], {radius: 200}).addTo(map);

But I want to use L.circle() function and not L.circleMarker().

2 Answers
Related