Exporting Maps as PDF or Images > Batch export > Over-riding export parameters |
|||||||||||||||||||||||||||
Using the Export Component JavaScript object, you can also over-ride the export parameters that you've specified for each map in XML. This is particularly useful in particular scenarios:
The list of parameters that can be over-ridden this way is as under: |
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
An Example | |||||||||||||||||||||||||||
Let's quickly see an example how to hide the Export dialog box of all maps during a batch process. To do so, we just add the following line to our export component code: | |||||||||||||||||||||||||||
<script type="text/javascript"> //Initialize Batch Exporter with DOM Id as fcBatchExporter var myExportComponent = new FusionMapsExportObject("fcBatchExporter", "../../FusionMaps/FCExporter.swf"); //Add the maps to queue. The maps are referred to by their DOM Id. myExportComponent.sourceMaps = ['myMapId1','myMapId2','myMapId3']; //------- Export related Attributes ------// myExportComponent.exportAttributes.showExportDialog = '0'; //------ Export Component Attributes ------// //Set the mode as full mode myExportComponent.componentAttributes.fullMode='1'; //Set saving mode as both. This allows users to download individual maps/ as well as download all maps as a single file. myExportComponent.componentAttributes.saveMode='both'; //Show allowed export format drop-down myExportComponent.componentAttributes.showAllowedTypes = '1'; //Cosmetics //Width and height myExportComponent.componentAttributes.width = '350'; myExportComponent.componentAttributes.height = '140'; //Message - caption of export component myExportComponent.componentAttributes.showMessage = '1'; myExportComponent.componentAttributes.message = 'Click on button above to begin export of maps. Then save from here.'; //Render the exporter SWF in our DIV fcexpDiv myExportComponent.Render("fcexpDiv"); </script> |
|||||||||||||||||||||||||||
As you can see above, the format is: export_object.exportAttributes.parameter='value'; When you run the above example and initiate batch export, you'll see that the capturing phase does not show export dialog any more. This saves you the trouble of specifying the parameter in each map's XML. |