[Cartoweb-users] Plugin search how-to configurepre-programmedscale for recenter

Oliver Christen oliver.christen at camptocamp.com
Wed Nov 14 09:26:13 EST 2007


well, it is certainly possible, but it will be noticable to the user as the 
recenter on id will induce a refrech of the map image (and possible other 
elements). You could intercept the refresh action but you would have to 
touch up several coreplugin ajax.js files (at least images and layers I 
think, maybe other too)

you also need to set some variable when the recenter occure so you know you 
have tp trigger a zoom action.
you can most certainly do that with a simple plugin implementing Ajaxable to 
detect the recenter in $_REQUEST and sent some flag via 
ajaxGetPluginResponse.

Something like that, maybe.

regard
Oliver



> Hi Oliver, thanks for the respond.
>
> I've look around and found another (perharps) way to achieve this goals.
>
> In fact, if we can do a
> CartoWeb.trigger('Location.Zoom', myscale);
> after recenter do it's job, it would be perfect.
>
> or having a little change in Location.Ajax and have a RecenterZoom action 
> ?
>
> I've try to chain the reaction, but as asynchronimous, the result is not 
> sure.
>
> Any opinion about this way of doing ...
>
>
> Oliver Christen wrote:
>> Hi
>>
>> this is not possible, by default you can only set one scale value.
>>
>> if you want to set more than one scale value, you will have to extend
>> the server part of coreplugin "location"
>> to add conditional recenterScale usage depending of the id's related 
>> layer.
>>
>> regards
>> Oliver
>>
>>> Hi All,
>>>
>>> I'm looking for a way to way different scales for differents layers
>>> when we recenter on id from a search (guided mode) result.
>>>
>>> I've read in doc for plugin search in function recenter
>>>
>>> /* do not use the recenter_scale parameter if you recenter on ids,
>>>        only use it with recenter on x,y.
>>>        you can set the recenter scale in location.ini on server side
>>> */
>>>
>>> But when I'm looking inside location.ini (and doc) I only fount the
>>> resultDefaultscale.
>>>
>>> How can I add differents scales for different layers ? What the
>>> keywords to use ?
>>>
>>> exemple : street should be show in 2500, house must be show in 500,
>>> default is 1000.
>>>
>>> Many thanks to guide me to a solution (even bad hack would be 
>>> appreciate)
>>>
>>>
>>>
>>> -- 
>>>
>>>     Bruno Friedmann  bruno at ioda-net.ch
>>>
>>> _______________________________________________
>>> Cartoweb-users mailing list
>>> Cartoweb-users at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>
>>
>
>
> -- 
>
>     Bruno Friedmann  bruno at ioda-net.ch
>
> Ioda-Net Sàrl   - www.ioda-net.ch
>  2830 Vellerat - Switzerland
>
>  Tél : ++41 32 435 7171
>  Fax : ++41 32 435 7172
>  gsm : ++41 78 802 6760
>
> C'est Facile et Cool d'Évoluer en ligne : www.cfcel.com
>
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list