Skip to content

Commit

Permalink
Merge branch 'branch-6-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Jan 5, 2013
2 parents 79f839d + b24f4d4 commit 3b34b30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -5565,6 +5565,7 @@ int initMap(mapObj *map)

msInitSymbolSet(&map->symbolset);
map->symbolset.fontset = &(map->fontset);
map->symbolset.map = map;

initLegend(&map->legend);
initScalebar(&map->scalebar);
Expand Down
6 changes: 5 additions & 1 deletion maplegend.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *theclass,
offset = 1;
/* To set the offset, we only check the size/width parameter of the first style */
if (theclass->numstyles > 0) {
offset = (theclass->styles[0]->size != -1) ? theclass->styles[0]->size/2 : theclass->styles[0]->width/2;
if (theclass->styles[0]->symbol > 0 && theclass->styles[0]->symbol < map->symbolset.numsymbols &&
map->symbolset.symbol[theclass->styles[0]->symbol]->type != MS_SYMBOL_SIMPLE)
offset = theclass->styles[0]->size/2;
else
offset = theclass->styles[0]->width/2;
}
zigzag.line = (lineObj *)msSmallMalloc(sizeof(lineObj));
zigzag.numlines = 1;
Expand Down
2 changes: 2 additions & 0 deletions mapscript/mapscript.i
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
%ignore layerObj::extent;
#endif

%newobject msLoadMapFromString;

%{
#include "../../mapserver.h"
#include "../../maptemplate.h"
Expand Down

0 comments on commit 3b34b30

Please sign in to comment.