| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…drawing if they have been covered by other points
…icVisibility # Conflicts: # Changelog.md # Contributors
| Back | FazBrowse Home | New Git URL |
The commit is to fix a problem that dynamic visibility settings don't work for layers in a MapGroup, also there has been an issue logged long time ago. Fixes #1289
Reproducible steps:
The root of this issue is that there is some logic error to determine the layer in a MapGroup is visible by testing the "IsVisible", "UseDynamicVisibility", "DynamicVisibilityMode" and "DynamicVisibilityWidth"
public void DrawRegions(MapArgs args, List<Extent> regions, bool selected) { if (Layers == null) return; foreach (IMapLayer layer in Layers) { if (!layer.IsVisible) continue; if (layer.UseDynamicVisibility && ((layer.DynamicVisibilityMode == DynamicVisibilityMode.ZoomedIn && MapFrame.ViewExtents.Width > layer.DynamicVisibilityWidth) || MapFrame.ViewExtents.Width < layer.DynamicVisibilityWidth)) { continue; // skip the layer if we are zoomed in or out too far. } layer.DrawRegions(args, regions, selected); } }The fix is simple, there is already a method Layer::VisibleAtExtent wrappered the above logic and it is correct. Use the method directly in the MapGroup::DrawRegions method.
Checklist
Changes proposed in this pull request: