cormacmchale / ProfPractice

An ionic App
0 stars 0 forks source link

PolyLines and Map Markers #10

Closed cormacmchale closed 5 years ago

cormacmchale commented 5 years ago

This will document how we used the Markers and polylines provided by the google maps API to represent Journies

cormacmchale commented 5 years ago

As we were trying to decide how to display A journey to the user on the app we discovered through the research of the google maps API that we could add markers to the maps as start points and end points and the add a polyline in between these markers to symbolize a Journey

cormacmchale commented 5 years ago

The implementation of this meant that we could now distinguish Journey from each other when the were close together. polyline

cormacmchale commented 5 years ago

In the Source code you can see what's happening. The addPolyline() function can take an array of points. After you paint the markers onto the map for a Journey then you add the positions of these markers into the array inside this function and a line is drawn between the two points. All this together represents a Journey for the User. polyline