Created
April 3, 2014 19:49
-
-
Save brunobord/9961581 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 random | |
import json | |
places = [] | |
for x in range(1000): # your choice here | |
places.append({ | |
"name": "place %d" % x, | |
"lat": random.randint(-80, 80) + random.random(), | |
"lon": random.randint(-180, 180) + random.random(), | |
"address": "Fake address", | |
"type": "random", | |
"url": "http://example.com", | |
"power": {"available": random.choice((True, False))}, | |
"wifi": {"available": random.choice((True, False))} | |
}) | |
json.dump({'places': places}, open('locations/paris.json', 'w'), indent=4) | |
# to display this, I've changed the Paris defaultZoom to "1". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment