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"));
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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With