Page MenuHomePhabricator

Allow relative mapwidth within mapframe
Closed, ResolvedPublic


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:Блед
(click on "Открыть карту" on the right side of the page)


Related Gerrit Patches:
mediawiki/extensions/Kartographer : masterTrims attributes, add width with % to <mapframe>

Event Timeline

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

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

MaxSem claimed this task.Apr 4 2016, 10:02 PM
MaxSem moved this task from Unsorted to General on the Maps (Kartographer) board.

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

Deskana added a subscriber: JMinor.Apr 4 2016, 10:09 PM
Yurik closed this task as Resolved.Apr 5 2016, 7:04 PM

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

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

Yurik added a comment.Apr 5 2016, 7:06 PM

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:
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...