Modification of the attribution link to open in a new window

My web application incorporates Open Street Maps through an iframe. As a result, if the user clicks on the “Data by OpenStreetMaps” link, opens within my application. I would rather the website open in a new window. Is there a way to modify the attribution link to open the OpenStreetMaps website in a new window?

I think you need to create a custom attribution link, like I do with the edit map link on

PermaLink = new OpenLayers.Control.Permalink('test', '');
PermaLink.element.textContent = 'Edit map';

Thanks for the tip! However, wouldn’t this just add another link? I’m still stuck with the problem of users clicking the old link and having the OpenStreetMaps website come up inside my application window.

Is there a way to turn off the default attribution link once I’ve added a custom attribution link?

Yes, this adds another link, but the original attribution link is created only if you add

new OpenLayers.Control.Attribution()

to the map definition. So just remove that line and add the new permalink and you’re done :slight_smile:

Thank you so much! You’d think I would have noticed that line of my code when I first started working on this problem…