-
Notifications
You must be signed in to change notification settings - Fork 409
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
Fix #1314 Support to print vector layer #1317
Conversation
- Support vector style for leaflet layers - Conversion to OL2 style format - add reprojectGeoJson utility method to CoordinateUtils Missing: - Print preview support - Markers
- Now you can print also markers - Now the preview shows the vector layer **note**: a little bug have to be solved. The preview map do not show features on first rendering. This can be avoided loading them in the VectorLayer on startup, but this will cause duplicated vectors data.
shouldComponentUpdate(newProps) { | ||
// the reduce returns true when a prop is changed | ||
// optimizing when options are equal ignorning loading key | ||
return !(["map", "type", "srs", "position", "zoomOffset", "onInvalid", "onClick", "options"].reduce( (prev, p) => { |
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.
Do you have a use case where the layer was slow without this?
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.
I noticed an increase of performances during debug, with many features in the map.
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.
Honestly, I did not tested if it is perceptible in the normal application, but when you have both map and print preview (doubling in fact the number of features) it can become slow.
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.
Can I go on with merge?
…it#1317) * Fix geosolutions-it#1314 Support to print vector layer (leaflet) - Support vector style for leaflet layers - Conversion to OL2 style format - add reprojectGeoJson utility method to CoordinateUtils Missing: - Print preview support - Markers * Add default marker and preview for vector print - Now you can print also markers - Now the preview shows the vector layer **note**: a little bug have to be solved. The preview map do not show features on first rendering. This can be avoided loading them in the VectorLayer on startup, but this will cause duplicated vectors data. * fixed preview issues for same named layer * ForceUpdate when layer's created. Optimized leaflet layer rendering * rounded reprojection coordinates tests * add tests for feature and vector layers
This fixes PDF support for vector layers (OpenLayers) #1315 too, because I created a style abstraction that can be used in every map.