Y
Y
ywitodenasuby2019-09-17 12:50:09
Android
ywitodenasuby, 2019-09-17 12:50:09

How to draw a line on a canvas?

There is a LinearLayout and GPS coordinates of two points. I want to draw a line between them. How to do it? Need to convert GPS coordinates to canvas-a coordinates? But how to do it?
5d80ac6eb203d492479568.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Vodakov, 2019-09-17
@WaterSmith

Well, you need to start by saying that GPS coordinates are spherical coordinates, and first you need to determine how they will be displayed on your flat "map". I am afraid that the problem you have set for yourself is mathematically more difficult than you think.
I myself would use, for example, Google maps, it seems they have a mode in which the map itself is not drawn, or rather, you can replace it with your own map, which may well be a uniform dark gray field, as in your picture.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question