while I can place a marker on the Google Map for single set of co-ordinates like
<iframe
width="100%"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=mykey
&q=<?=$model->latitude_out ?>,<?= $model->longitude_out?>" >
</iframe>
I am not able to make out, how I can make a location history like googleMap timeline(history). I have pulled the coordinates for geo-locations and stored the same in the database.
for example the array of location my db is like this:
"location_positions" : [ { "locationTime" : "04-06-2020 02:54", "Latitude" : null, "Longitude" : null }, { "locationTime" : "04-06-2020 02:56", "Latitude" : null, "Longitude" : null }, { "locationTime" : "04-06-2020 02:57", "Latitude" : null, "Longitude" : null }, { "locationTime" : "04-06-2020 02:58", "Latitude" : "21.4626999", "Longitude" : "83.9729724" } ]
Now how I can plot this coordinates in a line - example images.
No I am not getting the result with the polygon as suggested in the answer. The result I am getting is like in the image below, whereas my actual movement is denoted by green line.
I need the result as in my first picture.

