Reputation: 9859
Next code is add circle to map:
var mylayer = L.circle([60, 54.75621], 200).addTo(Window.map);
but I want to add coordinates from variable: eq.coordinates
console.log(eq.coordinates);
Print on console: POINT(31.5 42.2)
I want to do something like:
var mylayer = L.circle(eq.coordinates).addTo(Window.map);
Upvotes: 0
Views: 541
Reputation: 10008
L.circle wants latlng coordinates.
If you want to use pixel coordinates you have to convert them to latlng coordinates using http://leafletjs.com/reference-1.0.0.html#map-containerpointtolayerpoint
If you could put an example online, this would help helping you
Upvotes: 1