1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

fix conflicts

This commit is contained in:
George Hunt 2019-04-08 16:14:48 -07:00
parent 0582742a81
commit 591ad02d5f
7 changed files with 20 additions and 18 deletions

View file

@ -1,3 +1,3 @@
menu_def_dir: '{{ doc_root }}/js-menu/menu-files/menu-defs' menu_def_dir: '{{ doc_root }}/js-menu/menu-files/menu-defs'
osm_vector_path: '{{ content_base }}/osm-vector' osm_vector_path: '{{ content_base }}/www/osm-vector'
iiab_osm_url : http://download.iiab.io/content/OSM/vector-tiles iiab_osm_url : http://download.iiab.io/content/OSM/vector-tiles

View file

@ -7,7 +7,7 @@ var regionGeojson = {};
var regionList = []; var regionList = [];
var regionInstalled = []; var regionInstalled = [];
var commonAssetsDir = '/common/assets/'; var commonAssetsDir = '/common/assets/';
var mapAssetsDir = '/osm-vector/assets/'; var mapAssetsDir = '/osm-vector/maplist/assets/';
var iiab_config_dir = '/etc/iiab/'; var iiab_config_dir = '/etc/iiab/';
var onChangeFunc = "setSize"; var onChangeFunc = "setSize";
var osmCatalog = {}; var osmCatalog = {};
@ -138,9 +138,9 @@ function jsonErrhandler (jqXHR, textStatus, errorThrown)
displayServerCommandStatus("Json Errhandler: " + textStatus + ", " + errorThrown); displayServerCommandStatus("Json Errhandler: " + textStatus + ", " + errorThrown);
} }
//consoleLog("In Error Handler logging jqXHR"); //consoleLog("In Error Handler logging jqXHR");
consoleLog(textStatus); console.log(textStatus);
consoleLog(errorThrown); console.log(errorThrown);
consoleLog(jqXHR); console.log(jqXHR);
return false; return false;
} }

View file

@ -1,4 +1,4 @@
<head> <head>
<meta http-equiv="refresh" content="0; URL=/osm-vector/assets/" /> <meta http-equiv="refresh" content="0; URL=/osm-vector/maplist/" />
</head> </head>

View file

@ -1,6 +1,6 @@
- name: Make sure the osm-vector directory exists - name: Make sure the osm-vector directory exists
file: file:
path: '{{ osm_vector_path }}/assets' path: '{{ osm_vector_path }}/maplist/assets'
state: directory state: directory
owner: '{{ apache_user }}' owner: '{{ apache_user }}'
group: '{{ apache_user }}' group: '{{ apache_user }}'
@ -9,7 +9,7 @@
- name: Fetch the catalog for osm maps - name: Fetch the catalog for osm maps
get_url: get_url:
url: "{{ iiab_osm_url }}/assets/regions.json" url: "{{ iiab_osm_url }}/assets/regions.json"
dest: '{{ osm_vector_path }}/assets' dest: '{{ osm_vector_path }}/maplist/assets/'
- name: Create a link to osm catalog in /common/assets - name: Create a link to osm catalog in /common/assets
file: file:
@ -20,18 +20,18 @@
- name: Fetch the javascript bundle with openlayers for test page - name: Fetch the javascript bundle with openlayers for test page
get_url: get_url:
url: "{{ iiab_osm_url }}/assets/main.js" url: "{{ iiab_osm_url }}/assets/main.js"
dest: '{{ osm_vector_path }}/assets' dest: '{{ osm_vector_path }}/maplist/'
- name: Fetch the index.html for test page - name: Fetch the index.html for test page
template: template:
src: "index.html" src: "index.html"
dest: '{{ osm_vector_path }}/assets/index.html' dest: '{{ osm_vector_path }}/maplist/index.html'
# Wanted to generate on the fly. But geofabrik has non-rectangular bboxes # Wanted to generate on the fly. But geofabrik has non-rectangular bboxes
- name: Fetch the bounding box description for osm maps - name: Fetch the bounding box description for osm maps
get_url: get_url:
url: "{{ iiab_osm_url }}/assets/bboxes.geojson" url: "{{ iiab_osm_url }}/assets/bboxes.geojson"
dest: '{{ osm_vector_path }}/assets/' dest: '{{ osm_vector_path }}/maplist/assets/'
- name: Install a package that helps with geojson - name: Install a package that helps with geojson
package: package:
@ -51,13 +51,13 @@
- name: Copy the Countries geojson to assets - name: Copy the Countries geojson to assets
copy: copy:
src: countries.json src: countries.json
dest: '{{ osm_vector_path }}/assets' dest: '{{ osm_vector_path }}/maplist/assets'
# It is too complicated to use a single file for both iiab and admin-console # It is too complicated to use a single file for both iiab and admin-console
- name: Copy the duplicated javascript to assets - name: Copy the duplicated javascript to assets
copy: copy:
src: osm_functions.js src: osm_functions.js
dest: '{{ osm_vector_path }}/assets' dest: '{{ osm_vector_path }}/maplist/assets'
- name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template - name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template
template: template:

View file

@ -23,7 +23,7 @@ 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/www/osm-vector'
# map_catalog will be global, assumed always available # map_catalog will be global, assumed always available
map_catalog = {} map_catalog = {}
map_menu_def_list = [] map_menu_def_list = []
@ -56,7 +56,7 @@ def main():
def get_map_catalog(): def get_map_catalog():
global map_catalog global map_catalog
input_json = map_doc_root + '/assets/regions.json' input_json = map_doc_root + '/maplist/assets/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)

View file

@ -4,6 +4,8 @@
<title>Osm-Vector Splash Page</title> <title>Osm-Vector Splash Page</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap -->
<link href="/common/css/bootstrap.min.css" rel="stylesheet">
<script src='/common/js/jquery.min.js'></script> <script src='/common/js/jquery.min.js'></script>
</head> </head>
<body> <body>
@ -44,12 +46,12 @@
return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e];
} }
</script> </script>
<script src="/osm-vector/assets/osm_functions.js"></script> <script src="/osm-vector/maplist/assets/osm_functions.js"></script>
<script> <script>
window.$ = window.$ = jQuery; window.$ = window.$ = jQuery;
$.when(readOsmCatalog()).done(function() { $.when(readOsmCatalog()).done(function() {
renderRegionList(false); renderRegionList(false);
}); });
</script> </script>
<script type="text/javascript" src="/osm-vector/assets/main.js"></script></body> <script type="text/javascript" src="/osm-vector/maplist/main.js"></script></body>
</html> </html>

View file

@ -354,7 +354,7 @@ mongodb_port: 27018
# Regional OSM vector maps take much less disk space than image versions # Regional OSM vector maps take much less disk space than image versions
osm_vector_install: True osm_vector_install: True
osm_vector_enabled: True osm_vector_enabled: True
osm_vector_path: '{{ content_base }}/osm-vector' osm_vector_path: '{{ content_base }}/www/osm-vector'
# roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs # roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879