mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
move osm foldeer to /library/www/
This commit is contained in:
parent
ee7e5ea302
commit
3915ad2ed1
7 changed files with 26 additions and 25 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
header('Location: /osm-vector/assets,true,302');
|
||||
die();
|
||||
?>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; URL=/osm-vector/maplist/" />
|
||||
</head>
|
||||
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
- name: Fetch the catalog for osm maps
|
||||
get_url:
|
||||
url: "{{ iiab_osm_url }}/assets/regions.json"
|
||||
dest: '{{ osm_vector_path }}/assets'
|
||||
|
||||
- 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 }}'
|
||||
mode: '0755'
|
||||
|
||||
- name: Fetch the catalog for osm maps
|
||||
get_url:
|
||||
url: "{{ iiab_osm_url }}/assets/regions.json"
|
||||
dest: '{{ osm_vector_path }}/maplist/assets/'
|
||||
|
||||
- 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:
|
||||
|
@ -45,13 +45,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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue