New Features - #48
Open
pinkpenguinn wants to merge 1 commit into
Open
Conversation
luka1199
requested changes
Feb 10, 2020
luka1199
left a comment
Owner
There was a problem hiding this comment.
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.
| import ijson | ||
| import json | ||
| import os | ||
| from geopy import Nominatim |
Owner
There was a problem hiding this comment.
Make sure to add this to the requirements.txt
Comment on lines
-100
to
-122
| 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) | ||
|
|
Owner
There was a problem hiding this comment.
Any reason you are removing this?
Comment on lines
-165
to
+155
| 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): | ||
|
|
Owner
There was a problem hiding this comment.
Why are you removing the documentation and changing it back here? Make sure you are using the latest version
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
I would like to suggest these features listed below