#include "sym.h"
#include "map.h"
-#undef ROTATE
-
uns debug_dump_source, debug_dump_after_proj, debug_dump_after_scaling;
uns debug_dump_multipolygons, debug_dump_css, debug_dump_styling, debug_dump_symbols;
}
struct svg *svg = svg_open(map_svg_output);
-#ifndef ROTATE
- svg_set_attr_dimen(svg, "width", page_width);
- svg_set_attr_dimen(svg, "height", page_height);
-#else
- svg_set_attr_dimen(svg, "width", page_height);
- svg_set_attr_dimen(svg, "height", page_width);
-#endif
+ if (!map_rotate)
+ {
+ svg_set_attr_dimen(svg, "width", page_width);
+ svg_set_attr_dimen(svg, "height", page_height);
+ }
+ else
+ {
+ svg_set_attr_dimen(svg, "width", page_height);
+ svg_set_attr_dimen(svg, "height", page_width);
+ }
struct style_results r;
style_init(&r);
svg_push_element(svg, "g");
svg_set_attr_format(svg, "clip-path", "url(#boundary)");
-#ifdef ROTATE
- svg_set_attr_format(svg, "transform", "translate(%.6g,0) rotate(90)", page_height * svg->scale);
-#endif
+ if (map_rotate)
+ svg_set_attr_format(svg, "transform", "translate(%.6g,0) rotate(90)", page_height * svg->scale);
}
// FIXME: Replace by generic logo drawing facility
double map_min_x, map_min_y;
double map_max_x, map_max_y;
double page_width, page_height;
-uns map_clip, map_draw_border;
+uns map_clip, map_rotate, map_draw_border;
char *map_xml_input;
char *map_projection;
char *map_style_sheet;
CF_DOUBLE("PageWidth", &page_width),
CF_DOUBLE("PageHeight", &page_height),
CF_UNS("Clip", &map_clip),
+ CF_UNS("Rotate", &map_rotate),
CF_UNS("DrawBorder", &map_draw_border),
CF_STRING("XMLInput", &map_xml_input),
CF_STRING("Projection", &map_projection),
# Clip output to the requested rectangle
Clip 1
+ # Rotate the map by 90 degrees
+ Rotate 0
+
# Draw blue border around the requested rectangle
DrawBorder 0
extern double map_min_x, map_min_y;
extern double map_max_x, map_max_y;
extern double page_width, page_height;
-extern uns map_clip, map_draw_border;
+extern uns map_clip, map_rotate, map_draw_border;
extern char *map_xml_input;
extern char *map_projection;
extern char *map_style_sheet;