[OpenLayers-Users] Browser back and forward button

Christian López Espínola penyaskito at gmail.com
Wed Jul 30 05:06:55 EDT 2008


Hi Matthew,

It isn't integrated with the browser, but a good start if you want to
implent this is the NavigationHistory control.
http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Control/NavigationHistory-js.html

Example here:

http://openlayers.org/dev/examples/navigation-history.html

I don't know if anyone has done what you want before.


On Wed, Jul 30, 2008 at 7:19 AM, Matthew Doyle <mtd at bom.gov.au> wrote:
>
> Hi OpenLayers Users,
>
> My client has a need to place control on the users browser back and forward
> buttons. Simply put, when he does any sort of action like zoom, pan, switch
> a layer on, etc. he always assumes that the back button will take him to the
> last state he was in within the mapping tool.  As such, he has now requested
> that this become a feature.
>
> a) is it possible to control this? The only way i can think of is each time
> a user initiates an action, that it is stored in the hashmap in the URL ...
> index.html?zoom=1&layers=xxx similar to a permalink that is updated after
> every action.
>
> b) is there any code that anybody has already written to do this?
>
> I have searched the lists and faq to no avail.
>
> Any help / comments on this greatly appreciated,
>
> Best Regards,
> Matt
>
> --
> View this message in context: http://www.nabble.com/Browser-back-and-forward-button-tp18726260p18726260.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Cheers,

Christian López Espínola <penyaskito>


More information about the Users mailing list