I am looking for a way to replace the default attribution of my map by an image. I am trying to add a static legend to my map this way.

Any idea how this could be done?


Instead of replacing the default attribution, which is not an elegant approach, I would create a new custom control to display my legend. What if on next version ol3 change the behaviour of attribution???? You would need to change your code. Creating a custom control is not that hard. Check my fiddle it is a working example, though it is not perfect as I just wrote it to show you the way and not provide the solution. Good luck, hope to help you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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