Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] uDig 1.1: printing map

Mauro Bartolomeoli wrote:
I'm developing an application which needs to print a map into an RTF document. I need to print a different zone than the one showed on screen (for example to print using a fixed scale).

I can easily do it using iText with the following code (to create the itext image to add to the document):

Image image = createMapImage(page,ApplicationGIS.getActiveMap(),new NullProgressMonitor(),envelope,crs);

The problem is that sending the zoom command to the map I modifiy the zoom on the screen too. How can I obtain a copy of the active map for printing purposes?
Have a look at the ApplicationGIS draw map method - it makes a copy of the Map (and adjusts the scale and so on).
Jody


Back to the top