[OpenLayers-Dev] PanZoomSlide control: panning with a slide

Brian Levy blevy at taic.net
Thu Nov 30 17:48:09 EST 2006


Duarte, 

One thing if I may suggest is to build the slide capability as a property of
the Map.  Thus allowing the slide enablement and effect to be set through
properties of the Map instead of the control.  In this case any standard or
custom control performing a map movement operation (pan, setCenter) can take
advantage of the slide effect when enabled.  Thanks for your contribution!

-Brian

-----Original Message-----
From: dev-bounces at openlayers.org [mailto:dev-bounces at openlayers.org] On
Behalf Of Duarte Carreira
Sent: Thursday, November 30, 2006 3:04 AM
To: Erik Uzureau
Cc: openlayers
Subject: Re: [OpenLayers-Dev] PanZoomSlide control: panning with a slide

Hi Erik.

Here is a link with a working example:
http://sigims.edia.pt/gmaps/final/openlayers_page.html

There is a function that determines how the slide is calculated - if
it's smoother, linear, exponential, etc. At this time it's a power
curve, so initially the movement is bigger and then slows down. This can
be changed by using other curves, as can be seen in moofx
(http://moofx.mad4milk.net/).

So if you don't like the way it slides you know it's easy to change.

Please feel free to get the PanZoomSlide.js file and consider it
contributed, if you can. I really just browsed the instructions to
contribute and I don't know when I'll get to it...

I also feel there are other "better" ways to do this. I would like best
to create a Util.Slider that can be used to slide anything. Just give it
the total displamecement, slide parameters, and a method of the object
that moves it (map.pan).
Like this, you could use it to slide controls in and out, like the
layerswitcher and overviewmap.

Finally, you should be aware that I perused an example of animation in
www.hesido.com. It seems free since he encourages others to use the
examples and that's just what I did.

Regards,
Duarte

-----Mensagem original-----
De: Erik Uzureau [mailto:euzuro at gmail.com] 
Enviada: quinta-feira, 30 de Novembro de 2006 9:46
Para: Duarte Carreira
Cc: openlayers
Assunto: Re: [OpenLayers-Dev] PanZoomSlide control: panning with a slide

Hi Duarte,

I guess the email I just sent a few moments ago was a little too late
--- sorry, but i am very behind on reading project email. We would
certainly be interested in seeing what you have come up with for this
slide control :-)

The easiest way to show us the feature is to send a link to running
code.

If that's not possible, then you can follow the standard procedure for
contributing code to the OL project [1]. Basically, make a ticket in the
OL TRAC and attach your file as a patch.

As it turns out, there is already a ticket opened for this problem, so
you can just attach your patch to ticket 110 [2]

To be able to include your patch in the code base, we would need you to
fill out a Contributors License Agreement, either individual or through
your company. The whole progress and all the links can be found on the
HowToContribute wiki[1] from the openlayers.org website.

Hope to see that patch!!
Erik

[1] http://trac.openlayers.org/wiki/HowToContribute
[2] http://trac.openlayers.org/ticket/110

On 11/30/06, Duarte Carreira <DCarreira at edia.pt> wrote:
>
>
>
>
> I would like to contribute with this control. It's a modified PanZoom 
> control that just pans sliding the map smoothly instead of in a single
step.
>
>  I called it PanZoomSlide.
>
>  To do the animation I used the example in www.hesido.com, and the 2 
> small original functions that I used remain with his identification in
the header.
>  He encourages others to use his examples but there is no mention of 
> license type. Anyway there are hundreds of variations of the same 
> simple slide effect. So if there's a problem (which I don't think 
> there is) it is always possible to use something else - even rico in a
manner similar to corner.js.
> Or even reinvent the wheel...
>
>  Anyway PanZoomSlide.js is only 6.84Kb. Original PanZoom.js is 4.5Kb.
>
>  To use:
>   - include PanZoomSlide.js after OpenLayers.js
>   - create a PanZoomSlide control just like you would a PanZoom:
>  map.addControl(new OpenLayers.Control.PanZoomSlide());
>
>  That's it.
>
>  I'm not sure if OpenLayer team finds this worthwhile. If it is tell 
> me how to send the file.
>
>  Regards,
>  Duarte
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
>
>
_______________________________________________
Dev mailing list
Dev at openlayers.org
http://openlayers.org/mailman/listinfo/dev




More information about the Dev mailing list