GPolyline overlay in android MapView

I have a working mapview application in which I can hit a service and show GPoints on the map as overlay.

What I want to do next is show an encoded Gpolyline as an overlay on my mapView. When I try to instantiate a GPolyline polyline object in my main activity, eclipse doesn't recognize the class. Is there a library import I am missing?

A quick example of adding a GPolyline to the mapView in an android application would be a great help.

Asked by: Fiona934 | Posted: 25-01-2022

Answer 1

I think the problem you're having is that there aren't GPolyline's in Android's version of Google Maps, they're Javascript/AJAX specific. What you want to do is draw out the lines manually in an Overlay or OverlayItem. See this answer, for more details on specifically how to do this.

The Hello, MapView tutorial has a short example on drawing to an Overlay and the package docs should show you what's available in Android's version of Google Maps.

Answered by: Adrian893 | Posted: 26-02-2022

Similar questions

Still can't find your answer? Check out these communities...

Android Google Support | Android Community | Android Community (Facebook) | Android