Distribute data with layers instead of data/ dir
This was originally done to make the gitignoring easier, but ended up being somewhat more complex when trying to include files, so they're moving out closer to the point of use.
This commit is contained in:
parent
c74edcb8c0
commit
7957523c3c
21 changed files with 49 additions and 51 deletions
|
|
@ -4,8 +4,6 @@ import requests
|
|||
import json
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
print("Searching for Milwaukee Burger Company locations")
|
||||
|
||||
# Stolen from my machine, appears to work; sufficient and necessary to get
|
||||
# around their firewall apparently?
|
||||
UA={
|
||||
|
|
@ -39,5 +37,7 @@ geojson = {
|
|||
"features": locations,
|
||||
}
|
||||
|
||||
with open("milwaukee-burger-company-data.geojson", "w") as f:
|
||||
print(len(locations), "locations found")
|
||||
|
||||
with open("data.geojson", "w") as f:
|
||||
f.write(json.dumps(geojson))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import GeoJSON from 'ol/format/GeoJSON.js';
|
|||
import {Style} from 'ol/style.js';
|
||||
import Icon from 'ol/style/Icon.js';
|
||||
|
||||
import url from '/data/milwaukee-burger-company-data.geojson?url'; // TODO: remove `?url`?
|
||||
import url from './data.geojson?url'; // TODO: remove `?url`?
|
||||
import pin from './pin.svg?url'; // TODO: remove `?url`?
|
||||
|
||||
const vectorLayer = new VectorLayer({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue