-1

For the life of me, I am unable to figure out how to use setData() for a Marker.

My code:

MarkerOptions markerOptions = new MarkerOptions().position(position).title(title).snippet(snippet);

Marker marker = map.addMarker(markerOptions);

marker.setData(data); // This doens't work, simply says cannot resolve.

I have the following in my build.gradle:

compile 'com.androidmapsextensions:android-maps-extensions:2.2.0'
compile 'com.google.android.gms:play-services-maps:7.8.0'
compile 'com.google.android.gms:play-services-location:7.8.0'

How the heck do I use setData?!

Mr Pablo
  • 4,109
  • 8
  • 51
  • 104

1 Answers1

0

From Android Maps Extensions migration "guide":

When migrating to Extensions, all you have to change is:

  • a couple of import statements,
  • SupportMapFragment (or MapView) full class names in xml and
  • call getExtendedMap instead of getMap on SupportMapFragment (or MapView).
MaciejGórski
  • 22,187
  • 7
  • 70
  • 94