1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +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'
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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
- name: Make sure the osm-vector directory exists
file:
path: '{{ osm_vector_path }}/assets'
path: '{{ osm_vector_path }}/maplist/assets'
state: directory
owner: '{{ apache_user }}'
group: '{{ apache_user }}'
@ -9,7 +9,7 @@
- name: Fetch the catalog for osm maps
get_url:
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
file:
@ -20,18 +20,18 @@
- name: Fetch the javascript bundle with openlayers for test page
get_url:
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
template:
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
- name: Fetch the bounding box description for osm maps
get_url:
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
package:
@ -51,13 +51,13 @@
- name: Copy the Countries geojson to assets
copy:
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
- name: Copy the duplicated javascript to assets
copy:
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
template:

View file

@ -23,7 +23,7 @@ doc_root = get_iiab_env('WWWROOT')
menuDefs = doc_root + "/js-menu/menu-files/menu-defs/"
osm_vector_idx_dir = doc_root + "/common/assets"
#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 = {}
map_menu_def_list = []
@ -56,7 +56,7 @@ def main():
def get_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:
reg_str = regions.read()
map_catalog = json.loads(reg_str)

View file

@ -4,6 +4,8 @@
<title>Osm-Vector Splash Page</title>
<meta charset="utf-8">
<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>
</head>
<body>
@ -44,12 +46,12 @@
return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e];
}
</script>
<script src="/osm-vector/assets/osm_functions.js"></script>
<script src="/osm-vector/maplist/assets/osm_functions.js"></script>
<script>
window.$ = window.$ = jQuery;
$.when(readOsmCatalog()).done(function() {
renderRegionList(false);
});
</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>

View file

@ -354,7 +354,7 @@ mongodb_port: 27018
# Regional OSM vector maps take much less disk space than image versions
osm_vector_install: 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
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879