-1

I have been trying to achieve this for a long time. But not being able to. So I did really need some help here with this.

Current method - refer the below image

enter image description here

like you see above, , marker image is an ImageView and is properly placed so that the tip of the marker is pointing to the center of the screen. And fetch a latlon I will be reading maps idle or move state and will use the below methods to get the latlons.

googleMap.getCameraPositionLatitude(); googleMap.getCameraPositionLongitude();

But, the real problem is with the below format which I want to achieve. because this would improve UI/UX as the view is placed in a place where user can view the location clearly to which he is pointing to clearly(of-course the bottom part of the screen would be filled up with suggestions or any further changes that I think of).

Please refer the below image -

enter image description here

Here I am stuck. i dont find any methods that provide me latlon from that portion of the screen. I really need help from you guys to solve this. i want to pull the location from where the tip of the view is pointing w.r.t the second image (above image). if I use googleMap.getCameraPositionLatitude(); googleMap.getCameraPositionLongitude(); Which is in appropriate as it will get me latlons from center of the screen.

kindly help me out with this !

Thanks in advance :)

Sidharth MA
  • 85
  • 13
  • why dont you use a draggable marker, and you center it on the center of the screen. then user can dragg the marker and get the lat/lng anywhere – betofarina Feb 06 '18 at 10:29

1 Answers1

0

You can use Map Padding for that. With .setPadding() method you can move map center to position what you need. Also take a look at this question of David.

Andrii Omelchenko
  • 13,183
  • 12
  • 43
  • 79