Skip to content

New Features - #48

Open
pinkpenguinn wants to merge 1 commit into
luka1199:masterfrom
pinkpenguinn:master
Open

New Features#48
pinkpenguinn wants to merge 1 commit into
luka1199:masterfrom
pinkpenguinn:master

Conversation

@pinkpenguinn

@pinkpenguinn pinkpenguinn commented Feb 8, 2020

Copy link
Copy Markdown

Hello!

I would like to suggest these features listed below

  • Adding a time slider
  • Adding markers for top 20 most visited places
  • Function to change base map within the generate map

@pinkpenguinn pinkpenguinn changed the title Add files via upload New Features Feb 8, 2020

@luka1199 luka1199 left a comment

Copy link
Copy Markdown
Owner

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.

Comment thread geo_heatmap.py
import ijson
import json
import os
from geopy import Nominatim

Copy link
Copy Markdown
Owner

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

Comment thread geo_heatmap.py
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)

Copy link
Copy Markdown
Owner

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?

Comment thread geo_heatmap.py
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):

Copy link
Copy Markdown
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants