[OpenLayers-Users] Success! and one minor quirk :)

Eric Lemoine eric.lemoine at camptocamp.com
Wed Mar 17 17:17:15 EDT 2010


On Wed, Mar 17, 2010 at 6:30 AM, Stephen Woodbridge
<woodbri at 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.

> I thought maybe it was related to the select feature control,
> but formAction() does unselect the feature.

it calls onUnselect, shouldn't it call unselect instead?

Cheers,

-- 
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.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list