Commit fadf94c4 authored by Vincent Dubois's avatar Vincent Dubois

Correction style element proche + ajout d'un php intermédiaire pour overpass (server a définir)

parent c73b0b8f
......@@ -160,7 +160,7 @@ class Geocropping {
* @memberof Geocropping
*/
_app_server_interpreter_list: IDictionary<string> = {
Principal: "https://overpass-api.de/api/interpreter",
Principal: "/overpass-interpreter.php",
//Français: "https://api.openstreetmap.fr/oapi/interpreter", HS
//'Vi-di fr': "https://overpass.osm.vi-di.fr/api/interpreter" HS
};
......@@ -1235,7 +1235,7 @@ class Geocropping {
let isFar = this._app_display_far ? '_far' : '';
// A été invalidé
if (this._featureDisplayedAround[feature.id] && tags.fixme) {
if (/**this._featureDisplayedAround[feature.id] &&*/ tags.fixme) {
// noir
style = $.extend({}, this[`_style_invalid${isFar}`]); // $.extend pour ne pas modifier les valeur de base (ne pas faire une référence)
}
......@@ -1266,6 +1266,7 @@ class Geocropping {
} else {
style.weight = 3;
}*/
console.log(feature.properties.id, feature.properties.tags, style);
return style;
}
this._geoJSONLayers = L.geoJSON(null, {
......
......@@ -37,7 +37,7 @@ var Geocropping = (function () {
this._map_minZoom = 10;
this._map_maxZoom = 19;
this._app_server_interpreter_list = {
Principal: "https://overpass-api.de/api/interpreter",
Principal: "/overpass-interpreter.php",
};
this._app_distance_search = 20;
this._app_distance_hide = 55;
......@@ -650,7 +650,7 @@ var Geocropping = (function () {
var year = dateOld.getUTCFullYear();
dateOld.setUTCFullYear(year - 2);
var isFar = _this._app_display_far ? '_far' : '';
if (_this._featureDisplayedAround[feature.id] && tags.fixme) {
if (tags.fixme) {
style = $.extend({}, _this["_style_invalid" + isFar]);
}
else if (!dateVerified && dateChange < dateOld) {
......@@ -666,6 +666,7 @@ var Geocropping = (function () {
style = $.extend({}, _this["_style_ok" + isFar]);
}
}
console.log(feature.properties.id, feature.properties.tags, style);
return style;
};
this._geoJSONLayers = L.geoJSON(null, {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
$data = http_build_query($_REQUEST);//$_REQUEST['data'];
$baseUrl = 'https://overpass-api.de/api/interpreter';
$url = "$baseUrl?$data";
// informations nécessaire pour le requete
$options = [
'http' => [
'method' => 'GET',
'ignore_errors' => true
]
];
$str = file_get_contents($url, false, stream_context_create($options));
foreach($http_response_header as $key=>$header){
header($header);
}
echo($str);
Markdown is supported
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