R RichardN Well-Known Member Licensed User Longtime User May 8, 2025 #1 I am giving some thought to a mapping problem that has been put to me. I have a graphic designer produced map that was based on a Google satellite view but now has many additional graphic elements such that nothing now remains of the original image. The area is about 5km east/west and about 3km north/south and fortunately aligned to true north. The Lat/Long coordinates of the map corners are known. The map is quite a detailed .jpg with the need to zoom-in on areas to view the full detail. The graphic is consequently quite large but I tested it with ZoomImageView and the user experience is very good. I would like to depict the user's current Lat/Long position from FusedLocationProvider on the map but there seem to be several ways of attacking the problem. Is there a ready-cooked map-tile view that might suit the purpose or am I obliged to design and animate an overlay position cursor myself? Has anybody any experience of a similar project?
I am giving some thought to a mapping problem that has been put to me. I have a graphic designer produced map that was based on a Google satellite view but now has many additional graphic elements such that nothing now remains of the original image. The area is about 5km east/west and about 3km north/south and fortunately aligned to true north. The Lat/Long coordinates of the map corners are known. The map is quite a detailed .jpg with the need to zoom-in on areas to view the full detail. The graphic is consequently quite large but I tested it with ZoomImageView and the user experience is very good. I would like to depict the user's current Lat/Long position from FusedLocationProvider on the map but there seem to be several ways of attacking the problem. Is there a ready-cooked map-tile view that might suit the purpose or am I obliged to design and animate an overlay position cursor myself? Has anybody any experience of a similar project?
drgottjr Expert Licensed User Longtime User May 8, 2025 #2 as long as the coordinates of the map corners are known, there are many references to the formulas used to converted those coordinates to given x,y positions on the map. from there you can place a marker of your choice/design. that's how it's done. just google this "gps coordinates to pixels". Upvote 0
as long as the coordinates of the map corners are known, there are many references to the formulas used to converted those coordinates to given x,y positions on the map. from there you can place a marker of your choice/design. that's how it's done. just google this "gps coordinates to pixels".
K kgf Member Licensed User Longtime User May 9, 2025 #3 You could add the jpg as a Ground overlay on Google Maps, need to use Google Maps Extras Upvote 0
R RichardN Well-Known Member Licensed User Longtime User May 10, 2025 #4 @kgf Do you mean add a transparent background overlay? That would need a .PNG file as you can't do that with a .JPG ? Upvote 0
@kgf Do you mean add a transparent background overlay? That would need a .PNG file as you can't do that with a .JPG ?
TILogistic Expert Licensed User Longtime User May 10, 2025 #5 other options: B4J offline map app (jpg/jgw) I can not find the offline map app for B4J, therefore I make a little code for it. The code is not perfect but it is at least the beginning. Thank you "Erel", "oparra" and "emexes" for your advices here... www.b4x.com ScaleImageView - jpg_jgw and vector maps Fascinated with ScaleImageView I have to made this little code (w_map.zip). ScaleImageView library was created by "agraham" and link is here: https://www.b4x.com/android/forum/threads/scaleimageview-pan-and-zoom-large-images.102190/ The code is not perfect but you can see how to use... www.b4x.com search in forums Upvote 0
other options: B4J offline map app (jpg/jgw) I can not find the offline map app for B4J, therefore I make a little code for it. The code is not perfect but it is at least the beginning. Thank you "Erel", "oparra" and "emexes" for your advices here... www.b4x.com ScaleImageView - jpg_jgw and vector maps Fascinated with ScaleImageView I have to made this little code (w_map.zip). ScaleImageView library was created by "agraham" and link is here: https://www.b4x.com/android/forum/threads/scaleimageview-pan-and-zoom-large-images.102190/ The code is not perfect but you can see how to use... www.b4x.com search in forums
K kgf Member Licensed User Longtime User May 11, 2025 #6 With Google maps extras you can add a jpg as an foreground overlay, non transparent. Upvote 0
E emexes Expert Licensed User Longtime User Sep 25, 2025 #7 RichardN said: 5km east/west and about 3km north/south Click to expand... I am late to the party, but in case somebody else is following in your footsteps and reading this thread: over these relatively short distances, and particularly if the map is aligned to north, then linear (arithmetic, not trigonometric) calculations should get you to within a metre no problem Upvote 0
RichardN said: 5km east/west and about 3km north/south Click to expand... I am late to the party, but in case somebody else is following in your footsteps and reading this thread: over these relatively short distances, and particularly if the map is aligned to north, then linear (arithmetic, not trigonometric) calculations should get you to within a metre no problem