[Gvsig_english] gvSIG Mobile: GPS Alerts when reaching POIs
Javier Carrasco
jcarrasco at prodevelop.es
Wed Aug 27 16:49:26 CEST 2008
Hi Lukas,
Thank you for choosing gvSIG Mobile to develop with. This functionallity is already planned for a future version in the next year. Of course you can develop your own modifications of gvSIG Mobile and distribute it if you can`t wait.
The class MapControl is now getting the GPS position everytime it changes, please have a look at it.
If you want a class to receive this information too, this class has to implement GPSRelevantEventsListener interface and subscribe to the GPSEvents.
GPSManager gpsManager = GPSManager.getGPSManager();
gpsManager.addGPSRelevantEventsListener(this);
The method gpsNewPosition(double longitude, double latitude) will receive the new coordinates everytime position changes.
Please post more news about your project to this list,
Javi
-----Mensaje original-----
De: gvsig_internacional-bounces at runas.cap.gva.es en nombre de Carlos Sánchez Periñán
Enviado el: mié 27/08/2008 13:24
Para: Users and Developers mailing list
Asunto: RE: [Gvsig_english] gvSIG Mobile: GPS Alerts when reaching POIs
Hello Lukas,
I'm one of the gvSIG Mobile developers Team, we'll be glad to know more about your job. I'm sure that much more people into the gvSIG mail list want know more about it. If you want you also can get in touch directly with our team through me or jcarrasco at prodevelop.es .
We'll try help you as much as we can.
About your question...
You can get the coordinates from the GPS with the "es.uv.robotica.gvsig.mobile.gps.GPSManager.java" class.
You can do a new method into GPSManager named somehow like "getPosition()"
For instance:
public double[] getPosition(){
double[] aux = new double[2];
//Store latitude into aux position 0
//and longitude into aux position 1
aux[0]=currPosition.getLatitude();
aux[1]=currPosition.getLongitude();
return aux;
}
Then you can get the GPS position into MainWindow as follow:
...
double[] actualPosition = new double[2];
actualPosition = GPSManager.getGPSManager().getPosition();
...
That's it!
It's only one manner to do that. I hope it works to you.
Greetings.
Carlos Sánchez Periñán
Equipo desarrollo GIS
Prodevelop S.L.
Tel : 963510612
E-mail : csanchez at prodevelop.es
-----Mensaje original-----
De: gvsig_internacional-bounces at runas.cap.gva.es [mailto:gvsig_internacional-bounces at runas.cap.gva.es] En nombre de Lukas Bischof
Enviado el: miércoles, 27 de agosto de 2008 12:19
Para: gvsig_internacional at runas.cap.gva.es
Asunto: [Gvsig_english] gvSIG Mobile: GPS Alerts when reaching POIs
Hello everybody,
i am modifying currently the gvSIG Mobile to get ready for being used
by not that experienced people.
For this reason i have made a new file format and a additional
XML(plus XML schema). The modifications are fully documented and i
would like to post this modifications to an official, when i am
finished.
The main goal is to create a open source mobile hiking or city guide.
One planned feature is that the program generates a visual or a
acoustic alert, when the user has reached a point of interest. I am
stuck currently in the GPS functionality - can anybody tell me how i
can get the coordinates from the GPS into the Main Window?
Thanks in Advance,
Lukas
_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at runas.cap.gva.es
http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at runas.cap.gva.es
http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://runas.cap.gva.es/pipermail/gvsig_internacional/attachments/20080827/ee9cfcc8/attachment.htm
More information about the Gvsig_internacional
mailing list