mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix PNG exporter.
This commit is contained in:
parent
1256d0e218
commit
7e59b19fc0
@ -216,11 +216,7 @@ public class ExporterFactory {
|
||||
final String iconName = imgUrl.substring(index + 1);
|
||||
// Hack for backward compatibility . This can be removed in 2012. :)
|
||||
String imgPath;
|
||||
if (imgUrl.contains("images")) {
|
||||
imgPath = imgBaseUrl + "/../icons/legacy/" + iconName;
|
||||
} else {
|
||||
imgPath = imgBaseUrl + "/" + imgUrl;
|
||||
}
|
||||
elem.setAttribute("xlink:href", imgPath);
|
||||
elem.appendChild(document.createTextNode(" "));
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class TransformView extends AbstractView {
|
||||
response.setContentType(contentType);
|
||||
|
||||
// Set file name...
|
||||
final String fileName = (filename != null ? filename : "map" + ".") + exportFormat.getFileExtension();
|
||||
final String fileName = (filename != null ? filename : "map") + "." + exportFormat.getFileExtension();
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
|
||||
// Write content ...
|
||||
@ -79,7 +79,7 @@ public class TransformView extends AbstractView {
|
||||
baseUrl = "http://www.wisemapping.com/images";
|
||||
} else {
|
||||
final ServletContext servletContext = this.getServletContext();
|
||||
baseUrl = "file://" + servletContext.getRealPath("/icons/") + "/";
|
||||
baseUrl = "file://" + servletContext.getRealPath("/");
|
||||
}
|
||||
properties.setBaseImagePath(baseUrl);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user