[Mapserver-users] Mapserver 4.2.0 Template Weirdness
Dirk Jesko
jesko at geocontent.de
Thu Jun 17 06:55:58 PDT 2004
Hi Marcus,
I might have an explanation. It seems to be a bug with the linux version.
The windows binaries work just fine.
I had the same problem with [layers] today. If &layers=layer1+layer2+layer3
is passed to mapserver, all layers are displayed, but only the last is
returned (layer3) to the [layers] variable in the template.
The reason seems to be the processLine function in maptemplate.c. The
snprintf function used to replace [layers] with the actual values does not
work the way it should (on linux systems). I replaced snprintf by strcat,
which works perfectly for me.
If you are familiar with C you can probably apply the fixes yourself and
rebuild mapserver. Otherwise, I can send you a modified maptemplate.c
tomorrow.
Regards,
Dirk Jesko
> -----Ursprüngliche Nachricht-----
> Von: mapserver-users-admin at lists.gis.umn.edu [mailto:mapserver-users-
> admin at lists.gis.umn.edu] Im Auftrag von Markus Spring
> Gesendet: Donnerstag, 17. Juni 2004 13:16
> An: mapserver-users at lists.gis.umn.edu
> Betreff: [Mapserver-users] Mapserver 4.2.0 Template Weirdness
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi list,
>
> checking the 4.2.0 CGI mapserver, a ran across a weird template problem
> regarding the [layer], [layer_esc] and [toggle_layers] variables.
>
> The output with the same querystring of
>
> &map=/home/springm/perl/Geo-
> UMNmapserver/t/maps/verwaltungsgrenzenflur/verwaltungsgrenzenflur.dfo.map
> &mode=browse
> &layer=l1
> &layer=l0
> &layer=bgl15
> &layer=bgl11
> &layer=bgl20
> &zoomdir=1
> &zoomsize=2
> &mapsize=400+300
> &scale=9700
> &mapxy=4465711.0965965+5341175.7092885
>
> (of cours all in one line) returns:
>
> <!-- MapServer version 4.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> SUPPORTS=FREETYPE INPUT=TIFF INPUT=JPEG INPUT=SHAPEFILE -->
>
> => layers: l1 l0 bgl15 bgl11 bgl20
> => toggle_layers: bgl99 bgl20 bgl11 bgl00 bgl00 bgl00 bgl00 l0 l1
> bgl98
> bgl15 bgl08 bgl08 bgl08 bgl08 bgl08 bgl08 MSSuser __embed__scalebar
> __embed__legend
>
> and
>
> <!-- MapServer version 4.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> SUPPORTS=FREETYPE INPUT=TIFF INPUT=JPEG INPUT=SHAPEFILE -->
>
> => layers: bgl20
> => toggle_layers: __embed__legend
>
> I have no explanation for this behavior.
>
> Kind regards
>
> Markus
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFA0X1wxxUzQSse11ARAqDWAJ4iZsjeAJP4m0EPfBqd3rHxpeOCoQCeJhow
> sauVCV97B3hVYFDCSgT2CaQ=
> =ILL4
> -----END PGP SIGNATURE-----
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list