[FOSS-GPS] Tango/Foxtrot GPS - Plotting locations of multiple things

Ben McCarthy b.mccarthy at lancaster.ac.uk
Tue Apr 26 11:32:08 EDT 2011


Hi Guilheim,

Thanks for your response.

I don't have my code uploaded anywhere at the min, but it is essentially
just the TangoGPS code (certainly with regards to the graphical elements).
All I have done is adapt the "Friends" part to accept lat/lons from a socket
rather than from the "Friends" server.

This friends functionality behaves in the same way if you use it as it
currently stands in TangoGPS, i.e. it only updates the new location of a
friend if the map is physically dragged.

One example of a hacky way I tried to fix this was by trying to call the
on_drawingarea1_button_release_event function in callbacks.c that is run
when the map is dragged, whenever a new coordinate is received. However this
didn't work for me.

I assume it is possible to fix this problem, since dragging the map gives me
exactly the desired result I want... I just want to achieve that without any
user interaction being required.

Cheers,

Ben

> -----Original Message-----
> From: foss-gps-bounces at lists.osgeo.org [mailto:foss-gps-
> bounces at lists.osgeo.org] On Behalf Of Guilhem Bonnefille
> Sent: 26 April 2011 15:50
> To: Open Source GPS-related discussion and support
> Subject: Re: [FOSS-GPS] Tango/Foxtrot GPS - Plotting locations of
> multiple things
> 
> Hi,
> 
> 2011/4/26 Ben McCarthy <b.mccarthy at lancaster.ac.uk>:
> > I want to develop a mapping interface that can plot my own location
> plus the
> > location of others (where the location of others is transmitted
> directly
> > between one another, not via a central server).
> >
> >
> >
> > To do this I searched around and came across TangoGPS, I changed the
> > interface a bit and added the new functionality I required (by
> adapting the
> > "Friends" functionality, cutting out the Curl code and replacing it
> with
> > some socket code). After doing this, I came across an email thread
> that lead
> > me to find out about the problems that lead to the creation of
> FoxtrotGPS.
> >
> >
> >
> > I was looking around because I have hit a stumbling block. Whenever I
> update
> > the location of a different person it redraws the chosen icon in a
> new
> > location, but doesn't remove the existing icon from the previous
> location.
> > The icons representing the previous locations aren't removed unless
> the map
> > is physically dragged using a left mouse click. I need the new
> location of a
> > person to be updated and the previous location to be removed
> immediately as
> > soon as new coordinates are received via the respective socket. Using
> my
> > limited understanding of GTK+ I have not been able to achieve this
> after
> > trying for quite some time.
> >
> >
> >
> > So this has lead me to look around, and at the same time I have come
> across
> > osm-gps-map too, which looks potentially very useful for what I want
> to do.
> > I dl'd the source, compiled and ran the example... I then tried
> integrating
> > some of the osm-gps-map functionality into my own application, but
> ran into
> > problems during compilation. I have however seen some other emails
> > suggesting FoxtrotGPS may already have integrated with osm-gps-map in
> some
> > way, is that correct?
> >
> >
> >
> > ...So before continuing it seemed like a good time to take stock. For
> what I
> > want to achieve, I'm trying to determine whether I am best:
> >
> > 1) Sticking with what I have and trying to solve the icon redrawing
> problem.
> >
> > 2) Trying to invest some more time into integrating osm-gps-map into
> what I
> > have.
> >
> > 3) Throwing out my interface changes and migrating to FoxtrotGPS (in
> which
> > case I'd need to learn about how to work with the XML UI).
> >
> >
> >
> > I'd be really grateful if any of you guys could give me your opinion
> on any
> > of this.
> 
> It's quite hard to help you, particularly for (1), without more
> details. Do you have any code published somewhere?
> 
> For the matter you spotted, there is generally two options:
> - you use a sort of canvas API, where you only handle high level
> object, and graphics is done by the associated code;
> - you directly handle graphics, so you have to redraw from scratch
> each time an "object" moved on your map.
> 
> Hope that's help.
> --
> Guilhem BONNEFILLE
> -=- JID: guyou at im.apinc.org MSN: guilhem_bonnefille at hotmail.com
> -=- mailto:guilhem.bonnefille at gmail.com
> -=- http://nathguil.free.fr/
> _______________________________________________
> This message is sent to you from FOSS-GPS at lists.osgeo.org mailing list.
> Visit http://lists.osgeo.org/mailman/listinfo/foss-gps to manage your
> subscription
> For more information, check http://wiki.osgeo.org/wiki/FOSS-GPS



More information about the FOSS-GPS mailing list