Gets an array of gps, drawing on the map polilayn. Yet for some coordinates insert direction, but the icon is not always inserted as it should, there are "margins"
How can I insert an icon so that it was on the line polilayn?
void addTraclMarker(double locationA,double locationB, int drawable,
String carnames, String carspeeds)
{
Marker startMarker = new Marker(mapView);
startMarker.setPosition(new GeoPoint(locationA,locationB));
startMarker.setIcon(getResources().getDrawable(drawable));
startMarker.setTitle("jkdfghspdifj");
startMarker.setAnchor(Marker.ANCHOR_CENTER, 1.0f);
MarkerInfoWindow infoWindow = new MyInfoWindow(R.layout.bonuspack_bubble,
mapView,carnames,carspeeds,"","");
startMarker.setInfoWindow(infoWindow);
mapView.getOverlays().add(startMarker);
}
startMarker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_CENTER);
Look at Marker#setAnchor to understand how it works.