I’m noticing that layers seem to disappear when switching between projections sometimes. shapefile.zip (2.4 MB) Could I get a list of what properties on the map/overlay/layers that I should be modifying when changing projections?
I’m on v13.1.2.
This is what I do when changing projections. simply looping through layers and changing the external projection or creating a new projection converter if it doesn’t already have one:
myMap.MapUnit = newProjection.GetUnit();
// this is in a loop of an overlay's layers
if (layer is FeatureLayer featureLayer)
{
if (featureLayer.FeatureSource.ProjectionConverter == null)
{
featureLayer.FeatureSource.ProjectionConverter = new ProjectionConverter(4326, e.Projection.Srid);
}
else
{
featureLayer.FeatureSource.ProjectionConverter.ExternalProjection = newProjection;
}
}
Do I have to worry about changing the scale, current extent, wrapping properties, etc.? Not sure what I’m missing here. I see something similar in the How Do I sample -> Project the World. Select MGA Zone 55 and zoom out a little bit and the layer disappears. Not sure if it’s the same issue.
I attached a zip file of a shapefile containing countries. This is the main layer I am testing with. the layers mainly seem to disappear when going to 4326, even if the original data is in 4326.
Edit: If I have the map in decimal degrees, and the layer’s internal/external projection are both
, then the layer does not show up. Once I swap the external projection to mercator it does work. Is there a reason for this I’m not thinking of? It also seems like the bounding box of the layer is way too big. It should be within -180,90,180,-90 but I am seeing values in the 200s/300s.
If I’m using custom zoom levels for the map, do I need to change anything when projecting the layers? Or I guess more specifically, when changing the MapUnit? Depending on the projection/map unit, the furthest zoomed-in zoomlevel is hit earlier.

