[Cartoweb-dev] Problem pdfRotate

Dirk Jesko ml.dje at geocontent.de
Tue Mar 13 03:14:40 EST 2007


I encountered the following problem: First, the preview rectangle for 
the pdfExport using pdfRotate is activated. Now I change the tool. In 
most cases the preview rectangle is removed as expected. However, some 
tools produce a JavaScript error instead of removing the rectangle, e.g. 
outline and measure tools. So far I could narrow this down to the following:

If an outline tool is selected, the corresponding outline_* function 
defined in dhtmlInit.js is called first. This function sets the current 
Layer to "outline_*". Afterwards, hidePdfFeature from dhtmlPdf.js is 
called and tries to hide the "pdf_overview" feature which seems to be a 
child of map_drawing. But, since the currentLayer is now "outline_*" and 
not "map_drawing", the call


fails, because there is no such child.

I see two solutions:

1. hidePdfFeature should be called before any function that changes the 
current Layer.

2. hidePdfFeature should not use the currentLayer property of aDisplay, 
but access "map_drawing" directly.

Unfortunately, I do not know how to realize any of these. Therefore, any 
suggestion would be very helpful.


More information about the Cartoweb-dev mailing list