Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target for attribution links differs between maps #2616

Merged
merged 1 commit into from
Sep 23, 2014

Conversation

fredj
Copy link
Member

@fredj fredj commented Sep 17, 2014

In some cases (for instance Bing maps terms of use) the attribution link is opened in a new tab or window (target=_blank) while in other cases (like OSM) the links open in the same window.

I think they should all open in a new window (or all NOT in a new window if that is what is preferred). At least it should be the same for every map. Maybe the best option would be to make it a choice whether you want the attribution links to open in a new window.

@Eupeodes
Copy link
Author

for now I fixed it with the following code (using query 2):

setTimeout(function(){
    $("a[href^='http://']").attr('target','_blank');
}, 1000);

Without the timeout this would be called before the map was loaded, I guess time can be shorter

@fredj
Copy link
Member

fredj commented Sep 17, 2014

Please review.

@Eupeodes
Copy link
Author

looks good to me

@fredj
Copy link
Member

fredj commented Sep 23, 2014

ping @tonio any opinion on this?

@tonio
Copy link
Member

tonio commented Sep 23, 2014

Fine to me not to use target, please merge, thanks.

fredj added a commit that referenced this pull request Sep 23, 2014
Target for attribution links differs between maps
@fredj fredj merged commit 7dcb54f into openlayers:master Sep 23, 2014
@fredj fredj deleted the attributions-target branch September 23, 2014 12:46
@fredj
Copy link
Member

fredj commented Sep 23, 2014

thanks @tonio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants