[start_latitude] => -37.927366951481 [start_longitude] => 144.63511453941 [end_latitude] => -37.920383736491 [end_longitude] => 144.65565430932
the actual latitude & longitude is encoded:
[polyline] => `unfFm`xqZuDyOq@cCm@cCaCuK{AeG}FyVaA}EoIw\oF}T
the encoded polyline also has to be checked for backslashes see $encodedPointsLiteral = str_replace('\\',"\\\\",$encodedPoints);
finally using google maps api var latlng_coords = google.maps.geometry.encoding.decodePath(js_polyline);
this is an example of what I have done, the altitude data is coming from google api and not the segment also extra latlng have been inserted to analyse the elevation
the segment
-37.926460 , 144.637800
-37.926210 , 144.638460
-37.925980 , 144.639120
-37.925330 , 144.641150
-37.924870 , 144.642460
-37.923600 , 144.646270
-37.923270 , 144.647380
-37.921590 , 144.652140
Array
(
[id] => 825967
[resource_state] => 3
[name] => Werribee Main Rd to Fed Trail Sprint
[activity_type] => Ride
[distance] => 1968.05
[average_grade] => 0.1
[maximum_grade] => 1
[elevation_high] => 3.6
[elevation_low] => 1.6
[start_latlng] => Array
(
[0] => -37.927366951481
[1] => 144.63511453941
)
[end_latlng] => Array
(
[0] => -37.920383736491
[1] => 144.65565430932
)
[elevation_profile] =>
https://d3o5xota0a1fcr.cloudfront.net/v6/charts/QVVWKZ5LLAFSZ6CW3KCIWKK5JGANWMJ53QPELRQ6I6G74YGJB5GMQ33ZRHUKKCD4KX4JQT3YEPNATGXGSYWQ====
[start_latitude] => -37.927366951481
[start_longitude] => 144.63511453941
[end_latitude] => -37.920383736491
[end_longitude] => 144.65565430932
[climb_category] => 0
[city] => Cocoroc
[state] => VIC
[country] => Australia
[private] =>
[hazardous] =>
[starred] =>
[created_at] => 2011-11-14T03:53:14Z
[updated_at] => 2021-05-15T02:11:41Z
[total_elevation_gain] => 2
[map] => Array
(
[id] => s825967
[polyline] => `unfFm`xqZuDyOq@cCm@cCaCuK{AeG}FyVaA}EoIw\oF}T
[resource_state] => 3
)
[effort_count] => 9869
[athlete_count] => 1063
[star_count] => 3
[athlete_segment_stats] => Array
(
[pr_elapsed_time] => 135
[pr_date] => 2016-09-03
[pr_activity_id] => 698406916
[effort_count] => 516
)
[xoms] => Array
(
[kom] => 2:10
[qom] => 2:40
[destination] => Array
(
[href] => strava://segments/825967/leaderboard
[type] => overall
[name] => All-Time
)
)
[local_legend] => Array
(
[athlete_id] => 412790
[title] => Luis Lopez🏊🏼🚴🏻🏃🏽
[profile] =>
https://dgalywyr863hv.cloudfront.net/pictures/athletes/412790/2005616/1/large.jpg
[effort_description] => 19 efforts in the last 90 days
[effort_count] => 19
[effort_counts] => Array
(
[overall] => 19 efforts
[female] => 2 efforts
)
[destination] => strava://segments/825967/local_legend?categories%5B%5D=overall
)
)