[OpenLayers-Users] Re: Multi User edit on same Map

Greg Allensworth gregor at greeninfo.org
Thu Dec 22 14:31:15 EST 2011


On 12/22/2011 11:07 AM, razibu wrote:
> The part about the vehicle is already finished. It's moveable and
> editable in text and icon as well as you can create and delete them.

Great, then you're halfway there!

When you move or created or delete a vehicle, have a callback to do the 
AJAX part, to notify the server. You probably have that already, right, 
so your changes are saved?

If so, then on to the next part: setInterval() calling a function to 
fetch updates from the server. Like I said, layer.refresh() is the 
simplest and it should at least prove the concept: an edit on your map 
will appear on my map a moment later. But it's probably not as flexible 
as you want, and you'll want to instead write some AJAX code to fetch 
the features and update the appropriate ones.

-- 
Greg Allensworth, Web GIS Developer
BS  A+  Network+  Security+  Linux+  Server+
GreenInfo Network - Information and Mapping in the Public Interest
564 Market Street, Suite 510  San Francisco CA 94104
PH: 415-979-0343 x302  FX: 415-979-0371    email: gregor at greeninfo.org
Web: www.GreenInfo.org     www.MapsPortal.org

Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org


More information about the Users mailing list