gvsig mobile_gps recenter

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gvsig mobile_gps recenter

oceangis
Hello
    the code at line 159 in MapCursorSupport.java :

                if (gpsManager.isRecenter())
                if (Math.abs(screen_x - centerX)>20)
                    if (Math.abs(screen_y - centerY)>30)
                        theMapControl.recenter(screen_x,screen_y);


    This will recenter current map view while travelling with gps. if it satisfies these two comdition:Math.abs(screen_x - centerX)>20 and Math.abs(screen_y - centerY)>30, the GPS cursor may reach to right or left screen border when Math.abs(screen_y - centerY)<30.

--------------------------------------
Xia Tao
China


_______________________________________________
gvSIG-desktop-devel mailing list
[hidden email]
https://lists.forge.osor.eu/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

Re: gvsig mobile_gps recenter

Juan Lucas Domínguez
Hello,
you are right, that condition is wrong. It should be OR instead of AND. Also, 20 and 30 are too low I think.
 
I would use something like this:
 
====================================
int w = 2 * theMapControl.getWidth() / 5;
int h = 2 * theMapControl.getHeight() / 5;
if (gpsManager.isRecenter()) {
  if ((Math.abs(screen_x - centerX)>w) || (Math.abs(screen_y - centerY)>h)) {
    theMapControl.recenter(screen_x,screen_y);
  }
}
====================================
 
(2/5 is 80% of the "radius" of the map)
 
 
Regards,
Juan Lucas Domínguez Rubio
---
Prodevelop SL, Valencia (España)
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
http://www.prodevelop.es
---


De: [hidden email] en nombre de tao xia
Enviado el: mié 08/06/2011 8:45
Para: [hidden email]
Asunto: [gvSIG-devel] gvsig mobile_gps recenter

Hello
    the code at line 159 in MapCursorSupport.java :

                if (gpsManager.isRecenter())
                if (Math.abs(screen_x - centerX)>20)
                    if (Math.abs(screen_y - centerY)>30)
                        theMapControl.recenter(screen_x,screen_y);


    This will recenter current map view while travelling with gps. if it satisfies these two comdition:Math.abs(screen_x - centerX)>20 and Math.abs(screen_y - centerY)>30, the GPS cursor may reach to right or left screen border when Math.abs(screen_y - centerY)<30.

--------------------------------------
Xia Tao
China


_______________________________________________
gvSIG-desktop-devel mailing list
[hidden email]
https://lists.forge.osor.eu/listinfo/gvsig-desktop-devel
Reply | Threaded
Open this post in threaded view
|

[gvSIG Mobile 0.3] Differences between PhoneME and J9

Stefano Orlando
Hello, I have noticed various differences between PhoneME and J9 concerning
the stability of gvSIG Mobile. In particular, when dealing with raster
layers (ex. GIFs) and zooming in/out/extent, phoneME often crashes while J9
remains stable. Is it a mine issue or is a known problem?
Thanks, Stefano.

_______________________________________________
gvSIG-desktop-devel mailing list
[hidden email]
https://lists.forge.osor.eu/listinfo/gvsig-desktop-devel