0

I have a program that draw a rout of user in the google map. I want to draw another rout with the data that I got from other sensors of smart phone. how can I do that? I think I should draw a line (for each step) from specific longlot with a defined length with a angle that I got from sensors(for example magnet).

but I don't know how I can determine LongLot of the end of the line?

jion
  • 127
  • 13

1 Answers1

0

For showing any route on the map you need to have coordinate data in form of Latitude and Longitude. Using sensor (magnetometer) the data that you will get are the bearings in between 0 and 360 which you cannot use in map to locate a point or even a polyline.

The best thing you can do with that set of data is to create a pointer on the map that would rotate as the user holding the device changes his directions.

Please refer to this example to know about the code implementation.

Community
  • 1
  • 1
AniV
  • 3,997
  • 1
  • 12
  • 17