I have a variable called "places ". Is there any way i can pass my own variable values into places when an event listener is clicked. My concept is shown below. Pardon me if this is not possible. Thanks a lot.
var places = {
'type': 'FeatureCollection',
'features': [
{
'type': 'Feature',
'properties': {
'name': 'Trailer 1', // change this value from Trailer 1 to Trailer 2
'title': 'Trailer 1',
},
'geometry': {
'type': 'Point',
'coordinates': [lg13, lt13] // change this value to lg1 and lt1
}
}
]
};
************************* Event Listener ********************************
checkbox_1.addEventListener('click', function(e) {
//change the values in places
}, false)