Search code examples
javaandroidnavigationblenderesri

Android - Is it possible to make a navigation on a .png?


I get a lat long from the backend and I want to use a PNG as a map, because this map is self made. So I want to transfer my lat long on this PNG and then draw at this position a point, but I couldn't figure it out how to do... I couldn't find it here in another question. Maybe it's so easy that no one ever asked this.

I am new to Android and new to stackoverflow :)

EDIT because of comment: The image is a self made map. It was made with ESRI cityengine and Blender. Then I made a birdseye-screenshot of the map and this screenshot I want to use as my map.

EDIT 2: @MarkusKauppinen made a good comment! So I also want to convert the lat/long to x/y coordinates of the screen (like (How do android screen coordinates work?) ). But the lat/long of my backend don't relate to the lat/long of the Earth.


Solution

  • Even thought that this question has a downvote and probably no one will ever see it, I could figure it out how to solve my problem. I used this Canvas Bitmap Method to draw the map on my screen. Then I converted the lat/long coordinates so that they fit on the Screen of the mobile phone with the help of this post: How do android screen coordinates work? With the converted lat/long coordinates then I could draw a circle on the current position on the map. Now when the coordinates change the circle is moving like it should.