Giter Site home page Giter Site logo

Comments (7)

jbjonesjr avatar jbjonesjr commented on June 27, 2024

Jonathan, I think the wms spec responds with a full list of features available, regardless if they are available in a single viewport or not. I do not think it is common for a "client" to keep track of what features are in view and update the legend accordingly.

Let me know if you have a contradictory example.

from mapfish-print.

jonathan-wcc avatar jonathan-wcc commented on June 27, 2024

Hey,
The GetLegend request doesn't seem to return a legend if the item is outside of viewing threshold. Instead, at least in the case of GeoServer, it returns an exception:
"java.lang.IllegalArgumentException: no legend passed
no legend passed"

My view is that on a printed map, a legend item shouldn't be printed if there is no legend item to print. From the end users perspective, having "Bus Stops" on a legend as in my original screenshot is worse than pointless - its taking up valuable map space to tell them absolutely nothing.

Incidentally, some clients do update the legend - I think its a common GeoExt thing. See:
http://lib.heron-mc.org/heron/0.73/examples/defaultnl/index.html
Try "streekpaden"
or "BAG - Verbilfsobjecten"
and zoom in/out.

They don't show the legend image itself (they can't, there isn't one at those scales), but they do still show the text.

from mapfish-print.

geekdenz avatar geekdenz commented on June 27, 2024

If I understand this correctly, you don't want to print legend items that are not displayed on the map. This is a very similar requirement if not the same we have. Basically, when the map only displays 'class 1', 'class 3' and 'class 4', it should not show 'class 2' in the legend, right?

If this is what this issue is about, please confirm so that I can work against this.

So, GeoServer and MapServer actually return an exception if you give them a GetLegend request and the class is not defined for that extent? If yes, please detail how to configure this in MapServer as we are quite keen on this feature as well.

from mapfish-print.

jonathan-wcc avatar jonathan-wcc commented on June 27, 2024

Hi Tim,
Not quite. In this particular case there's a scale threshold on the layer. The layer is enabled but I am zoomed out too far for it to be rendered.

The legend shouldn't be shown because the layer isn't shown on the map.

From MFP's perspective it is simply amatter of noting that the response from the server was an exception rather than a PDF. If an exception has been received it shouldn't print any part of that particular legend item.

Hope that's clearer.

from mapfish-print.

geekdenz avatar geekdenz commented on June 27, 2024

Yes it is and i think it would actually be reasonably simple to implement. However, I will need to find some time to do it.

from mapfish-print.

jonathan-wcc avatar jonathan-wcc commented on June 27, 2024

Has this been fixed but the ticket not closed? It doesn't seem to be happening in the 2.0.0 release.

from mapfish-print.

geekdenz avatar geekdenz commented on June 27, 2024

Closing because @jonathan-wcc reports it to be fixed.

from mapfish-print.

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.