Cirlce drawn using json data, places the radius marker way outside the circumference #5228

Open
htveranger opened this Issue Jan 5, 2017 · 0 comments

Projects

None yet

1 participant

@htveranger

Code:
if (!!circles) {
circles.forEach(function (circle) {
drawing = L.circle(L.latLng(circle.center.latitude, circle.center.longitude), circle.radius, settings);
if (drawingName) {
drawing.bindTooltip(drawingName);
drawing.bindTooltip(localizationStrings.get('Radius') + ': ' + (circle.radius / 1000).toFixed(2) + ' km');
}
drawing.addTo(layer);
drawing.editing.enable();
if (editCircleFunction) {
drawing.on('edit', editCircleFunction);
}
layer.addTo(map);
});
}
var bounds = layer.getBounds();
map.fitBounds(bounds);
Result :
image

Result after resposition the circle the cirlce is drawn correctly:
![image](https://cloud.githubusercontent.com/assets/16540368/21676542/3b450aba-d336-11e6-800b-
18d1f5afbfdc.png)

Data:
{
"circles":[
{
"radius":5.577802,
"center":{
"latitude":58.912197,
"longitude":5.712665,
}
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment