I'm using google maps with Flutter. I've got an issue I can't find a way to solve it, and maybe it's easier than I think.
When I start dragging a marker, the position of the marker rises, and I want it to stay in the same position.
I'm expect the marker to not rise, or 'elevate'.
Related
is it possible on here android sdk to force positioning marker to stop before calculating new route?
we tested this case which other navigations their marker stops then continue on new route but here positioning marker indepentently moving along a wrong path even the car turned to another street.
You are probably looking for this API. NavigationManager#setMapUpdateMode. It takes an enum MapUpdateMode. If you use POSITION or POSITION_ANIMATION it should do what you are suggesting.
This feature is called map matached navigation with extrapolation. The extrapolation is what is causing the marker to keep moving.
I am building an android app and I am trying to figure out a way to place custom markers in Google Streetview, something like hotspots that display images when clicked and move along with the camera so that they go off screen if necessary. I have no experience at all, so I would at least understand where to start studying.
Would it be possible with CSS position properties?
Edit: I am searching for a way to locate them in street view mode, not in map mode.
Marco! Work with markers is very simple. For drag-drop marker you should override methods onMarkerDragStart, onMarkerDrag, onMarkerDragEnd. All click on marker call infoWindow. So, you can set your InfoWindowAdapter to map and implement your code logical here.
For concurrent moving camera with marker (right me understand?). Unlike ios version of google map, you can catch only final position of your camera (analoge idleCameraPosition on ios). So, i think you have to move marker first, and after it set camera to marker position
The best way to understand simple things of android google map is https://developers.google.com/maps/documentation/android-api/signup
I'm developing an application that has the following goal:
Using the google maps android API 2 I get my current position, and as I start walking the application starts drawing the route I take
The twist is that the map is a "blind" map. Meaning the map is hidden, only the Marker of my current position and a dotted line of my route is shown.
Keep in mind I'm a novice developing to Android, so please be specific. (Thank you)
I managed to create the map, get my current position and zoom in to it (Had no sens to see the whole planet while i want only my current position). And it's pretty accurate so far.
The thing is I don't know what should I do from this point on.
Basicly I need a white View between the Marker and the real map. Also as I advance that View should always be on, over the MapFragment/MapView. Also I wish to keep the zoom and drag functionality's of the MapFragment.
How can I achieve this?
At this point I'm opened to any solutions.
(Been browsing for a few days now the developers site, I have seen that with the ViewOverlay class I can put messages over the map, but I'm not sure what would the correct aproach be in my case...)
To hide the whole map behind the white view I would use Polygon class Polygon Even if you specify Polygon to cover the whole map Markers will be still displayed in front of it and as so user's current position marker will be visible. You also will be able to zoom and drag.
To draw line on map use Polyline class Polyline It will draw users path as a polyline. If you want to stick with dotted line you can use Circle objects to create it. Circle
Some of the markers in google maps appear when zoomed in. However, when a user drag the map into a different place, the marker disappears, and when you drag it again on the previous place, the marker starts to animate in front of you (I hope you are getting what I'm trying to say). I want to know if there is such a way to do that. Thanks.
The same thing happens in Google Maps Android API v2 on street names, parks, etc.
There is no support for marker transparency as of this writing. You will have to code it yourself: posting to Handler until the animation finishes and setting new icon every "frame" with increasing opacity.
I'm implementing a feature in my app that allows user to manually locate themselves on a map. So I use a pin to represent their location and let user drag it to the place they currently are. The simple solution is to use setDraggable(true) on the marker, but this requires users to hold the marker for 3 or 5 seconds until it is draggable. I think this is quite confusing for many user to use the feature. So, what I want is to make the dragging more responsive by letting users drag them immediately without having to hold it for a while - like how Foursquare does!
What should I do to implement my own dragging feature? If you have any suggestions, please help me and thanks.
Check out the Hailo application. They have a neat workaround for this. It only works when you have one marker to drag.
The trick is to pan the map, instead of moving the marker. They just keep the marker in a view on top of the MapFragment (it's not actually a Marker on the map).
You can then use the map's cameraPosition.target as the location of your marker.