Is there a solution to fill a popup with content getting from a AJAX call, without JQuery in OpenLayers 5?

The content is in *.txt files, or I can handle it to send the content as a JSON or HTML via PHP script. I searched for a solution to send all the data for all the popups not by the first web page call, but only when a popup is opened.

My code:

var feature = new ol.Feature({
    type: 'click',
    desc: popupcontentstring,
    geometry: new ol.geom.Point(ol.proj.fromLonLat(coordarray_coord))

popupcontentstring is the variable with the content for the popup. That I will replace with a AJAX request.

  • This is not GIS or GIS software related question and as such more suitable for StackOverflow. – TomazicM Jun 18 at 19:04

I hope that is the solution for my question: https://github.com/walkermatt/ol-popup/issues/217#issuecomment-646630464

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.