diff --git a/roles/vector-map/files/test-index.redirect b/roles/vector-map/files/test-index.redirect deleted file mode 100644 index 68cd166c6..000000000 --- a/roles/vector-map/files/test-index.redirect +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/roles/vector-map/defaults/main.yml b/roles/vector-maps/defaults/main.yml similarity index 84% rename from roles/vector-map/defaults/main.yml rename to roles/vector-maps/defaults/main.yml index d68b225b3..980765644 100644 --- a/roles/vector-map/defaults/main.yml +++ b/roles/vector-maps/defaults/main.yml @@ -1,6 +1,6 @@ vector_map_install: True vector_map_enabled: True -vector_map_path: '{{ content_base }}/www/vector-map' +vector_map_path: '{{ content_base }}/www/vector-maps' # 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! diff --git a/roles/vector-map/files/countries.json b/roles/vector-maps/files/countries.json similarity index 100% rename from roles/vector-map/files/countries.json rename to roles/vector-maps/files/countries.json diff --git a/roles/vector-map/files/en-map_test.json b/roles/vector-maps/files/en-map_test.json similarity index 100% rename from roles/vector-map/files/en-map_test.json rename to roles/vector-maps/files/en-map_test.json diff --git a/roles/vector-map/files/osm_functions.js b/roles/vector-maps/files/osm_functions.js similarity index 98% rename from roles/vector-map/files/osm_functions.js rename to roles/vector-maps/files/osm_functions.js index ed59e4807..ba448ca01 100644 --- a/roles/vector-map/files/osm_functions.js +++ b/roles/vector-maps/files/osm_functions.js @@ -7,7 +7,7 @@ var regionGeojson = {}; var regionList = []; var regionInstalled = []; var commonAssetsDir = '/common/assets/'; -var mapAssetsDir = '/vector-map/maplist/assets/'; +var mapAssetsDir = '/vector-maps/maplist/assets/'; var iiab_config_dir = '/etc/iiab/'; var onChangeFunc = "setSize"; var osmCatalog = {}; @@ -27,7 +27,7 @@ function readOsmIdx(){ //consoleLog ("in readOsmIdx"); var resp = $.ajax({ type: 'GET', - url: consoleJsonDir + 'vector-map-idx.json', + url: consoleJsonDir + 'vector-maps-idx.json', dataType: 'json' }) .done(function( data ) { diff --git a/roles/vector-maps/files/test-index.redirect b/roles/vector-maps/files/test-index.redirect new file mode 100644 index 000000000..3d86d5480 --- /dev/null +++ b/roles/vector-maps/files/test-index.redirect @@ -0,0 +1,4 @@ + + + + diff --git a/roles/vector-map/tasks/main.yml b/roles/vector-maps/tasks/main.yml similarity index 79% rename from roles/vector-map/tasks/main.yml rename to roles/vector-maps/tasks/main.yml index e15b7d30d..b9d6dd1eb 100644 --- a/roles/vector-map/tasks/main.yml +++ b/roles/vector-maps/tasks/main.yml @@ -1,4 +1,4 @@ -- name: Make sure the vector-map directory exists +- name: Make sure the vector-maps directory exists file: path: '{{ vector_map_path }}/maplist/assets' state: directory @@ -45,7 +45,7 @@ dest: /usr/bin/iiab-update-osm mode: "0755" -- name: Run the script that does vector-map housekeeping +- name: Run the script that does vector-maps housekeeping shell: /usr/bin/iiab-update-osm - name: Copy the Countries geojson to assets @@ -61,19 +61,19 @@ - name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template template: - src: vector-map.conf - dest: "/etc/{{ apache_config_dir }}/vector-map.conf" + src: vector-maps.conf + dest: "/etc/{{ apache_config_dir }}/vector-maps.conf" -- name: Create symlink vector-map.conf from sites-enabled to sites-available (debuntu, not nec for redhat) +- name: Create symlink vector-maps.conf from sites-enabled to sites-available (debuntu, not nec for redhat) file: - src: /etc/apache2/sites-available/vector-map.conf - path: /etc/apache2/sites-enabled/vector-map.conf + src: /etc/apache2/sites-available/vector-maps.conf + path: /etc/apache2/sites-enabled/vector-maps.conf state: link when: vector_map_enabled and is_debuntu -- name: Remove symlink /etc/apache2/sites-enabled/vector-map.conf (debuntu) +- name: Remove symlink /etc/apache2/sites-enabled/vector-maps.conf (debuntu) file: - path: /etc/apache2/sites-enabled/vector-map.conf + path: /etc/apache2/sites-enabled/vector-maps.conf state: absent when: not vector_map_enabled and is_debuntu diff --git a/roles/vector-map/templates/iiab-update-osm b/roles/vector-maps/templates/iiab-update-osm similarity index 98% rename from roles/vector-map/templates/iiab-update-osm rename to roles/vector-maps/templates/iiab-update-osm index 817e6e6cd..bebb8d81a 100755 --- a/roles/vector-map/templates/iiab-update-osm +++ b/roles/vector-maps/templates/iiab-update-osm @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Scan the vector-map directory, update the vector-map-idx.json, add menu-defs +# Scan the vector-maps directory, update the vector-maps-idx.json, add menu-defs from geojson import Feature, Point, FeatureCollection, Polygon import geojson @@ -27,7 +27,7 @@ doc_root = get_iiab_env('WWWROOT') menuDefs = doc_root + "/js-menu/menu-files/menu-defs/" vector_map_idx_dir = doc_root + "/common/assets" #map_doc_root = '{{ vector_map_path }}' -map_doc_root = '/library/www/vector-map' +map_doc_root = '/library/www/vector-maps' # map_catalog will be global, assumed always available map_catalog = {} map_menu_def_list = [] diff --git a/roles/vector-map/templates/index.html b/roles/vector-maps/templates/index.html similarity index 92% rename from roles/vector-map/templates/index.html rename to roles/vector-maps/templates/index.html index b00310b1a..45573d3de 100644 --- a/roles/vector-map/templates/index.html +++ b/roles/vector-maps/templates/index.html @@ -46,12 +46,12 @@ return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; } - + - + diff --git a/roles/vector-map/templates/main.js b/roles/vector-maps/templates/main.js similarity index 100% rename from roles/vector-map/templates/main.js rename to roles/vector-maps/templates/main.js diff --git a/roles/vector-map/templates/vector-map.conf b/roles/vector-maps/templates/vector-map.conf similarity index 83% rename from roles/vector-map/templates/vector-map.conf rename to roles/vector-maps/templates/vector-map.conf index 378127778..dd3d32050 100644 --- a/roles/vector-map/templates/vector-map.conf +++ b/roles/vector-maps/templates/vector-map.conf @@ -1,6 +1,6 @@ # For downloadable regional vector tilesets Alias /maps {{ vector_map_path }} -Alias /vector-map {{ vector_map_path }} +Alias /vector-maps {{ vector_map_path }} Options Indexes FollowSymLinks AllowOverride All