On Fri, Apr 9, 2010 at 5:05 AM, Stephen Woodbridge <wood...@swoodbridge.com> wrote: > Hi Eric, > > Sorry for the very long delay in getting back to this, but life happens > regardless of code :) Questions inline below ... > > Eric Lemoine wrote: >> >> On Wed, Mar 17, 2010 at 6:30 AM, Stephen Woodbridge >> <wood...@swoodbridge.com> wrote: >>> >>> Hi Eric and all, >>> >>> Thank you for your time and advice on this project, I think I finally >>> have almost everything working. There is still some clean up to do and a >>> few quirks that I'm not sure about. Oh and I need to add a user login so >>> different users edits are kept separate, but that is just some minor >>> coding at this point. Currently all edits are made to a test user table. >>> >>> >>> http://imaptools.com:8080/tilecache/test.html?zoom=17&lat=33.89595&lon=35.49935&layers=BT >>> >>> So the one major annoyance left which I'm not sure what the issue is, is >>> that, if I edit POI and say change its "type" or its "name" fields the >>> POI on the vector layer should be destroyed and the new feature added >>> back into the layer. This is in fact happening, BUT the display of the >>> feature is not getting updated! until I click on the POI again. >>> >>> For example: >>> >>> 1) click left most tool >>> 2) select the "TEST" (or any) POI near the center of the viewport >>> 3) change its type and/or its name >>> 4) click [Save] >>> 5) notice the POI has not changed >>> 6) click it once and it changes >>> 7) click it again and the popup opens >>> >>> the protocol callback function is at line 422 of test.html and seems to >>> be doing the right thing except updating the layer when the a feature is >>> updated. >> >> I think the callback function is not called at all. Have you tried to >> put a break point in this function? I think it's not called because >> the save strategy gives protocol.commit its own callback. Instead of >> setting "callback" in the protocol config, you should register >> listeners to the save strategy's "success" and "fail" events, and do >> the work there. > > You are correct the callback is not getting called. So if I understand you > suggestion correctly it would consist of doing something like this: > > Openlayers.Request.events.on({ > success: function(event){ ... do something here ... }, > failure: function(event){ ... report problem here ... } > });
Hi Stephen no, I'm saying you can register to the save strategy's "sucess" and "fail" events. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users