-
Notifications
You must be signed in to change notification settings - Fork 109
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
IofCourseExport: Add 'Map' element #2168
base: master
Are you sure you want to change the base?
Conversation
// IOF.xsd proposes for 'MapPositionTopLeft': "The position of the map's top left corner given in the map's coordinate system, usually (0, 0)." | ||
// However, the real coordinates from the map_extent structure are used below. | ||
// NOTE: templates are considered when determining the map extent. | ||
const auto map_extent = map->calculateExtent(true, true, view); | ||
{ | ||
XmlElementWriter map_position_topleft(*xml, QLatin1String("MapPositionTopLeft")); | ||
map_position_topleft.writeAttribute(QLatin1String("x"), QString::number(map_extent.topLeft().x())); | ||
map_position_topleft.writeAttribute(QLatin1String("y"), QString::number(map_extent.topLeft().y())); | ||
map_position_topleft.writeAttribute(QLatin1String("unit"), QLatin1String("mm")); // optional attribute, default is 'mm' | ||
} | ||
{ | ||
XmlElementWriter map_position_bottomright(*xml, QLatin1String("MapPositionBottomRight")); | ||
map_position_bottomright.writeAttribute(QLatin1String("x"), QString::number(map_extent.bottomRight().x())); | ||
map_position_bottomright.writeAttribute(QLatin1String("y"), QString::number(map_extent.bottomRight().y())); | ||
map_position_bottomright.writeAttribute(QLatin1String("unit"), QLatin1String("mm")); // optional attribute, default is 'mm' | ||
} |
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.
Is the extent information useful at all when not also providing the Image
element?
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.
Is the extent information useful at all when not also providing the
Image
element?
Good question, but I assume yes, since the 'Image' element is not mandatory and the PR works for the issue reporter due to #2166
The 'Map' element is added to the IOF 3.0 compliant xml export of course data.
The 'Map' element is added to the IOF 3.0 compliant xml export of course data.
This commit partly solves #2167, #2166.