My Map Navigation

My Map Navigation

Source code introduction

Based on Baidu LBS, realize the positioning and navigation of the map. There is HTTP SOAP communication client code. If you are interested, you can ask me for the server code. Tip: The positioning function is only effective on real devices.

Source code running screenshot

  1. protected   void onStart() {
  2. // TODO Auto-generated method stub  
  3. super .onStart();
  4. FunctionList.setOnItemClickListener( new OnItemClickListener() {
  5.   
  6. @Override  
  7. public   void onItemClick(AdapterView<!--?--> arg0, View arg1, int arg2, long arg3) {
  8. // TODO Auto-generated method stub  
  9. Class<!--?--> TargetClass = null ;
  10. switch (arg2) {
  11. case   0 :
  12. TargetClass = BaseMapDemo.class ;
  13. break ;
  14. case   1 :
  15. TargetClass = NaviDemo.class ;
  16. break ;
  17. case   2 :
  18. TargetClass = LocationActivity.class ;
  19. break ;
  20. case   3 :
  21. TargetClass = GeoFenceActivity.class ;
  22. break ;
  23. case   4 :
  24. TargetClass = NotifyActivity.class ;
  25. break ;
  26. case   5 :
  27. TargetClass = QuestActivity.class ;
  28. break ;
  29. /*
  30. case 6:
  31. TargetClass = Client.class;
  32. break;
  33. case 7:
  34. TargetClass = HttpConnect.class;
  35. break;
  36. */  
  37. default :
  38. break ;
  39. }
  40. if (TargetClass != null ){
  41. Intent intent = new Intent(MainActivity. this , TargetClass);
  42. startActivity(intent);
  43. }
  44. }
  45. });
  46. }
  47.   
  48. private List<string> getData(){
  49.            
  50. List<string> data = new ArrayList<string>();
  51. data.add( "basic map function" );
  52. data.add( "Basic navigation function" );
  53. data.add( "Basic positioning function" );
  54. data.add( "geofence function" );
  55. data.add( "Location message reminder" );
  56. data.add( "FAQ Description" );
  57. //data.add("SOCKET client");  
  58. //data.add("HTTP client");  
  59.            
  60. return data;
  61. }</string></string></string>

Source code link: http://download..com/data/1968330

<<:  The movie "The Interview" is now available on Apple's iTunes store

>>:  Come and join 51CTO's offline open class: guide you to build high-quality mobile apps and win iPad mini and other prizes!

Recommend

Xiaohongshu operation skills and strategies for rapid fan growth

Any company with sufficient budget wants to creat...

The era of enemies is over! WeChat can now directly access Taobao

[[437761]] Whenever friends share good things fro...

How to spend less money and do the most effective advertising?

How to spend less money? When we talked about bra...

Intel 100 series motherboard review: a new round of arms race?

The new Skylake platform was officially launched ...

Why does foaming hand sanitizer produce foam with just one press?

In our daily life, laundry detergent, shower gel,...

Masters' Battle: Sima Yi's Four Survival Philosophies

Zhang Jinyang—— One of the top ten female lecture...

Case analysis of information flow advertising in the clothing franchise industry

This is an era of excellence, and with the help o...