[Cartoweb-users] Re: [Cartoweb-dev] Size of map (image pluggin)

Oliver Christen oliver.christen at camptocamp.com
Wed Feb 14 10:15:25 EST 2007


the customMapsize was intended to be used through an url and not a hidden 
input

but you can add some simple javascript that will unset the mapSize value if 
a custom value is set. If the mapSize is not passed, the customMapsize will 
be used.+

regards
Oliver


> Ok, i saw in the ClientImage.php (image pluggin) where the customMapsize
> is used.
>
> In the handleMapSize function there's 2 tests :
>
>  if (!is_null($mapSize)) {
>
> and later
>
> if (!empty($customMapSize)) {
>
> but the second one is never reached because the first one exit the
> function (in the case we have a mapSize and a customMapsize defined)
>
> Maybe it should be better not to exit the function before testing if
> anyway there is a customMapSize parameter.
> This way, even a Mapsize object is defined, we can add a customMapsize,
> and this last one override the first.
>
> What do you think ?
>
> Sylvain Beorchia
> Makina Corpus.
>
>
>
>
> Sylvain Beorchia a écrit :
>> Yes i'm running the CVS version. So you mean i can manage the size of
>> the map just by adding a new hidden "customMapsize" in my form ?
>>
>> Pierre GIRAUD a écrit :
>>> Hello Sylvain,
>>>
>>> If you're running the CVS version, you should have a try with the new
>>> _REQUEST parameter "customMapsize".
>>>
>>> // customMapsize parameter is something like [width]x[height]
>>> // with [width] and [height] being integers.
>>>
>>> To use that, you might want to have a new hidden input in the cartoweb
>>> form which name is "customMapsize" and set its value with the size of
>>> the map container using javascript.
>>>
>>> HTH
>>>
>>> Regards
>>>
>>> Pierre GIRAUD
>>>
>>> Sylvain Beorchia wrote:
>>>> Hi Yves,
>>>>
>>>> yes, i've done that. But i'd like to be able to add some choices while
>>>> CW is running, or apply a size while CW is running. I want to make the
>>>> MAP fitting the browser dimensions.
>>>>
>>>> See what i mean ?
>>>>
>>>> Thanks.
>>>>
>>>> Sylvain B.
>>>> Makina Corpus
>>>>
>>>>
>>>>
>>>> Yves Jacolin a écrit :
>>>>
>>>>> Hello Sylvain,
>>>>>
>>>>> Juste create a image.ini in your client_conf/ with this kind of
>>>>> parameter/value :
>>>>> mapSizesDefault = 1
>>>>>
>>>>> mapSizes.0.label = small
>>>>> mapSizes.0.width = 230
>>>>> mapSizes.0.height = 169
>>>>>
>>>>> mapSizes.1.label = normal
>>>>> mapSizes.1.width = 400
>>>>> mapSizes.1.height = 300
>>>>>
>>>>> mapSizes.2.label = big
>>>>> mapSizes.2.width = 800
>>>>> mapSizes.2.height = 600
>>>>>
>>>>> More information here (in French) :
>>>>> http://cartoweb-community.gloobe.org/doku.php?id=fr:documentation:doc_officiel:version3.2#options_des_formats_d_image
>>>>>
>>>>>
>>>>> Y.
>>>>> Le Mercredi 14 Février 2007 14:24, Sylvain Beorchia a écrit :
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Is there a way in CW3 to change the size of map dynamicaly ?
>>>>>> I've tried to add with javascript some choices in the MapSize list, 
>>>>>> and
>>>>>> then choose the new choice, but it does not work, 'cause CW uses the
>>>>>> INI
>>>>>> file to pick up the sizes...i guess.
>>>>>>
>>>>>> Any help ?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Sylvain Beorchia
>>>>>> Makina Corpus
>>>>>> _______________________________________________
>>>>>> Cartoweb-dev mailing list
>>>>>> Cartoweb-dev at lists.maptools.org
>>>>>> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
>>>>>>
>>>> _______________________________________________
>>>> Cartoweb-dev mailing list
>>>> Cartoweb-dev at lists.maptools.org
>>>> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
>>>>
>>> _______________________________________________
>>> Cartoweb-dev mailing list
>>> Cartoweb-dev at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
>>
>> _______________________________________________
>> Cartoweb-dev mailing list
>> Cartoweb-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
>
> _______________________________________________
> Cartoweb-dev mailing list
> Cartoweb-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
> 



More information about the Cartoweb-users mailing list