j2me GPS读取框架
jsr179读取卫星定位数据,可以设置读取间隔时间, 文件包括:使用说明文档,源码。 范例: GPSManager gps=new GPSManager(10); Thread GPSThread = new Thread(gps); GPSCanvas gpsreadListener =new GPSCanvas(); gps.setGPSReadListener(gpsreadListener) if(!gps.isRun()) { GPSThread.start(); } public GPSCanvas extends Canas implements GPSreadListener { double Lat=0.0; double Lng=0.0; protected void paint(Graphics g) { g.setColor(0); g.drawRect(0,0,getWidth(),getHeight()) g.setColor(255,255,255); g.drawString("Lat: "+Lat,5,5,0); g.drawString("Lng: "+Lng,5,25,0); } public void ReadPosition(double Lat, double Lng, float Alt){ this.Lat=Lat; this.Lng=Lng; repaint(); } public void GPSDevicesState(int stat){}; public void closeDevices(){ System.gc(); } }
文件列表
j2me gps读取框架.rar
(预估有个30文件)
j2me gps读取框架
src
location
GPSManager.java
4KB
GPSReadListener.java
385B
GPSListener.java
2KB
GPSLoncationProviderAdapter.java
823B
GPSdoc
resources
inherit.gif
57B
暂无评论