I'm using OpenLayers and OpenStreetMap tiles on my map. I'm drawing a circle somewhere in Britain. Then I call getRadius()
method on this circle. Map is set to projection: epsg3857
I don't understand why it gives me that strange results. Could you please help me to understand why getRadius()
function returns value that is not represented by drawn circle? As a result I suppose that point and radius will represent different circle from what I can see on the map (it is used to later on find some objects inside that circle).
ol.proj.getPointResolution
.for the circle center and adjust the radius for the true scale. – Mike Jan 14 at 10:04ol.proj.getPointResolution(projection, 1, projectedCenter))
will work for any projection as long as the circle is relatively small (so the resolution does not change significantly within the circle). – Mike Jan 14 at 11:49