0

I have a MapBox map of points, with a column called "iframe_link", where there's a different link for each point. I made an iframe that works for one page, but I want to open an iframe for each point.

I'm using the following line of code to try to open the links as an iframe, and it's not working:

'<iframe src="e.features[0].properties.iframe_link"</iframe>'

Any thoughts?

1 Answer 1

1

It looks like you're trying to insert the value of e.features[0].properties.iframe_link into a string in JavaScript? If so, you have to concatenate the strings like so:

'<iframe src="' + e.features[0].properties.iframe_link + '"</iframe>'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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