-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Features #48
base: master
Are you sure you want to change the base?
New Features #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're using an older version. Make sure you are using the current version. Also make sure to add detailed instructions on how to use a new feature in the README.md.
@@ -8,12 +8,17 @@ | |||
import ijson | |||
import json | |||
import os | |||
from geopy import Nominatim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to add this to the requirements.txt
def loadGPXData(self, file_name, date_range): | ||
"""Loads location data from the given GPX file. | ||
|
||
Arguments: | ||
file_name {string or file} -- The name of the GPX file | ||
(or an open file-like object) with the GPX data. | ||
date_range {tuple} -- A tuple containing the min-date and max-date. | ||
e.g.: (None, None), (None, '2019-01-01'), ('2017-02-11'), ('2019-01-01') | ||
""" | ||
xmldoc = minidom.parse(file_name) | ||
gxtrack = xmldoc.getElementsByTagName("trkpt") | ||
w = [Bar(), Percentage(), " ", ETA()] | ||
|
||
with ProgressBar(max_value=len(gxtrack), widgets=w) as pb: | ||
for i, trkpt in enumerate(gxtrack): | ||
lat = trkpt.getAttribute("lat") | ||
lon = trkpt.getAttribute("lon") | ||
coords = (round(float(lat), 6), round(float(lon), 6)) | ||
date = trkpt.getElementsByTagName("time")[0].firstChild.data | ||
if dateInRange(date[:10], date_range): | ||
self.updateCoord(coords) | ||
pb.update(i) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you are removing this?
def generateMap(self, settings): | ||
"""Generates the heatmap. | ||
|
||
Arguments: | ||
settings {dict} -- The settings for the heatmap. | ||
|
||
Returns: | ||
Map -- The Heatmap. | ||
""" | ||
tiles = settings["tiles"] | ||
zoom_start = settings["zoom_start"] | ||
radius = settings["radius"] | ||
blur = settings["blur"] | ||
min_opacity = settings["min_opacity"] | ||
max_zoom = settings["max_zoom"] | ||
|
||
def generateMap(self, tiles, map_zoom_start=6, heatmap_radius=7, | ||
heatmap_blur=4, heatmap_min_opacity=0.2, | ||
heatmap_max_zoom=4): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you removing the documentation and changing it back here? Make sure you are using the latest version
Hello!
I would like to suggest these features listed below