Polygon Touch detection Google Map API V2

后端 未结 6 2105
小蘑菇
小蘑菇 2020-11-28 11:22

I\'m trying to figure out how best to do this, I have a map with one Polygon drawn on it. Since it doesn\'t seem as though the Google Maps API V2 has a touch de

6条回答
  •  无人及你
    2020-11-28 12:15

    The Google Maps Support library now has a static method that does this check for you:

    PolyUtil.containsLocation(LatLng point, Listpolygon, boolean geodesic);
    

    Although the docs don't mention it explicitly in the guide the method is there

    Maps Support Library docs

提交回复
热议问题