Setting ID to google map API v2 marker to return image taken by camera intent

后端 未结 2 812
灰色年华
灰色年华 2021-01-15 23:54

Okay, This problem i have been facing for a couple of days now and can\'t seem to resolve.

This is how my map works:

  1. Tap on any point on map
2条回答
  •  悲&欢浪女
    2021-01-16 00:55

    Try with this..

    ( ref. How to remove marker from google map v2? )

    Previously I did told you..Just save marker to your own variables.. and there are a Index number for each and every marker..Hence Index number is provided by you and Google-Marker have itself ID... Google-Marker return ID with 'm1, m2 or m3...'.. so just replace get marker.getId and replace 'm'.. Now you can get marker this Id do match with your Index number.

    // Sample code to get marker id

        String mId = marker.getId();
        mId = mId.replace("m","");
        String clickMarker =  Integer.valueOf(mId);
    

    // hence 'i' is Google-Marker Id... and You have your marker Index value.. match with it. // sample code to get Click marker Id

               for(int k = 0; k

    // myMarkersHash defined also at ref. link

提交回复
热议问题