I am working on google maps and location listener. I am drawing the polyline on the map with my movement using location listener. Now i want the starting point and the current position on the polyline. I am setting the customized icon as a marker but it appears on the left side of the polyline. I want it exact in the center and the ending point of the polyline. Any Solutions,,??
In this case, you can set the marker anchor. mMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f).position(latLngArrayList.get(0)).icon(startPointIcon).title("Start"));
Check this :
http://android-er.blogspot.in/2013/01/google-maps-android-api-v2-example_5213.html
hope it will help you.
According to Marker , your maker is not designed properly, you should design marker in must a way that i comes over the point..
Instead of using your image use marker provided by google which would solve your problem....Or else if you want custom marker with a pointy end...
Issue with polyline draws for outdoor latlngs and your markers latlngs are for indoor position. Change your maker positions with outdoor street positions and it will work.
© 2022 - 2024 — McMap. All rights reserved.