mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
need geojson package
This commit is contained in:
parent
4432cec1fa
commit
76980a5c57
2 changed files with 8 additions and 3 deletions
|
@ -26,6 +26,12 @@
|
||||||
url: "{{ iiab_osm_url }}/bboxes.geojson"
|
url: "{{ iiab_osm_url }}/bboxes.geojson"
|
||||||
dest: '{{ osm_vector_path }}/assets'
|
dest: '{{ osm_vector_path }}/assets'
|
||||||
|
|
||||||
|
- name: Install a package that helps with geojson
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- python-geojson
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Install the script to update osm catalog
|
- name: Install the script to update osm catalog
|
||||||
template:
|
template:
|
||||||
src: iiab-update-osm
|
src: iiab-update-osm
|
||||||
|
|
|
@ -21,7 +21,7 @@ import iiab_update_menus as menus
|
||||||
|
|
||||||
doc_root = get_iiab_env('WWWROOT')
|
doc_root = get_iiab_env('WWWROOT')
|
||||||
menuDefs = doc_root + "/js-menu/menu-files/menu-defs/"
|
menuDefs = doc_root + "/js-menu/menu-files/menu-defs/"
|
||||||
osm_vector_idx_dir = doc_root + "/common/assets/"
|
osm_vector_idx_dir = doc_root + "/common/assets"
|
||||||
#map_doc_root = '{{ osm_vector_path }}'
|
#map_doc_root = '{{ osm_vector_path }}'
|
||||||
map_doc_root = '/library/osm-vector'
|
map_doc_root = '/library/osm-vector'
|
||||||
# map_catalog will be global, assumed always available
|
# map_catalog will be global, assumed always available
|
||||||
|
@ -56,8 +56,7 @@ def main():
|
||||||
|
|
||||||
def get_map_catalog():
|
def get_map_catalog():
|
||||||
global map_catalog
|
global map_catalog
|
||||||
#input_json = "{{ iiab_dir }}" + '/regions.json'
|
input_json = osm_vector_idx_dir + '/regions.json'
|
||||||
input_json = "/etc/iiab" + '/regions.json'
|
|
||||||
with open(input_json,'r') as regions:
|
with open(input_json,'r') as regions:
|
||||||
reg_str = regions.read()
|
reg_str = regions.read()
|
||||||
map_catalog = json.loads(reg_str)
|
map_catalog = json.loads(reg_str)
|
||||||
|
|
Loading…
Reference in a new issue