[Chameleon] Problems using PrintProduction

marco mrc78a at yahoo.it
Thu Mar 30 18:16:30 EST 2006


Hi 
I partially solved the problems described in previous post "problems printing map"
reading 

      http://lists.maptools.org/pipermail/chameleon/2005-February/001949.html


now when i try to have a 'printer friendly map' with jpeg as output type and legend checkbox checked  
i  receive this message

http://127.0.0.1/htdocs//widgets/PrintProduction/preview.php?sid=442c62907286f&selImageFormat=JPEG

else with Gif and png output type i receive

The image http://path/to/preview.php?sid=421e5811951d3&selImageFormat=PNG? 
 cannot be displayed, because it contains errors.

Reading at http://lists.maptools.org/pipermail/chameleon/2004-August/001130.html i find 
that this problem can be related with legend template but i use the legendtemplate.html
in .../chameleon/samples/htdocs and it seems be ok

any ideas?

My simple mapfile an legend template are

MAP

#
NAME DEMO
IMAGETYPE    PNG24
STATUS ON
SIZE 500 500
SYMBOLSET /home/marco/html/myapp/etc/symbols.sym
EXTENT -421247.45582216 3929005.638024 924100.58855384 5313228.97788 # italia
UNITS METERS
SHAPEPATH "../data"
IMAGECOLOR 255 255 255
FONTSET /home/marco/html/chamemap/etc/fonts.txt
TRANSPARENT FALSE


WEB
  #MINSCALE 2000000
  #MAXSCALE 50000000

  IMAGEPATH "/tmp/ms_tmp/" 
  IMAGEURL "http://localhost/ms_tmp/"
  METADATA
  END
END


REFERENCE
   IMAGE /home/marco/html/myapp/htdocs/images/ref.png
   EXTENT 396215.137823 4426805.807772 568590.639651 4595445.057167
   STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
  SIZE 150 150     
END


LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
  END
  STATUS ON
END


SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 0 0 0 
    SIZE SMALL
  END
  SIZE 150 5
  COLOR 255 255 255
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
  UNITS kilometers
  INTERVALS 5
  STATUS ON
END


QUERYMAP
  SIZE 500 500
  STATUS ON
  STYLE HILITE
  COLOR 255 0 0
END

PROJECTION
    "init=epsg:3065"
END


#-------------ITALIA---------------------------------
  LAYER 
    NAME         Italia_dem
      METADATA
    DESCRIPTION "Elevation/Bathymetry"

     END
    DATA         "/home/marco/html/myapp/data/it 24bitrgb.tif"
    STATUS       DEFAULT
    TYPE         RASTER
    OFFSITE      70 74 66 #167 151 152
   
    PROJECTION
      "init=epsg:3065"
    END
  END 
 
END 





[leg_layer_html order=ascending opt_flag=15]
  <tr bgcolor="#ffffff">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('[leg_layer_name]', true)"[if name=selected value=1] CHECKED[/if] ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="[leg_layer_name]"
    [if name=layer_status oper=eq  value=1]CHECKED[/if]
    [if name=layer_status oper=eq value=2]CHECKED[/if]></td>
    <td><img src="[leg_icon width=20 height=18]" width="20" height="20"</td>
    [if name=wms_name oper=isnull]
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[leg_layer_name]</span></a></td>
  </tr>
    [/if]
    [if name=wms_name oper=isset]
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[metadata name=WMS_TITLE]</span></a></td>
  </tr>
    [/if]
[/leg_layer_html]


		
___________________________________ 
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive 
http://it.messenger.yahoo.com


More information about the Chameleon mailing list