I am creating user navigation application but,there is problem in change the user position. I have to create the path every time from origin to destination when user change the potion , but i don't want this. Actually i want output like Google navigation application as the person moving . Object is moving on the path.
Thanks in advance .
So it is better option that if on map whenever you have long press click on map then that current marker is disappear and new marker create at a position where you Touch on map??
Related
I found that the default event interface for markers are click and long click. So how to add custom double click event listener for marker?
But for that initially the double-click zoom feature for the map needs to be disabled. Not the whole zoom feature itself. I need to disable only the zoom that's invoked on double-click.How to code that?
To disable zoom feature ;
map:uiZoomGestures="false" inside your map xml tag
or
UiSettings.setZoomGesturesEnabled(false)
Read here too,
Currently you are launching your activity on single click of marker
using the onMarkerClick api. In it why dont you use a timer
mechanism, which will record the number of clicks. You can do it in
following steps
Record time on click & id of marker.
Whenever you get click event on marker. Check if ID is same as previous one and also the time between both events is less than some
threshold.
If yes, Launch your activity.
If No, clear the saved id to new one and record time as well.
how can handle double click on marker in android application
I am tracking my employees position on google map what I want to do is
to move the marker from its old position to a new position.
I am using this library for the cluster marker and the custom marker icons.
I want to move the marker from one position to another one, like other apps move their icons like any online cab application
Please help me, it's very important for me.
If you want to move the Marker along with the user interactions on the map something like few Cab Service do, you can refer the below link for the solution :
Map style like other Cab Service
I am doing a little project on Android with Google maps. And I have one question - it is possible to make marker draggable with single click on it, not after long press. For example: I click marker, it changes icon and I can drag it anywhere in map, and then after another tap he will not be draggable again and changes its icon back? (Marker must be draggable all the time from first tap to second even if you release it)
#user2595870:
Hello,
I know it should be in comment but due to less reputations i am suggesting you in answer.
You want to drag and drop facility for marker kind of thing ?
if so there is good example provided here. Please check it.
I'm using Polaris map library in my android app.
https://github.com/cyrilmottier/Polaris
I've Google Map with some geo points. I'm reading them from database. I've added two buttons on the map activity - "next" and "previous" to navigate between points.
mc.animateTo(geopoints.get(arrayID));
"arrayID" is the id of the next geo point and "mc" is map controller.
It works great but I want to add one more feature.
I want annotation to be visible by default while moving between points. After click on the "next" button I want to be moved to the next point on my map and it's annotation should be visible (not only after clicking on it).
Probably there is an easy way to do it.
I should probably do something with calloutView but I can't figure it out how to do that.
I made something like this. But it's not working properly.
MapCalloutView calloutView;
calloutView = new MapCalloutView(getApplicationContext());
calloutView.setDisclosureEnabled(true);
calloutView.setClickable(true); calloutView.setLeftAccessoryView(getLayoutInflater().inflate(R.layout.accessory, calloutView, false));
calloutView.show(mMapView, geopoints.get(arrayID), false);
calloutView.setData(annotations.get(arrayID));
It is showing me bubble but it creates new calloutView which is wrong I think. For example Polaris listeners are not working. I can't deselect callout etc...
My mistake! It was so easy...
I don't need to play with MapcalloutView in Polaris.
mMapView.setSelectedAnnotation(arrayID);
Recently I show the ubicabs taxi booking app. I found very nice functionality inside it. In this app they have google maps for showing markers, but they have used very good UI component for that. Also I found one more uniqueness is that whenever user moves or change the position of marker through touch it will fetch the current location. One thing that I know is that it is using the onTouchEvent of Overlay but how to create that marker balloon and how to get updated location on the basis of that marker.
I am attaching a preview of that marker here. Also would like to know that how can we scroll the text inside that balloon?
The best overlay open project I have found so far is this one, link. But it is nothing compared to the picture above. Would also like to know how they created this! Great Question and picture ;)