Last active
May 2, 2016 07:50
-
-
Save deparkes/610b112f74eadbda663806ba8dd83069 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gpxpy | |
import gpxpy.gpx | |
import folium | |
gpx_file = open('my_gpx_coords.gpx', 'r') | |
gpx = gpxpy.parse(gpx_file) | |
points = [] | |
for track in gpx.tracks: | |
for segment in track.segments: | |
for point in segment.points: | |
points.append([point.latitude, point.longitude]) | |
# Load map centred on London | |
uk = folium.Map(location=[51.5170595,-0.0910127], zoom_start=15) | |
#add a marker for each toilet | |
for each in points: | |
folium.Marker(each).add_to(uk) | |
# Save map | |
uk.save("./gpx_example.html") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment