I have an application using a polar projections. When you zoom into the lines created at 45/135/225/315 degree angles, they disappear at high zoom levels. I also have noticed that sometimes points seem to also not display on these angles. The do appear when zoomed out.
Is there a reason for this behaviour?
Hi there,
The behavior you’re seeing is expected. You’re creating your polylines in WGS84 and adding them directly to a FeatureLayer that’s also set to use the WGS84 spatial reference. However, the features need to be projected to EPSG:3031 on the fly to display on the map.
When features are projected, the feature tile extent is also projected into the data’s spatial reference (in this case, from 3031 to WGS84). As a result, the extent doesn’t intersect with the geometry, leading to the behavior you’re observing.
To resolve this, you can:
Set the layer’s spatial reference to match the view’s spatial reference.
Provide geometries in the same spatial reference as the view.
Or densify the geometry so that points will intersect with the tile extent.
Here is your codepen updated - https://codepen.io/U_B_U/pen/MYKGBgp?editors=1001
In this code, I am setting the layer's spatialReference to 3031 so that it matches the view's spatialRefrence.
Hope this helps,
-Undral
Hi @UndralBatsukh - thanks for the reply. I've taken another look and simplified the codepen, it was filled with lots of unused logic which was cluttering it up. Even with your suggested changes I still see that the lines come in and out of existence as I zoom in and out of the map.
here is the updated codepen: https://codepen.io/JDawe/pen/PwZedjK