Template talk:Map compare

From OpenStreetMap Wiki
Jump to navigation Jump to search

Hidden attribution

@Minh Nguyen: excellent work on this template! Minor thing: the attributions of both layers are anchored to the bottom-right corner which means that the left layer's attribution is hidden unless you slide the slider all the way to the right? Maybe it can help if the attribution for the left layer is placed on the bottom-left corner? —seav (talk) 04:38, 14 June 2023 (UTC)

@Seav: Good catch. Unfortunately MapLibre doesn't make it easy to move the built-in attribution control to another corner. I guess it's leaving space for the MapLibre logo, which we aren't displaying. Looks like I'll have to implement a custom attribution control. – Minh Nguyễn 💬 16:06, 14 June 2023 (UTC)
@Seav: Fixed. By default, the attribution is now on the left side for the left map and the right side for the right map. I also added an option to override the position, in case a page needs to show the attribution at the top of the comparison. – Minh Nguyễn 💬 02:18, 15 June 2023 (UTC)
@Minh Nguyen: awesome! —seav (talk) 03:21, 15 June 2023 (UTC)