raster.setUrl('<?php echo $datafile;?>');
$('#forms').on('submit',function(e) {
$.ajax({
url:'fun.php',
data:$('#forms').serialize(),
type:'GET',
success:function(result){
$('#downloads').html(result);
}
});
e.preventDefault();
});Sure I will and thank you!
Ok great...
I'm convinced the problem is either in the data being returned by your Ajax call, or how you are calling the update function.
Can you post a sample output from fun.php here or would you prefer to converse off list (if this is a closed project?). I can't help more without seeing this
That is fine. The output of the php file is simple. It simply generates urls of files in the server, according to users form input and if the file exists, outputs the $datafile (file url for leaflet imageOverlay), links to download file, next and back buttons to navigate files, and a legend.
Thank you very much Abel, it is now working perfectly. I had to remove these lines to work properly.
I did this.
I did the following after fiddling a bit based on what you said.
var map = L.map('map', {center: [-1.01069, 32.91504],zoom: 8,minZoom: 6,maxZoom:16,