[Mapserver-users] Allother probles solved - still woking on the PIXEL_SIZE calculation

Silke Reimer silke at intevation.de
Sun Jan 12 23:59:13 PST 2003


--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


Hi Steve,

if you apply the following patch to the mapserver, you can get the
pixelsize  within your template with the tag [cellsize].

I hope that helps,
=09
	Silke

On Wed, Jan 08, 2003 at 01:18:51PM +0800, Steve McCrone wrote:
> Hi again,
>=20
> I guess you could call it the 'Reverse Murphy Law'. Once I mail my questi=
on/problem to the list, I still continue trouble shooting and, through sear=
ching previous questions and trial and error, come up with the solution. So=
, currently my project works with the rosa applet, which zooms, pans etc. I=
 can turn layers on & off using checkboxes, my map dos not zoom or pan duri=
ng the toggling on/off of layers. My buttons retain their state after map r=
edraws (i.e. submits). My next un-resolved issue is calculating the PIXEL_S=
IZE to used in the measurement calculation.  I'm really trying to avoid get=
ting involved in PHP an wish to achieve all my functionality strictly with =
mapserv and rosa - so far so good.
>=20
> So if anyone out their can shed some light on the PIXEL_SIZE issue that w=
ould be great.
>
> Steve

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/


--gKMricLos+KVdGMg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+InHR1W4oD4nfjasRAiDsAKDJa8aFj8EH8hEThhUHKvV6lGRJ7wCg4pzV
9zzWzdWTKu5MJT29oscdAX0=
=ZrqD
-----END PGP SIGNATURE-----

--gKMricLos+KVdGMg--



More information about the MapServer-users mailing list