MapView.setPolyline - only one polyline visible

Former Member
Former Member
Will it be possible to add more than one polyline to MapView?

According to API :

setPolyline(polyline)
Add MapPolyline object to be rendered on the map.

but in reality it allows to SET, not ADD - will it stay like that? According to the name - it is likely, but would be good to clarify.
Or course I'd love to have possibility to add more than one polyline :)

What I tried:
var p1 = new Ui.MapPolyline();
p1.addLocation(...
p1.addLocation(...
MapView.setPolyline(p1);

var p2 = new Ui.MapPolyline();
p2.addLocation(..
p2.addLocation(...
MapView.setPolyline(p2);

and only p2 is visible
  • Former Member
    Former Member over 6 years ago
    MapViews currently only support 1 polyline. Supporting multiple polylines is not currently planned.
  • Supporting multiple polylines is not currently planned.


    Can we request multiple polyline support? You really can't do any kind of course implementation without it (or you chose between course and your track). Also, I have apps that use the Tracker Ant+ profile to connect to the Garmin Alpha/Astro which gives you dog locations as well as other Alpha locations. Being able to add the tracks for these other devices would be really useful.

    Without multiple polylines, it provides a pretty limited experience. I'd much rather see a limit of total number of points across multiple poly-lines (each with own color/width), rather than limiting it to a single polyline.

    Another option would be to have support for mapping a GPS coordinate onto the map display coordinate so we could easily draw our own alternate lines.

  • Another option would be to have support for mapping a GPS coordinate onto the map display coordinate so we could easily draw our own alternate lines.


    With MapMarker you can mark a spot based on coordinates, even if it's not currently on the screen. (and can with pan/zoom right away where things change).

    You can't draw a line to it from the current location, but you can see it on the map if it's in the map on the screen.
  • Former Member
    Former Member over 6 years ago
    Another option would be to have support for mapping a GPS coordinate onto the map display coordinate so we could easily draw our own alternate lines.



    fully agree, would be enough to have a way of mapping map coordinates to screen coordinates. Nothing more is required then...
  • With MapMarker you can mark a spot based on coordinates, even if it's not currently on the screen. (and can with pan/zoom right away where things change).

    You can't draw a line to it from the current location, but you can see it on the map if it's in the map on the screen.


    Yep, was aware of this. But this in no way deals with what I requested. Simple location would be very limited functionality compared to what I think would make a much better user experience. And this doesn't help in any way with courses.
  • I'll create a ticket requesting the ability to add multiple polylines. No guarantees, but at least it will be on the books for consideration.