<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Berend,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>One thing that can could possibly cause this is if
your original map-extent does not have exactly the same aspect ratio as your
mapsize (different shape). When your application first starts up, it might take
your map-extent from your base settings. If, for example, your map image is
square, but your extents rectangular, it can mess up the calculations. Chameleon
will assume the bounding coordinates are as specified by you, whereas your
mapimage will resort to the nearest extent that fits (and thus the actual
mapextent and scale displayed are not the same as the extent and scale
variables). That is why I always use a default map-extent with bounding
coordinates I got out off chameleon itself.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Jacob</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: <A
href="mailto:chameleon-bounces@lists.maptools.org">chameleon-bounces@lists.maptools.org</A>
[mailto:chameleon-bounces@lists.maptools.org] On Behalf Of Berend
Veldkamp<BR>Sent: 23 September 2004 16:37<BR>To: <A
href="mailto:chameleon@lists.maptools.org">chameleon@lists.maptools.org</A><BR>Subject:
Re: [Chameleon] Problem with Scale widget</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>I'm using 1.99 as well. Most of the time it calculates the exact scale,
<BR>only at one particular mapsize there's a deviation.</DIV>
<DIV> </DIV>
<DIV>Berend</DIV>
<DIV> </DIV>
<DIV>Jacob Delfos wrote:</DIV>
<DIV> </DIV>
<DIV>> Berend,<BR>> <BR>> Which version of chameleon are you
using? I'm using my own scaletool <BR>> with a javascript calculation based
on the current mapextents, and the <BR>> printsize. It then zooms to the
newly calculated map-extents. <BR>> For latlong, I take into consideration
the longitude. I use the same <BR>> calculation in CWC 1.0.4 as I do in
chameleon 1.99, but only in version <BR>> 1.99 I managed to get to the same
scale as the user enters. E.g. in CWC <BR>> 1.0.4, my calculated extent
resulted in a scale slightly different from <BR>> what was 'predicted'
(1:100005, in stead of 1:100000). I thought this <BR>> was due to a ronding
error).<BR>> <BR>> But in chameleon 1.99, I always get the right
scale, even if it is <BR>> recalculating from 1:500 to 1:5000000. I use the
same calculation, but <BR>> for some reason the mapextents can be set more
precisely in 1.99. <BR>> Whatever has changed in chameleon 1.99 worked well
for me, but did not <BR>> find its way into the normal scale
widget.<BR>> <BR>> Paul, where can I see the calculation for the
scale widget? Do I need to <BR>> check the mapserver source code for
this?<BR>> <BR>> regards,<BR>> <BR>> Jacob<BR>>
<BR>> <BR>> <BR>-- <BR>____________________________</DIV>
<DIV> </DIV>
<DIV>Berend Veldkamp - ARIS<BR><A
href="http://www.aris.nl/">http://www.aris.nl/</A><BR>____________________________<BR>_______________________________________________<BR>Chameleon
mailing list<BR><A
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR><A
href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</A><BR></FONT></DIV></BODY></HTML>