I am working on Google Map polygon marker, I have predefined lat/long array, and need to set polygon area, It is working fine for me, but when I drag the marker polygon line
I think you're using the tools you have a little inefficiently. My recommendation would be to store an array of markers, and use markerTag to store the index of your point, so in drawPolygon
for (int i = 0; i < coordinates.size(); i++) {
markers[i].setTag(i); //Associate a marker with a point
}
Then, when you move the marker, you would replace the co-ordinate at that point like so:
points[marker.getTag().toInt()] = marker.getTag().getPosition();
Sorry this is so vague. I use kotlin, so I've probably gotten some of the syntax wrong, too.