Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating DataSource in Layer has no effect if Layer is wrapped in a RasterizingTileLayer #2486

Open
Thoronion opened this issue Feb 9, 2024 · 1 comment
Milestone

Comments

@Thoronion
Copy link

Mapsui Version
4.1.3

Mapsui Platform
WinUI

Device
Windows 11 build 22621.3007

Describe the bug
Wrap a Layer in a RasterizingTileLayer. Consider the following code

Map _map = new();
Layer _layer = new() 
{
     Style = /* Style 1 */;
     DataSource = /* DataSource 1 */;
};
RasterizingTileLayer _tileLayer = new(_layer);

Later on you want to update the style and data source of _layer, e.g.

_layer.Style = /* Style 2 */

_layer.DataSource = /* DataSource 2 */

_tileLayer.ClearCache();
_map.Refresh();

The style will be correctly updated to Style 2 but the data source will remain DataSource 1. I provided a minimal example below.

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/Thoronion/MapsuiSandBox
  2. Checkout branch datasource_not_updating
  3. Click on the test button
  4. Only the style is updated and not the data source.

Expected behavior
Expecting the datasource to be updated and rendered.

@pauldendulk
Copy link
Member

@inforithmics Is this something you could look at?

@pauldendulk pauldendulk added this to the 5.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants