Coder Social home page Coder Social logo

Comments (5)

pauldendulk avatar pauldendulk commented on July 20, 2024

What are you referring too exactly. There is no 'BaseOnSourceLayers' in the Mapsui code. Are you using the WriteableLayer within a RasterizingLayer?

from mapsui.

EmaDozer avatar EmaDozer commented on July 20, 2024

I recognized that the IBaseOnSourceLayer interface is not part of Mapsui. But the issue stays the same. Which layers are cached? I saw a commit which prevent to cache WritableLayers but all other layers will be chached?

I think the question is this:
What happens if I change the coordinations of features of a cached layer?

The issue which i encountered is, that the cache is returning different SkiaPaths for "nearly" the same ViewPort and the exact same LineString, which appears for the user as "jumping" lines. The user can drag lines while the ViewPort stays the same. But somehow different SkiaPaths are cached. Here are the key (Viewport, float, TPath) and value of the VectorCache.GetOrCreatePath() method:

key: (BL: (X=9447737,444718989,Y=6016036,122831078) TR: (X=9515876,695165673,Y=6121144,541073304), 0, LINESTRING (9525303.71018535 6081266.624317251, 9496860.208610183 6067012.749910232), 2)
value: {Left=449,3636,Top=422,3461,Width=208,63641,Height=85,38812}

key: (BL: (X=9447737,444718987,Y=6016036,122831079) TR: (X=9515876,695165671,Y=6121144,541073305), 0, LINESTRING (9525303.71018535 6081266.624317251, 9496860.208610183 6067012.749910232), 2)
value: {Left=467,3636,Top=425,69656,Width=190,63641,Height=85,03766}

The differences of the ViewPort are in bold (the very last number of the X and Y coordination).

from mapsui.

charlenni avatar charlenni commented on July 20, 2024

I would say, you have to provide some more information. What provider do you use, what layer do you use? Best would be to provide a small sample, with which it is possible to reproduce the problem.

from mapsui.

EmaDozer avatar EmaDozer commented on July 20, 2024

I have a custom layer which uses WritableLayer as its source. So its basically a wrapper layer which referencing the features returned by the WritableLayer. I dont use any provider.

For the WritableLayer the IModifyFeatureLayer interface is used, to indicate that this layer should not be cached. For now, I also use this interface for my custom layer, which solves the issue.

Is that the considered solution for custom, modifiable layers? Took me a while to figure it out.

from mapsui.

pauldendulk avatar pauldendulk commented on July 20, 2024

In v5 there is no distinction between layers in how they cache. If a feature is modified in user code you need to call IFeature.Modified() to indicate the cache should be updated.

from mapsui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.