maps
This commit is contained in:
parent
33d02a4845
commit
20c0224bc8
53 changed files with 1329 additions and 60 deletions
|
|
@ -5,7 +5,8 @@ def generate_geohash(generator):
|
|||
for article in generator.articles:
|
||||
if "location" in article.metadata:
|
||||
lat, lon = [float(i) for i in article.metadata['location'].replace(' ', '').split(',')]
|
||||
article.metadata['latlon'] = article.metadata['location'].replace(' ', '')
|
||||
article.metadata['lat'] = lat
|
||||
article.metadata['lon'] = lon
|
||||
article.metadata['geohash'] = gh.encode(lat, lon, 11)
|
||||
article.slug = gh.encode(lat, lon, 11)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue