-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coordinate information to print page #906
Conversation
@@ -137,6 +147,9 @@ public class PDF { | |||
private static final String MARKER_COORD_SEPARATOR= "_"; | |||
|
|||
private static final FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null); | |||
|
|||
private static final ResourceBundle rb = ResourceBundle.getBundle("messages"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rename "messages" to something else to avoid confusion when theres another localization file set called messages. Maybe just rename to "print-messages"?
stream.stroke(); | ||
} | ||
|
||
private static int[] getCornerCoords(PrintRequest request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't round to int for all projections. Maybe just keep as is without rounding for now?
float textY2 = textY - OFFSET_TEXT_Y; | ||
|
||
String coords = rb.getString("coordinates.lower") + ": " + bottomLat + ", " + bottomLon; | ||
String projection = "ETRS-TM35FIN" + " " + rb.getString("coordinates"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't hard-code "ETRS-TM35FIN". Get it from the messages based on projection with fallback to the EPSG-code.
@@ -321,6 +336,79 @@ private static void drawTimeseriesTexts(PDPageContentStream stream, | |||
x, OFFSET_TIME_IN_TIMESERIES_BOTTOM); | |||
} | |||
|
|||
private static void drawCornerCoords(PDPageContentStream stream, PrintRequest request, float x, float y, float mapHeight, float mapWidth, PDRectangle pageSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Page size isn't used so we can remove it from params:
private static void drawCornerCoords(PDPageContentStream stream, PrintRequest request, float x, float y, float mapHeight, float mapWidth, PDRectangle pageSize) | |
private static void drawCornerCoords(PDPageContentStream stream, PrintRequest request, float x, float y, float mapHeight, float mapWidth) |
Included in #1035 |
Printed map now shows ETRS-TM35FIN coordinates on corners