A
A
Andrey2020-05-05 15:12:09
Java
Andrey, 2020-05-05 15:12:09

How to forbid putting a label for Poligon (Polyline)?

For example, there is a Polyline on google maps

, I get it like this:

ArrayList<LatLng> polygonList = new ArrayList<>();
        polygonList.add(new LatLng(54.28934432242706,25.43568233491581));
        polygonList.add(new LatLng(54.287027192101235,25.416542091385537));
        polygonList.add(new LatLng(54.26867342130368,25.336977043167764));
        polygonList.add(new LatLng(54.27045277942797, 25.216299095169717));

        PolylineOptions poliopt = new PolylineOptions().width(5).color(Color.BLACK).geodesic(true);
        for(int i = 0; i < polygonList.size(); i++)
        {
            LatLng points = polygonList.get(i);
            poliopt.add(points);
            mMap.addPolyline(poliopt);
            }


how to forbid to put a marker outside of Polyline? and within it...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Yudakov, 2020-05-06
@AlexanderYudakov

Check whether a point is in a polygon:
PolyUtil.containsLocation()
Connect Maps SDK:
https://developers.google.com/maps/documentation/a...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question