Alexey8
(Alexey Bykov)
November 14, 2011, 3:17pm
1
I welcome!
There is API allowing to print the map that created on the basis of Open Layers Wrapper add-on?
Of course, all drawn on her markers, lines, polylines, and with all the open popup- menu?B)
I would be very grateful for the help!
Cheers,
Thx
Alexey8
(Alexey Bykov)
November 14, 2011, 3:31pm
2
I suppose it will be sufficient such a listener -
...
final Button print = new Button("Print This Page");
print.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
print.getWindow().executeJavaScript("print();");
}
});
...
There may be other ways?
Alexey8
(Alexey Bykov)
November 15, 2011, 12:49pm
3
Managed to implement something like this -
...
@Override
public void buttonClick(ClickEvent event) {
Thread thread = new Thread() {
@Override
public void run() {
gisCanvas.getLayoutHeader().setVisible(false);
gisCanvas.getLayoutFooter().setVisible(false);
gisCanvas.getUserInterfacePanel().setVisible(false);
int splitPosition = gisCanvas.getHorizontalSplit().getSplitPosition();
gisCanvas.getHorizontalSplit().setSplitPosition(0);
try {
this.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
window.executeJavaScript("print();");
gisCanvas.getLayoutHeader().setVisible(true);
gisCanvas.getLayoutFooter().setVisible(true);
gisCanvas.getUserInterfacePanel().setVisible(true);
gisCanvas.getHorizontalSplit().setSplitPosition(splitPosition);
window.removeWindow(blockerWindow);
}
};
thread.start();
blockerWindow = new BlockerWindow(thread, " ΠΠΎΠ΄Π³ΠΎΡΠΎΠ²ΠΊΠ° ΠΊΠ°ΡΡΡ ΠΊ ΠΏΠ΅ΡΠ°ΡΠΈ, ΠΆΠ΄ΠΈΡΠ΅ ", " ΠΠΎΠ΄Π³ΠΎΡΠΎΠ²ΠΊΠ° ΠΊΠ°ΡΡΡ ΠΊ ΠΏΠ΅ΡΠ°ΡΠΈ ΠΌΠΎΠΆΠ΅Ρ Π·Π°Π½ΡΡΡ Π½Π΅ΠΊΠΎΡΠΎΡΠΎΠ΅ Π²ΡΠ΅ΠΌΡ ");
window.addWindow(blockerWindow);
}
...
Perhaps, the solution contains inaccuracies.:dry:
I would be grateful for corrections!
Cheers,
Thx