Comments (7)
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.
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.
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.
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.
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.
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.
Closing because @jonathan-wcc reports it to be fixed.
from mapfish-print.
Related Issues (20)
- Getting error when there are spaces in an imageExpression file name HOT 2
- Can't start print app
- spring-security.xsd removed HOT 2
- Replace JAI by Java Image I/O API
- Why not upload the maven repository HOT 4
- Build multiple tables from json array
- Load-balancing MapFishPrint in kubernetes and shared-state
- Image layer broken HOT 2
- Remove magic number: 1 in ImageSimilarity
- feature request: Support map attribution printing HOT 2
- Can't find generated jar/war HOT 2
- SpringBoot3 / Springframework6 version HOT 1
- Index.html not available (404) on Tomcat HOT 1
- Incorrect Nbr pixels in CreateMapProcessor
- The example test "pdf_a_compliant" does not include a hyperlink in the report
- Multiple carriage returns in Text property get removed or ignored. HOT 2
- java.lang.NoClassDefFoundError: org/geotools/api/geometry/Position HOT 8
- Stop catching Throwable
- Incorrect spelling for referer header in MapPrinterServlet.java
- Stop hidding exceptions workfllow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapfish-print.