Android Google Maps v2 - Add object to marker

前端 未结 4 1215
说谎
说谎 2020-12-31 00:02

How can we add an object to a marker in the new Google Maps Android API v2? So if we click on the InfoWindow, we can do something with the obje

4条回答
  •  -上瘾入骨i
    2020-12-31 00:22

    Try android-maps-extensions its library where you can add object to mark by setdata method and retrieve data call method getData

    Read more

    Object getData() and setData(Object) on Marker, Circle, GroundOverlay, Polygon, Polyline or TileOverlay
    

    from Gradle You may use any version of Google Play Services

    dependencies {
        compile 'com.androidmapsextensions:android-maps-extensions:2.2.0'
        compile 'com.google.android.gms:play-services-maps:8.1.0'
    }
    

提交回复
热议问题