I can't understand how to print a map using the Print and PrinTemplate components.
Does somebody have a simple example using theses components ?
Please help ...
Hello Domi,
I hope this example will help you:
<!--print--> <fmc:Print id="print" left="left 10" top="top 10" width="100%" height="100%" visible="false" borderwidth="0" listento="map,printWindow"> <string id="resetIdentify" en="Reset Identify" nl="Identify herstellen"/> <string id="previewSize" en="Preview at Original Size" nl="Printvoorbeeld op ware grootte"/> <string id="toPrinter" en="Send to Printer" nl="Afdrukken"/> <string id="choseTemplate" en="--Chose Template--" nl="-- Kies papierformaat --"/> <fmc:BaseContainer left="130" top="183" borderwidth="0"> <fmc:MonitorLayer id="printMonitor1" listento="printMap1"> <style id=".text" font-family="courier" font-size="12px" color="#666666" display="block" font-weight="normal"/> </fmc:MonitorLayer> <fmc:MonitorLayer id="printMonitor0" listento="printMap0"> <style id=".text" font-family="courier" font-size="12px" color="#666666" display="block" font-weight="normal"/> </fmc:MonitorLayer> </fmc:BaseContainer> <fmc:PrintTemplate id="printTemplate0" name="staand A4" dpi="150" format="A4" orientation="portrait" listento="printMonitor0" maps="printMap0"> <fmc:Map id="printMap0" name="kaartbeeld" width="100%" height="100%" movequality="HIGH" visible="false"/> <fmc:EditMap id="editMap1" name="redlining" width="100%" height="100%" listento="gis,printMap0" editable="false"/> <fmc:BitmapClone name="legenda" right="right" width="36%" height="80%" top="10%" listento="legenda" refreshrate="2500"/> <fmc:BitmapClone name="identify resultaten" width="40%" height="20%" left="left" visible="false" listento="info_html" refreshrate="2500"/> <fmc:Scalebar name="schaalbalk" left="30%" top="98%" width="200" listento="printMap0" units=" m"> <style id=".label" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> <style id=".units" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> </fmc:Scalebar> <fmc:Image name="logo provincie" left="64%" vstretch="false" hstretch="false" url="../perpleks/images/printlogo.png"/> <fmc:PrintLabel name="kaartbron" top="98%" left="74%" text="kaart vervaardigd met PerPleks" fontfamily="verdana" fontsize="8" alignment="left"/> <fmc:PrintLabel name="titel legenda" top="8%" left="65%" text="Kaart" fontfamily="verdana" fontsize="12" alignment="left"/> </fmc:PrintTemplate> <fmc:PrintTemplate id="printTemplate1" name="liggend A4" dpi="150" format="A4" orientation="landscape" listento="printMonitor1" maps="printMap1"> <fmc:Map id="printMap1" name="kaartbeeld" width="100%" height="100%" movequality="HIGH" visible="false"/> <fmc:EditMap id="editMap2" name="redlining" width="100%" height="100%" listento="gis,printMap1" editable="false"/> <fmc:BitmapClone name="legenda" right="right" width="25%" height="80%" top="14%" listento="legenda" refreshrate="2500"/> <fmc:BitmapClone name="identify resultaten" width="40%" height="30%" left="left" visible="false" listento="info_html" refreshrate="2500"/> <fmc:Scalebar name="schaalbalk" left="30%" top="97.5%" width="200" listento="printMap1" units=" m"> <style id=".label" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> <style id=".units" font-family="verdana" font-size="10px" color="#555555" display="block" font-weight="normal"/> </fmc:Scalebar> <fmc:Image name="logo provincie" left="75%" vstretch="false" hstretch="false" url="../perpleks/images/printlogo.png"/> <fmc:PrintLabel name="kaartbron" top="98%" left="83%" text="kaart vervaardigd met PerPleks" fontfamily="verdana" fontsize="8" alignment="left"/> <fmc:PrintLabel name="titel legenda" top="10%" left="75%" text="Kaart" fontfamily="verdana" fontsize="12" alignment="left"/> </fmc:PrintTemplate> </fmc:Print>
Roy