Hello,
I'm trying to open an external link from a SimpleDataLayer popup. Therefore I need to edit the 'sandbox' property from the popup Iframe, and set it to 'allow-popups allow-popups-to-escape-sandbox'. Below is what I found in the SimpleDataLayer docs.
"This simple data layer uses the popup template class to display KML balloons or feature properties as a table. By default, all content rendered in the popup will be sandboxed inside of an iframe as a security feature. However, there are limitations:
- All scripts, forms, pointer lock and top navigation functionality is disabled. Links are allowed to open up in a new tab when clicked.
- Older browsers that don't support the
srcdoc
parameter on iframes will be limited to rendering a small amount of content.
If you trust the data being loaded into the popups and potentially want these scripts loaded into popups be able to access your application, you can disable this by setting the popup templates sandboxContent
option to false."
Unfortunately, it only explains it is possible to set this option, but never explains how. So, I tried making my own popup, where I can set the sandbox property to whatever I want. I linked the popup to the SimpleDataLayer, but now, there's two popups. I would like to disable the original popup that came with the SimpleDataLayer.
In the Azure Maps SimpleDataLayer docs I read the following:
"In addition to styling features, the SimpleDataLayer
provides a built-in popup feature with a popup template. The popup displays when a feature is clicked. The default popup feature can be disabled, if desired."
Once again, it says it is possible, but does not explain how. I looked everywhere in the SimpleDataLayer options and properties, but could not find anything. I also looked for an onClick event in map.events that could explain how it's opening the popup, but there's none to be found.
In the end, all I want is to be able to open external links from a popup form a SimpleDataLayer, if I'm doing this the wrong way, overcomplicating it, please tell me how to do it the right way.
Thanks in advance.