comparison src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 53:691864097eb1

* src/java/de/intevation/mxd/writer/MapScriptWriter.java: Added the (currently) hard-coded template-path to the mapObj-constructor; removed some TODO-settings.
author Stephan Holl <stephan.holl@intevation.de>
date Wed, 11 May 2011 10:10:18 +0200
parents 0fecdcc28b1b
children f0c02ff120d6
comparison
equal deleted inserted replaced
52:cd541e73d523 53:691864097eb1
44 */ 44 */
45 private Document root; 45 private Document root;
46 private mapObj map; 46 private mapObj map;
47 47
48 48
49 /**
50 * TODO: Workarround to import the Mapfile-Template, it should be done
51 * via a property file, currently hardcoded.
52 */
49 public MapScriptWriter() { 53 public MapScriptWriter() {
50 map = new mapObj(""); 54 map = new mapObj("z:/mxd-testbed_sh/mapserver/mapfile/mxd.map");
51 } 55 }
52 56
53 public MapScriptWriter(String path) { 57 public MapScriptWriter(String path) {
54 map = new mapObj(path); 58 map = new mapObj(path);
55 } 59 }
91 //Get the map. 95 //Get the map.
92 Element mapNode = (Element)XMLUtils.xpath( 96 Element mapNode = (Element)XMLUtils.xpath(
93 root, 97 root,
94 "/mxd/map", 98 "/mxd/map",
95 XPathConstants.NODE); 99 XPathConstants.NODE);
96
97 //TODO Get the following values from a template.
98 map.setShapepath("/home/intevation/mxd-testbed/testdata-frida");
99 map.setHeight(700);
100 map.setWidth(800);
101 map.setProjection("EPSG:4326");
102 100
103 //Set the name. 101 //Set the name.
104 map.setName(mapNode.getAttribute("name")); 102 map.setName(mapNode.getAttribute("name"));
105 map.setMetaData("wms_title", mapNode.getAttribute("name")); 103 map.setMetaData("wms_title", mapNode.getAttribute("name"));
106 //Set the extent. 104 //Set the extent.
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)