Git Product home page Git Product logo

Comments (6)

ajkopinga avatar ajkopinga commented on July 28, 2024 1

I will probably create a new release this week.

from sldreader.

calinarens avatar calinarens commented on July 28, 2024

I figured out some more by debugging into OpenLayers. Somehow OpenLayers expects a different set of coordinates, because it actually multiplies the coordinates with 1.25 to create what OpenLayers thinks are pixelCoordinates.

I can solve it now to ignore the pixel ratio when creating the render context in
function getGraphicStrokeRenderer(linesymbolizer)
by adding pixelRatio=1 as an option to:
var render$1 = render.toContext(renderState.context, { pixelRatio: 1.0});

Is it possible for you to add this change?

from sldreader.

ajkopinga avatar ajkopinga commented on July 28, 2024

I don't think using a pixelRatio of 1 for the render context is the right solution. This means that graphic stroke marks become really tiny on mobile devices that typically have a pixelRatio of 3 or higher.

I think that it's better to scale the calculated stroke mark coördinates (and the gaps between the marks) with the pixelRatio. I will make a pull request that fixes this.

from sldreader.

calinarens avatar calinarens commented on July 28, 2024

Thanks for the quick fix! :-)

from sldreader.

calinarens avatar calinarens commented on July 28, 2024

Hi Arjen, when do you think you can create a release? I have a customer that is really happy with the new graphicstroke capabilities, and is eager to get the fixed version.

from sldreader.

ajkopinga avatar ajkopinga commented on July 28, 2024

I have just released v0.2.6 which fixes this bug.

from sldreader.

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.