move the pin to front when we click on pin in map please suggest any solution to do this
Best answer: Write your own Overlay to have this capability.
Possible answer: Play around with the order of the OverlayItems in your ItemizedOverlay. That may control which is "on top", but I am not completely certain. And, since that behavior is not documented, it might change in the future.
Related
Basically, my app will function a bit like Pokemon Go. I'm using mapsforge and offline maps. At the moment the app allows auto rotate(fine), tapping(fine) and map movement, like dragging or scrolling(not sure which event does that).
I just need the app to not allow dragging/scrolling of the map. Everything else should be allowed.
Any insight would help.
You can have a view on the top of your map.
That View can handle all touch events and do not give it to the map.
How do I disable a new pin being dropped when a user touches the map? This seems like this should be obvious, but I can't find it anywhere! Basically map comes up with my custom pins, user touches anywhere on the screen, a dummy pin appears and mine disappear.
You might want to change the draggable(boolean) function in markerOptions, you can set the draggable to be false.
For more information about a draggable market, you can visit this documentation.
I'm dumb. I got a little copy and paste happy and had that as part of a listener.
I am creating an Android application which uses GPS to show an user their current location.
I have this part of the application working and the location shows up on map view but I was wondering how do I go about adding a marker on the location? I understand it has something to do with creating an Overlay but am unsure how to go about doing this.
Also I wish for assistance in adding a zoom in/out control button.
Many thanks.
Check the following Link
http://blog.pocketjourney.com/2008/03/19/tutorial-2-mapview-google-map-hit-testing-for-display-of-popup-windows/
not only you can draw anything on the map you can animate the view as well. using this i implmented drop pin effect as that of IPhone in Android
Using Canvas and onDraw Method is tough but the best and core way to handle things.
Hope it helps :)
You can use this project to achieve that you want:
mapviewballoons
Hope this helps.
Is there a way to have the MapView not show my current location? I'm not *doing anything, as far as I can tell to provoke this behavior, and yet its displaying this flashing blue dot over my current location.
The app I'm writing doesn't want/need for the user to see their location, and the dot is just distracting, but I'm unable to see how I can turn it off.
Also, the cursor button on the lower right hand side seems to be a permanent feature.
Would love to get some guidance on disabling both of these.
so... it looks like MyLocationOverlay is the key here. If you never apply it, or call enableMyLocation() on it it won't display your location (I guess that should have been obvious)... Still haven't figured out how to get rid of the button in the lower right.
In the android developer's webpage there's an example on how to show an alert dialog when the user taps on an item in the map.
What I want to do is show the default bubble the maps App shows when you tap on a POI.
Is there a way to do this? Am I missing something here?
Here is a nice solution for a balloon-like popup for Google Map markers:
https://github.com/jgilfelt/android-mapviewballoons
Nope. You'll have to roll your own views with background ninepatches (or just use a decent looking default system one, like the Toast background drawable), and add a TextView (or whatever View you want) with that background to an overlay. It's a little silly that there's nothing built in for that since the "bubble with a bit of text" is a very common developer need, but it's actually really not that much work.