3.8 Circles & Border Smoothness

469
3
01-24-2014 06:33 AM
BrianRassier
Occasional Contributor
Hello -

We've created circles with the JS API in the past using buffer.  One issue we have with these is at certain zoom levels, the circle border gets choppy.  This is likely because there are too many or too few points, depending on the circle size and zoom level.

We were hopeful that the new Circle API would remedy this, and somehow always have smooth borders regardless of zoom level and circle size.  This doesn't seem to be the case (see attached for 3.8 circle example).

Are there any plans to try to shape the new circles so they're "smooth" regardless of size/zoom?

Thanks
-Brian
0 Kudos
3 Replies
JianHuang
Occasional Contributor III
Brian,

You can tweak the parameter "numberOfPoints". By default it's 60. I think 90~180 would be a good number for a smooth user experience on any zoom level.
0 Kudos
derekswingley1
Frequent Contributor
Unfortunately, it's not as simple as increasing the number of points used to create a circle. That's a good option when you're seeing the specific segments used to create a circle, like here:  http://jsbin.com/AnIQEqO/1/edit

But when the issue is something like what Brian has described, using more points won't improve display quality. Instead, consider using a point with a marker symbol to represent your data rather than a circle when at small scales (zoomed way out). The underlying issue is that the API is trying to draw many vertices in a small area which makes the feature look saturated or jaggy. You can see the same thing when you put highly-detailed polygons on a small scale map as shown in one of the screen shots in our feature layer doc on best practices:  https://developers.arcgis.com/javascript/jshelp/best_practices_feature_layers.html (look at the western border of Mississippi in the last screen shot).
0 Kudos
JianHuang
Occasional Contributor III
I see what the issue is. SVG curves may be a good solution in the future.
0 Kudos