diff --git a/README.md b/README.md index dc55a4e..c00968b 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,48 @@ Just run the following commands : chmod +x install.sh sudo ./install.sh -A lot of data will be downloaded (Approx. 1Go). +**That's it !** Access your server URL. You will be prompted for an extent (xmin,ymin,xmax,ymax). The default one is the city of Albi. Use the [OpenStreetMap extent tool](http://www.openstreetmap.org/export#map=17/43.92751/2.14760) for help. +A lot of data will be downloaded (Approx. 1Go). + A planned task will be setup to **overwrite** the whole database with up-to-date OpenStreetMap data, every month (*root crontab*). +Use the tiles in Leaflet +------------------------ + + var map = L.map('map').setView([43.92751, 2.14760], 14); + + L.tileLayer('http://SERVER/STYLE/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' + }).addTo(map); + + +Use the tiles in OpenLayers 3 +----------------------------- + + var map = new ol.Map({ + target: 'map', + layers: [ + new ol.layer.Tile({ + attributions: [new ol.Attribution({ + html: '© OpenStreetMap contributors' + })], + source: new new ol.source.XYZ({ + url: 'http://SERVER/STYLE/{z}/{y}/{x}.png' + }) + }) + ], + view: new ol.View2D({ + center: ol.proj.transform([43.92751, 2.14760], 'EPSG:4326', 'EPSG:3857'), + zoom: 14 + }) + }); + Change extent ------------- diff --git a/install.sh b/install.sh index 187c07a..db9eedf 100755 --- a/install.sh +++ b/install.sh @@ -167,8 +167,8 @@ cronjob="0 2 1 * * $croncmd" ./update-data.sh # Grant rights on OSM tables -/usr/bin/install-postgis-osm-user.sh ${DB_NAME} www-data -/usr/bin/install-postgis-osm-user.sh ${DB_NAME} gisuser +/usr/bin/install-postgis-osm-user.sh ${DB_NAME} www-data 2> /dev/null +/usr/bin/install-postgis-osm-user.sh ${DB_NAME} gisuser 2> /dev/null #.......................................................................