html legend classes; data encoding; (noted python mapsript +

karpi karpi.lists at EMAIL.CZ
Tue Oct 3 05:12:51 EDT 2006


django templating)
Reply-To: 

hello, Im spent some time with my first mapserver cgi web application.

here is its early version:
http://gismaster.liberix.cz/cgi-bin/mapserv?map=%2Fvar%2Fwww%2Flocalhost%2Fhtdocs%2Fnewmap%2Fczrep.map&imgext=330491.333543+5529453.205715+456794.204419+5632791.918249&zoomsize=2&layer=vodn%C3%AD_plochy&layer=vodn%C3%AD_toky&layer=m%C4%9Bsta_plochy&layer=obce_class&cellsize=229.641583&vyhledat=&mode=browse&mapsize=550+450&img.x=80&img.y=362

My biggist question at this point are:
1) can i hide legend items, of that classes, which are not rendered
(maxscale of class) as is done in common bitmap legend ??

my legend template is short:
  [leg_layer_html order_metadata=legend_order opt_flag=15]
  <input type=checkbox name=layer value=[leg_layer_name] [if name=layer_status oper=eq value=1] CHECKED [/if] [if name=layer_status oper=eq value=2] CHECKED DISABLED [/if] > [leg_layer_name] <br>
  [/leg_layer_html]

  [leg_class_html opt_flag=0]
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="[leg_icon width=30 height=20]" width=30 height=20> [leg_class_name] <br>
  [/leg_class_html]   


2) my data are saved in different encoding (iso-8859-2) then mapfile,
templates and all web is (utf8) This discrepancy caues errors as this:
http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2Flocalhost%2Fhtdocs%2Fnewmap%2Fczrep.map&imgext=441771.353638+5581229.641642+457559.212498+5594146.980709&zoomsize=2&layer=vodn%C3%AD_plochy&layer=vodn%C3%AD_toky&layer=m%C4%9Bsta_plochy&layer=obce_class&cellsize=28.705198&vyhledat=&mode=query&mapsize=550+450&img.x=282&img.y=231
(Jměno obce: Dobříš)

Can i force mapserver to respect different encoding in the data files?

Thanks for any kind of your replys




( Ive also try python mapscript + django templating solution, but when
i approached creating legends through layer.getClass(j).drawLegendIcon
rendering and serving of maps begun extremly cpu consuming and slow :(


-- 
karpi from
http://gismaster.liberix.cz



More information about the mapserver-users mailing list