Topic on Help talk:Extension:Kartographer

Thumbmail maps with geomasks

5
Summary by Thiemo Kreuz (WMDE)
Dipsacus fullonum (talkcontribs)

If coordinates and zoom are not specified for maps with geomasks, the static thumbmail map seems to be generated all zoomed out (zoom=0) which makes the thumbmail map pretty useless. It works fine for the same maps with geoshapes instead of geomasks. Please see examples in my Wikipedia sandbox at User:Dipsacus fullonum/sandbox/geoshape. Is this a known issue and is there a workaround?

Thiemo Kreuz (WMDE) (talkcontribs)

That's a really good example page, thanks for that! The reason for this behavior is how masks are implemented: as inverted shapes. A mask is just a shape that covers the entire world – with a hole. That's what the automatic zoom feature sees and why it shows the entire world. While it might be possible to improve the automatic zoom to understand this better I don't think anyone can assign resources to this at the moment.

TheDJ (talkcontribs)
Ponor (talkcontribs)

@Thiemo Kreuz (WMDE) @TheDJ Such a shame that this isn't working, there are multiple examples on enwiki (collapsed boxes here e.g.) that are showing this bug. But why Dipsacus' examples 1, 2 & 4 seem OK while I'm editing their sandbox (code) and previewing either in real time or by pressing the preview button? And why are they not working in a completely different way when editing in VisualEditor?

Thiemo Kreuz (WMDE) (talkcontribs)

The maps are generally rendered in two surprisingly different ways: Either as a dynamic map in your browser or as a static image. The wikitext preview works because it is done in your browser and doesn't involve the broken code mentioned in phab:T305121.

The issue we see in VisualEditor is very closely related, if not the same. VisualEditor generally has a very hard time doing anything with non-trivial maps.

Reply to "Thumbmail maps with geomasks"