1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

->osm-vector-maps

This commit is contained in:
George Hunt 2019-05-06 07:23:16 -07:00
parent 0a115233d2
commit ba07100220
12 changed files with 34 additions and 34 deletions

View file

@ -15,8 +15,8 @@
- name: Installing vector map test page - name: Installing vector map test page
include_role: include_role:
name: vector-maps name: osm-vector-maps
when: vector_maps_install when: osm_vector_maps_install
tags: base, map tags: base, map
- name: Installing captive portal - name: Installing captive portal

View file

@ -1,6 +1,6 @@
vector_maps_install: True osm_vector_maps_install: True
vector_maps_enabled: True osm_vector_maps_enabled: True
vector_map_path: '{{ content_base }}/www/vector-maps' vector_map_path: '{{ content_base }}/www/osm-vector-maps'
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

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 = '/vector-maps/maplist/assets/'; var mapAssetsDir = '/osm-vector-maps/maplist/assets/';
var iiab_config_dir = '/etc/iiab/'; var iiab_config_dir = '/etc/iiab/';
var onChangeFunc = "setSize"; var onChangeFunc = "setSize";
var mapCatalog = {}; var mapCatalog = {};
@ -27,7 +27,7 @@ function readOsmIdx(){
//consoleLog ("in readOsmIdx"); //consoleLog ("in readOsmIdx");
var resp = $.ajax({ var resp = $.ajax({
type: 'GET', type: 'GET',
url: consoleJsonDir + 'vector-maps-idx.json', url: consoleJsonDir + 'osm-vector-maps-idx.json',
dataType: 'json' dataType: 'json'
}) })
.done(function( data ) { .done(function( data ) {

View file

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

View file

@ -1,4 +1,4 @@
- name: Make sure the vector-maps directory exists - name: Make sure the osm-vector-maps directory exists
file: file:
path: '{{ vector_map_path }}/maplist/assets' path: '{{ vector_map_path }}/maplist/assets'
state: directory state: directory
@ -45,7 +45,7 @@
dest: /usr/bin/iiab-update-map dest: /usr/bin/iiab-update-map
mode: "0755" mode: "0755"
- name: Run the script that does vector-maps housekeeping - name: Run the script that does osm-vector-maps housekeeping
shell: /usr/bin/iiab-update-map shell: /usr/bin/iiab-update-map
- name: Copy the Countries geojson to assets - name: Copy the Countries geojson to assets
@ -59,23 +59,23 @@
src: map_functions.js src: map_functions.js
dest: '{{ vector_map_path }}/maplist/assets' dest: '{{ vector_map_path }}/maplist/assets'
- name: Install /etc/{{ apache_config_dir }}/vector-maps.conf from template - name: Install /etc/{{ apache_config_dir }}/osm-vector-maps.conf from template
template: template:
src: vector-maps.conf src: osm-vector-maps.conf
dest: "/etc/{{ apache_config_dir }}/vector-maps.conf" dest: "/etc/{{ apache_config_dir }}/osm-vector-maps.conf"
- name: Create symlink vector-maps.conf from sites-enabled to sites-available (debuntu, not nec for redhat) - name: Create symlink osm-vector-maps.conf from sites-enabled to sites-available (debuntu, not nec for redhat)
file: file:
src: /etc/apache2/sites-available/vector-maps.conf src: /etc/apache2/sites-available/osm-vector-maps.conf
path: /etc/apache2/sites-enabled/vector-maps.conf path: /etc/apache2/sites-enabled/osm-vector-maps.conf
state: link state: link
when: vector_maps_enabled and is_debuntu when: osm_vector_maps_enabled and is_debuntu
- name: Remove symlink /etc/apache2/sites-enabled/vector-maps.conf (debuntu) - name: Remove symlink /etc/apache2/sites-enabled/osm-vector-maps.conf (debuntu)
file: file:
path: /etc/apache2/sites-enabled/vector-maps.conf path: /etc/apache2/sites-enabled/osm-vector-maps.conf
state: absent state: absent
when: not vector_maps_enabled and is_debuntu when: not osm_vector_maps_enabled and is_debuntu
- name: Copy the redirect to the test page -- delete this if more than one map - name: Copy the redirect to the test page -- delete this if more than one map
copy: copy:

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# Scan the vector-maps directory, update the vector-maps-idx.json, add menu-defs # Scan the osm-vector-maps directory, update the osm-vector-maps-idx.json, add menu-defs
from geojson import Feature, Point, FeatureCollection, Polygon from geojson import Feature, Point, FeatureCollection, Polygon
import geojson import geojson
@ -27,7 +27,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/"
vector_map_idx_dir = doc_root + "/common/assets" vector_map_idx_dir = doc_root + "/common/assets"
#map_doc_root = '{{ vector_map_path }}' #map_doc_root = '{{ vector_map_path }}'
map_doc_root = '/library/www/vector-maps' map_doc_root = '/library/www/osm-vector-maps'
# 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 = []

View file

@ -46,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="/vector-maps/maplist/assets/map_functions.js"></script> <script src="/osm-vector-maps/maplist/assets/map_functions.js"></script>
<script> <script>
window.$ = window.$ = jQuery; window.$ = window.$ = jQuery;
$.when(readMapCatalog()).done(function() { $.when(readMapCatalog()).done(function() {
renderRegionList(false); renderRegionList(false);
}); });
</script> </script>
<script type="text/javascript" src="/vector-maps/maplist/main.js"></script></body> <script type="text/javascript" src="/osm-vector-maps/maplist/main.js"></script></body>
</html> </html>

View file

@ -1,6 +1,6 @@
# For downloadable regional vector tilesets # For downloadable regional vector tilesets
Alias /maps {{ vector_map_path }} Alias /maps {{ vector_map_path }}
Alias /vector-maps {{ vector_map_path }} Alias /osm-vector-maps {{ vector_map_path }}
<Directory {{ vector_map_path }}> <Directory {{ vector_map_path }}>
Options Indexes FollowSymLinks Options Indexes FollowSymLinks
AllowOverride All AllowOverride All

View file

@ -352,9 +352,9 @@ mongodb_enabled: False
mongodb_port: 27018 mongodb_port: 27018
# Regional OSM vector maps use much less disk space than bitmap/raster versions # Regional OSM vector maps use much less disk space than bitmap/raster versions
vector_maps_install: True osm_vector_maps_install: True
vector_maps_enabled: True osm_vector_maps_enabled: True
vector_map_path: '{{ content_base }}/www/vector-maps' vector_map_path: '{{ content_base }}/www/osm-vector-maps'
# 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

View file

@ -230,8 +230,8 @@ moodle_enabled: True
# If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER
# Regional OSM vector maps use much less disk space than bitmap/raster versions # Regional OSM vector maps use much less disk space than bitmap/raster versions
vector_maps_install: True osm_vector_maps_install: True
vector_maps_enabled: True osm_vector_maps_enabled: True
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957

View file

@ -230,8 +230,8 @@ moodle_enabled: False
# If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER
# Regional OSM vector maps use much less disk space than bitmap/raster versions # Regional OSM vector maps use much less disk space than bitmap/raster versions
vector_maps_install: True osm_vector_maps_install: True
vector_maps_enabled: True osm_vector_maps_enabled: True
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957

View file

@ -230,8 +230,8 @@ moodle_enabled: False
# If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER
# Regional OSM vector maps use much less disk space than bitmap/raster versions # Regional OSM vector maps use much less disk space than bitmap/raster versions
vector_maps_install: True osm_vector_maps_install: True
vector_maps_enabled: True osm_vector_maps_enabled: True
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957