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
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 -
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 :)
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.
Related
I'm looking for the best way(s) of getting the position of a point I touched on an image and get it's coordinates relative to the image size.
For example, I get, as the parent image, the map of a building floor. And the user need to be able to zoom in and point on the map a point that will be registered in a database in order to be retreived later.
I never really had to work with images and canvases on Android so I'm a bit confused. What might be the best approach. I already found a lot of document but couldn't find one that would fit the idea I need to develop.
Thanks in advance for you help,
Matthieu
I'm looking for tips or a lib that can help me with this challenge: I need to build a widget that is similar to a Map View. I mean, I have a huge image that will be used as background and a list of coordinates that should be used as pins over the image.
I need to achieve an experience similar to a Map View (pan, zoom and pinch gestures) and treat pin clicks. Once placed over the image, a pin should note move its position considering the background image.
The problem is not really new, but I couldn't solve it yet. I've tried a WebView with some html but the image is rendered really blurry.
Any tip? Any Github project? I've googled a lot and found no answer.
I am working on a project which allows a User to place and name a point on a map. The problem is that after the point has been placed, if the user zooms out, the point moves with the map. I have a couple of screenshots to illustrate the problem.
1: After point has been placed
2: Zoomed out
Any help is appreciated !
You haven't set the appropriate anchor for your custom icon (probably should be the point of the pin).
Seems just to be that icon, tried another and it works fine.
I want to move an image within a circle with my touch on move. I've been confused how to determine the coordinates circle boundaries when the finger moved.
For example I want to move this image like lock screen on android tabs.
http://cdn.alltouchtablet.com/wp-content/uploads/2012/03/samsung-galaxy-tab-7-plus-lock-screen.jpg
EDIT :
Now After learn the answer below, I managed to draw an circle image and moving this image around the screen.
And now, I want to restrict the image movement so that it only can moved in a circle, just like in the image above. Any ideas?
I hope you can help me. Thank you!
so I've actually not done anything like this but i know this tutorial : and the guy does something similar to what you want,
this video is one right in the middle of an entire playlist of tutorial videos if you dont get what he's doing check the previous few... as for moving the image in a circle i'm sure there'll be some way to set boundries :)
http://www.youtube.com/watch?v=9d4Wua-cxZs&list=PLB03EA9545DD188C3&index=32&feature=plpp_video
hope it was helpful!
I am having an app which tracks the Geopoints of the user. I simply fetch these points and use them to draw the path on Map View.
My issue is, when I see the path tracked by user, the path seems to be correctly plotted but, when I have a first look over the map,it does not show me an entire zoomed out view of the map where I can see all the track path. Instead the map begins with from where I started tracking and then I need to scroll all my way to see the further tracks.
Please Help. :)
Thanks In Advance.
Use MapController.zoomToSpan(...), you can get the span from your ItemizedOverlay methods getLatSpan(int) and getLonSpan(int). zoomToSpan(...) is a best effort method and does not guarantee that all points will be visible.