Commit f3bff290 authored by Chenu Denis's avatar Chenu Denis
Browse files

[doc] Update manual and data copyright link

parent f2cdd62e
......@@ -7,11 +7,54 @@ Use IGN map for map question.
1. Extract the download and upload the "MapIgn" folder to ./upload/themes/question/.
2. Create an MapIgn question (in Mask question)
### Settings
### Question Settings
Some settings related to map are hidden, since it can not be used or uneeded with this theme.
Only 4 settings are currently used
- _Get default location from browser_ : Get the location from browser when page load. User can always use Locate me button.
- _Zoom level_ : The inital zoom level
- _Default position_ : Default coordinates of the map when the page first loads. Format: 'latitude longtitude", latitude and longitude
- _Map height_ : The Map height in pixel, width is always set to 100%
### Participant usage
Participant see the map using [OrthoPhotos](https://www.geoportail.gouv.fr/) for layer. To allow usage of lovation from browser : user must allow browser to get position.
A new button is added **Locate me** allowing to set the position to the current location at any tim.
Participant can update layer and choose
- [OrthoPhotos](https://www.geoportail.gouv.fr/)
- [Plan IGN](https://www.ign.fr/)
- [OpenStreetMap (OSM)](https://www.openstreetmap.org/)
- [Plan IGN](https://www.ign.fr/) with [OrthoPhotos](https://www.geoportail.gouv.fr/)
- [OpenStreetMap (OSM)](https://www.openstreetmap.org/) with [OrthoPhotos](https://www.geoportail.gouv.fr/)
### Use your own IGN API key
By default the Questin theme use [essentiels](https://geoservices.ign.fr/services-web-essentiels) API key.
You can set to your own API key updating confoig.php file and add the ignApiKey as your own config :
```
'config'=>array(
'debug'=>2,
'debugsql'=>0, // Set this to 1 to enanble sql logging, only active when debug = 2
// Mysql database engine (INNODB|MYISAM):
(mysqlEngine' => 'MYISAM',
// Update default LimeSurvey config here
'ignApiKey' => "Your own IGN API key",
)
```
### Usage with [OfflineSurveys](https://www.offlinesurveys.com/)
A specific version for OfflineSurveys are compatible with this Quetsion theme, allowing to use geoportail OrthoPhotos anf IGN Map in such survey.
You can contact OfflineSurveys support if you need such solution.
## Copyright and home page
......
......@@ -79,7 +79,7 @@ function IGNGeoInitialize(basename,MapOptions){
'&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&TILEMATRIXSET=PM'+
'&LAYER={ignLayer}&STYLE={style}&FORMAT={format}'+
'&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}', {
attribution: '<a target="_blank" href="https://www.ign.fr/">IGN France</a>',
attribution: 'Data © <a target="_blank" href="https://www.ign.fr/">IGN France</a>',
bounds: [[-75, -180], [81, 180]],
ignApiKey: IGNmap.ignApiKey,
ignLayer: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2',
......@@ -105,6 +105,7 @@ function IGNGeoInitialize(basename,MapOptions){
'&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&TILEMATRIXSET=PM'+
'&LAYER={ignLayer}&STYLE={style}&FORMAT={format}'+
'&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}', {
attribution: 'Data © <a target="_blank" href="https://www.ign.fr/">IGN France</a>',
bounds: [[-75, -180], [81, 180]],
ignApiKey: IGNmap.ignApiKey,
ignLayer: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2',
......@@ -127,7 +128,7 @@ function IGNGeoInitialize(basename,MapOptions){
L.tileLayer(tileServerURL.OSM+".png", {
maxZoom: 19,
subdomains: ["a", "b", "c"],
attribution: 'Map data © <a href="//www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.',
attribution: 'Map data © <a href="//www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.',
opacity: 0.4
}),
......@@ -136,12 +137,12 @@ function IGNGeoInitialize(basename,MapOptions){
let mapOSM = L.tileLayer(tileServerURL.OSM+".png", {
maxZoom: 19,
subdomains: ["a", "b", "c"],
attribution: 'Map data © <a href="//www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
attribution: 'Map data © <a href="//www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
});
let mapCYC = L.tileLayer(tileServerURL.CYC+".png", {
maxZoom: 19,
subdomains: ["a", "b", "c"],
attribution: 'Map data © <a href="//www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
attribution: 'Map data © <a href="//www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
});
let mapHOT = L.layerGroup([L.tileLayer(tileServerURL.HUM+".png", {
maxZoom: 20,
......@@ -149,7 +150,7 @@ function IGNGeoInitialize(basename,MapOptions){
}), L.tileLayer(tileServerURL+".png", {
maxZoom: 19,
subdomains: ["a", "b", "c"],
attribution: 'Map data © <a href="//www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
attribution: 'Map data © <a href="//www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
})]);
let mapTRA = L.layerGroup([L.tileLayer(tileServerURL.TRA+".png", {
maxZoom: 19,
......@@ -157,7 +158,7 @@ function IGNGeoInitialize(basename,MapOptions){
}), L.tileLayer(tileServerURL+".png", {
maxZoom: 19,
subdomains: ["a", "b", "c"],
attribution: 'Map data © <a href="//www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
attribution: 'Map data © <a href="//www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
})]);
let baseLayers = {
......@@ -165,7 +166,7 @@ function IGNGeoInitialize(basename,MapOptions){
"Plan IGN" : PlanIGN, // <mapScan25>
"Plan / Ortho" : PlanOrtho, // <mapScan25>
"OSM / Ortho" : mapOrthosOSM, // <mapOrthosAdd>
"Street Map (OSM)": mapOSM,
"OpenStreetMap (OSM)": mapOSM,
};
let overlays = {
};
......@@ -257,7 +258,7 @@ function IGNGeoInitialize(basename,MapOptions){
});
}
// ANDROID NOT TESTED
if (typeof ANDROID !== 'undefined' && Android.getVersionCode()) {
if (typeof Android !== 'undefined' && Android.getVersionCode()) {
try {
Android.resolveUserLocation("answer_lat"+basename, "answer_lng"+basename);
} catch (error) {
......@@ -277,7 +278,7 @@ function IGNGeoInitialize(basename,MapOptions){
});
}
// ANDROID NOT TESTED
if (typeof ANDROID !== 'undefined' && Android.getVersionCode()) {
if (typeof Android !== 'undefined' && Android.getVersionCode()) {
try {
Android.resolveUserLocation("answer_lat"+basename, "answer_lng"+basename);
} catch (error) {
......
......@@ -67,6 +67,21 @@
<caption>Map height</caption>
</attribute>
<attribute>
<name>location_mapservice</name>
<category>Location</category>
<sortorder>90</sortorder>
<inputtype>text</inputtype>
<default>0</default>
<help>Activate this to show a map above the input field where the user can select a location</help>
<caption>Use mapping service</caption>
<i18n></i18n>
<readonly></readonly>
<readonly_when_active></readonly_when_active>
<expression></expression>
<hidden>1</hidden>
</attribute>
<attribute>
<name>location_nodefaultfromip</name>
<category>Location</category>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment