[Cartoweb-dev] patch: get the current scale

Alexandre Saunier alexandre.saunier at camptocamp.com
Wed Aug 1 06:42:04 EDT 2007


Hello,

thanks for you patch.

Note however there is already such a method in ClientLocation. Its name 
is getCurrentScale() and it's public as well.

Alexandre

Frederic Backwrote:
> Hello,
> 
> my plugin needs to know the current scale. I patched the location
> plugin to include a method that returns it.
> 
> CVS Patch against HEAD is appended.
> 
> Cheers!
> Fred
> 
> 
> ------------------------------------------------------------------------
> 
> cvs diff: Diffing .
> Index: ClientLocation.php
> ===================================================================
> RCS file: /var/lib/cvs/public/cartoweb3/coreplugins/location/client/ClientLocation.php,v
> retrieving revision 1.80
> diff -r1.80 ClientLocation.php
> 599c599
> <
> ---
> 
> 847a848,855
> 
>>    /**
>>     * Returns current scale
>>     * @return float
>>     */
>>    public function getScale() {
>>        return $this->locationResult->scale;
>>    }


More information about the Cartoweb-dev mailing list