I have pulled out the popup data into a function that can be passed in to LBLD just as JSONparser is passed in. This lets users create whatever output they want for their API data without affecting LBLD.
This is what the default function looks like:
This is how a custom display can look like:
function popupDisplay(obj) {
var popup_content = "";
// if (image_url) popup_content += "<img src='" + options.host + image_url + "' class='popup-thumb' />"; // not available in the api yet
popup_content += "<h5><a href='https://publiclab.org" + obj.url + "'>@" + obj.title + "</a></h5>";
popup_content += "<div>Joined " + obj.created_at + "</div>";
return popup_content
}
I will be using this in LEL for the PLpeople layer.
I have pulled out the popup data into a function that can be passed in to LBLD just as JSONparser is passed in. This lets users create whatever output they want for their API data without affecting LBLD.
This is what the default function looks like:
This is how a custom display can look like:
I will be using this in LEL for the PLpeople layer.