diff --git a/examples/layer/map.wmscapabilities.html b/examples/layer/map.wmscapabilities.html
index 68fc4195..ac3c9e63 100644
--- a/examples/layer/map.wmscapabilities.html
+++ b/examples/layer/map.wmscapabilities.html
@@ -109,7 +109,7 @@
ol-ext: WMS Capabilities control
target: document.body,
srs: ['EPSG:2154'],
cors: true,
- optional: 'token',
+ optional: 'token,apikey',
services: {
'BRGM': 'https://geoservices.brgm.fr/geologie',
'OSM': 'https://wms.openstreetmap.fr/wms',
diff --git a/examples/routing/map.control.isochrone.html b/examples/routing/map.control.isochrone.html
index a90aee1f..6301ccc9 100644
--- a/examples/routing/map.control.isochrone.html
+++ b/examples/routing/map.control.isochrone.html
@@ -115,8 +115,8 @@ ol-ext: Geoportail isochrone
search.on('isochrone', function(iso) {
if (!batch.length && iso.iteration === 0) vector.getSource().clear();
+ // Simplify using closing operation with jsts
if (Number($('.simplify').val())) {
- // Simplify using closing operation with jsts
var simpli = Number($('.simplify').val());
var parser = new jsts.io.OL3Parser();
var geom = iso.feature.getGeometry();
@@ -126,6 +126,7 @@ ol-ext: Geoportail isochrone
buffered = jsts.simplify.DouglasPeuckerSimplifier.simplify(buffered, Math.min(10, simpli/10))
iso.feature.setGeometry(parser.write(buffered));
}
+ console.log(currentFeature)
vector.getSource().addFeature(iso.feature);
setTimeout(function() {
map.getView().fit(vector.getSource().getExtent(), { duration:1000 });
@@ -147,10 +148,12 @@ ol-ext: Geoportail isochrone
/* BATCH mode: load a geojson file */
var batch = [];
var current_iteration = 0;
+ var currentFeature = null;
var dialog = new ol.control.Dialog();
map.addControl(dialog);
function dosearch() {
+ currentFeature = null;
if (!batch.length) {
dialog.hide();
return;
@@ -166,6 +169,7 @@ ol-ext: Geoportail isochrone
var pt = batch[0].getGeometry().getFirstCoordinate();
var val = search.get('method')==='distance' ? search.get('distance')*1000 : (search.get('hour')||0)*60*60+(search.get('minute')||0)*60;
if (val) {
+ currentFeature = batch[0];
search.search(pt, val, current_iteration-1)
} else {
batch = [];
@@ -182,6 +186,12 @@ ol-ext: Geoportail isochrone
current_iteration = search.get('iter')+1;
dosearch();
});
+
+ // Restart after error
+ function reRun() {
+ current_iteration++;
+ dosearch();
+ }