[Chameleon] Rounding scale value
Gambin Dejan
Dejan.Gambin at pula.hr
Tue Apr 4 03:26:12 EDT 2006
Hi Bart,
Can you tell me where the form variable (SCALE) is used in calculations
in JSAPI mode? If I can see it is used only in:
"goCWCJSAPI.oMap.oApplication.ZoomToScale({$this->mszHTMLForm}.SCALE.val
ue);"
If this is true, may I just
put:"goCWCJSAPI.oMap.oApplication.ZoomToScale(goCWCJSAPI.oMap.scale);"
instead of above and use something like:
"{$this->mszHTMLForm}.SCALE.value = Math.round(goCWCJSAPI.oMap.scale);"
for displaying the rounded scale?
regards, dejan
> -----Original Message-----
> From: Eijnden, B. van den (Bart)
> [mailto:b.vdeijnden at agi.rws.minvenw.nl]
> Sent: Tuesday, March 28, 2006 11:43 AM
> To: Gambin Dejan; chameleon at lists.maptools.org
> Subject: RE: [Chameleon] Rounding scale value
>
>
> Hi Dejan,
>
> I looked into the same problem a few months ago, but the
> problem with rounding seems that all the calculations with
> the scale will also lose precision, so you need to decouple
> display from the raw values somehow.
>
> If you find a solution, please update the following bug:
>
> http://bugzilla.maptools.org/show_bug.cgi?id=1031
>
> Best regards,
> Bart
>
> -----Oorspronkelijk bericht-----
> Van: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org]Namens Gambin Dejan
> Verzonden: dinsdag 28 maart 2006 10:36
> Aan: chameleon at lists.maptools.org
> Onderwerp: [Chameleon] Rounding scale value
>
>
> Hi,
>
> I am using Scale widget to display the scale. It is ok
> initially but sometimes I get non-rounded value shown in the
> inputbox (like xxx.yyy) after zooming. I am using JSAPI. Do I
> have to round it somewhere in
> "{$this->mszHTMLForm}.SCALE.value = goCWCJSAPI.oMap.scale;"?
> I suppose I have to convert it to number first and then use
> riund function (or work with scale value as string)...
>
> thanks
>
> dejan
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
>
> Disclaimer
> **************************************************************
> **********
> Aan dit bericht kunnen geen rechten worden ontleend. Dit
> bericht is uitsluitend bestemd voor de geadresseerde. Als u
> dit bericht per abuis hebt ontvangen, wordt u verzocht het te
> vernietigen en de afzender te
> informeren. Wij adviseren u om bij twijfel over de juistheid of de
> volledigheid van de mail contact met afzender op te nemen.
>
> This message shall not constitute any rights or obligations.
> This message is intended solely for the addressee. If you
> have received this message in error, please delete it and
> notify the sender immediately. When in doubt whether this
> message is correct or complete, please contact the sender.
> **************************************************************
> **********
>
>
More information about the Chameleon
mailing list