I've been trying to add a shape drawable as the marker icon for a marker I want to add on the map.
shape looks like this (res/drawable/blue_circle.xml):
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<size
android:width="15dp"
android:height="15dp" />
<solid
android:color="@color/Blue" />
</shape>
and I try to add the marker like this:
markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.blue_circle));
Apparently I get a NullPointer exception.
Must the marker icon be a bitmap? Am I allowed to add shapes drawables as marker icons? And if yes what am I doing wrong?