[OpenLayers-Users] How to detect map changes
杨华杰
yhjhoo at gmail.com
Sat Apr 20 21:40:22 PDT 2013
I think if I use this method, it will still alert the user even there are
no changes made by the user.
Regards,
Hua Jie
On Wed, Apr 17, 2013 at 5:47 PM, Grégory COLLIN <gcollin at v3d.fr> wrote:
> Le Wed, 17 Apr 2013 05:49:15 +0200,
> 杨华杰 <yhjhoo at gmail.com> a écrit :
>
> > I want to alert my user if they close the window without save the
> > changes.
> >
> >
> > Is it possible to detect the changes? And how?
> >
> > Welcome any tips
> >
> > Regards,
> > Hua Jie
>
> Hi Hua,
>
> You can use the javascript event beforeunload to alert your user.
> I used mine, like this :
>
> $(window).bind('beforeunload',function(e){}
>
> Regards,
>
> Greg
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130421/2a08b395/attachment.html>
More information about the Users
mailing list