Page MenuHomePhabricator

Allow relative mapwidth within mapframe
Closed, ResolvedPublic

Description

The width= parameter of mapframe expects map width in pixel. We would like to give it in percentage of pagewidth (something like width:95%) to allow page-wide maps that are automatically adjusted to the screen size. See current implementation in Russian Wikivoyage:
https://ru.wikivoyage.org/wiki/Блед
(click on "Открыть карту" on the right side of the page)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Atsirlin triaged this task as Medium priority.Apr 2 2016, 3:33 PM

Change 281540 had a related patch set uploaded (by MaxSem):
Allow specifying <mapframe> width as percentage

https://gerrit.wikimedia.org/r/281540

Relative sized windows also significantly improves the usability of these maps on mobile devices, whereas absolute sizes can cause difficulties.

now can use width="50%" and width="500px"

Change 281540 merged by jenkins-bot:
Trims attributes, add width with % to <mapframe>

https://gerrit.wikimedia.org/r/281540

My only concern with this task is that on mobile we might want width=100%, and on desktop, it would be something like 30%. I wonder if mobile should have a special handling for the maps.

@Yurik: I tried it here:
https://ru.wikivoyage.org/wiki/User:Atsirlin/maps
and it does not work. Does the software need more time to update?

Ah, now I understand. It will be in effect on April 12...