Closed workmaps closed 8 years ago
@gmcressman: I just tested out the leaflet.label.js plugin that we were talking about this afternoon. Unfortunately the popup is html and is not captured in the downloaded image. I am going to try to see what can be done with CartoDB.
@workmaps : The case detail pop-ups are not important in the map download. The org unit labels are. Are we talking about the org unit (polygon) labels?
@gmcressman The org labels are popups as well and are not able to be captured by the map export function. I will look into CartoDB labeling as an alternative.
Turning the labels on cause the map download to fail in leaflet-image.js on line 211. This js library does not handle the HTML labels gracefully. The leaflet-image.js documentation (https://github.com/mapbox/leaflet-image) states: This library does not rasterize HTML because browsers cannot rasterize HTML. Therefore, L.divIcon and other HTML-based features of a map, like zoom controls or legends, are not included in the output, because they are HTML. However, the code does not gracefully handle the error. I have logged an issue with the mapbox team.
To get around this we should be able to turn off the labels programatically and turn them back on after image download.