Geographic Information Systems Asked by Suka on May 13, 2021
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))
});
feature.setStyle(style);
sourceVector.addFeature(feature);
}
popupcontentstring
is the variable with the content for the popup. That I will replace with a AJAX request.
I hope that is the solution for my question: https://github.com/walkermatt/ol-popup/issues/217#issuecomment-646630464
Answered by Suka on May 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP