Skip to content Skip to sidebar Skip to footer

Android - Google Maps Extensions - Illegalargumentexception

I'm getting an IllegalArgumentException when I call this createMarker() method: private void createMarker(GoogleMap map, MarkerOptions options, OnMarkerCreateListener listener) {

Solution 1:

Caused by: java.lang.IllegalArgumentException:nopositioninmarkeroptions

Apparently, your MarkerOptions does not have a position. Please call position() to supply the position in which to place the marker.

Solution 2:

It worked for me,

MarkerOptionsmMarkerOptions=newMarkerOptions();
mMarkerOptions.position(newLatLng(lat, lang));
mMarkerOptions.anchor(0.5f, 0.5f);

Post a Comment for "Android - Google Maps Extensions - Illegalargumentexception"