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

It's terrifying to think about it! How could a healthy young man suddenly die?

appendix: 1. At present, the success rate of emer...

Lithium is not only in batteries, but also in medicines...

Lithium is not only in batteries, but also in med...

Kaikeba 25th Data Analysis Salary Training Program Employment Class

Introduction to the resources of the 25th Data An...

Special: Mountains and rivers are wallpapers everywhere

All images in this article By 40 photographers Sh...

How to customize iOS camera in 30 minutes

Recently, the company's project used a camera...

Microsoft wants everyone to happily forget Windows 8

When Microsoft starts building the next generation...

Can correct kneeling method cure the disease caused by sitting out?

Recently, the editor has been complaining about b...

iOS 9 Learn more every day Day 1: Search API

Prior to iOS 9, Spotlight could only search for a...

999 yuan eight-core luxury version Shenzhou Lingya X50 full review

Shenzhou, which has always been known as a "...

Can you eat sweet potato vermicelli mixed with cassava flour?

Audit expert: Wang Kang Director of the National ...