Code Monkey home page Code Monkey logo

Comments (4)

mmomtchev avatar mmomtchev commented on May 9, 2024

If your function returns a different style for every feature used, you have no way to improve the performance - whether you use rlayers or you use directly OpenLayers. In this case you have 2 choices: either reduce the number of features or use clustering.
If some features share the same styles - you can use the cache parameters - in this case rlayers wil call only your hashing function to check if a new style has to be computed and constructed.

from rlayers.

vgrafe avatar vgrafe commented on May 9, 2024

You got it - the function returns 3 different styles depending on the feature type. One of those types makes for 99% of the features rendered... what cache parameters are you making mention of, Do you mean I should build a cache layer depending on the 'feature' and 'resolution' parameters sent to the function, or is there a mechanism offered by rlayers/openlayers?

Unfortunately clustering does not seem to be an option for our use case (but I'll look into it more).

Thanks for such a fast response btw πŸš€

edit: I just noticed cacheSize and cacheId on the clustering example... I'll see what I can do with it.

from rlayers.

mmomtchev avatar mmomtchev commented on May 9, 2024

@vgrafe if one feature type represents 99% of the features, your best option, performance-wise, would be to move these features to a separate vector layer with a single fixed style

from rlayers.

vgrafe avatar vgrafe commented on May 9, 2024

Makes sense. Thank you for the help!

from rlayers.

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.