I\'m having a little trouble understanding how to change the colour of a marker in an Android Google Map project.
My code for a Marker is:
googlemap.addM
The problem is the semicolon ";" on the end of the line
.setSnippet("and snippet");
If you delete the semicolon making it
.setSnippet("and snippet")
It should work.
You have a couple of characters wrong there. Compare your code to this:
googlemap.addMarker(new MarkerOptions()
.position(new LatLng( 65.07213,-2.109375))
.title("This is my title")
.snippet("and snippet")
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));
Removed )
on third line, changed setSnippet
to snippet
and removed ;
on forth line.
{
googleMap.addMarker(new MarkerOptions()
.position(new LatLng(19.01062463, 73.01141475))
.title("Point1").snippet("Speed=1.2")
.icon(bitmapDescriptorFromVector(context, R.drawable.ic_icon)));
}
googleMap.addMarker(new MarkerOptions()
.position(new LatLng(19.02369039, 73.00778391))
.title("Point2")
.snippet("Speed2=0.42").icon(bitmapDescriptorFromVector(context, R.drawable.ic_icon)));