[mapserver-users] Pixel size for distance tool in Rosa applet
Silke Reimer
silke@intevation.de
Tue, 8 Oct 2002 09:08:07 +0200
--dTy3Mrz/UPE2dbVg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hello,
since the pixel size is a relevant information for the distance tool in the
Rosa applet I adapted the MapServer code so that I could use the pixel size
with a [cellsize] tag. Therefor I just had to add 2 lines in maptemplate.c
and I thought that this could be useful to be integrated in the mapserver
code (at least for 3.7).=20
Greetings,
=09
Silke
Here is the patch:
---------------------
diff -ur mapserver-3.6.2.orig/maptemplate.c mapserver-3.6.2/maptemplate.c
--- mapserver-3.6.2.orig/maptemplate.c Mon Aug 12 08:48:30 2002
+++ mapserver-3.6.2/maptemplate.c Mon Aug 12 08:53:50 2002
@@ -1963,6 +1963,8 @@
=20
sprintf(repstr, "%f", msObj->Map->scale);
outstr =3D gsub(outstr, "[scale]", repstr);
+ sprintf(repstr, "%f", msObj->Map->cellsize);
+ outstr =3D gsub(outstr, "[cellsize]", repstr);
=20
sprintf(repstr, "%.1f %.1f", (msObj->Map->width-1)/2.0,
(msObj->Map->height-1)/2.0);
outstr =3D gsub(outstr, "[center]", repstr);
------------------------------------
--=20
Silke Reimer
Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/
--dTy3Mrz/UPE2dbVg
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9ooRX1W4oD4nfjasRAke9AKCMG2fvfaXyXZ2HAP2Us4jT1l6vLgCgpU8a
0dNqxKYR0+E2xy70R3Zjxqs=
=1wG+
-----END PGP SIGNATURE-----
--dTy3Mrz/UPE2dbVg--