Topic on Help talk:Extension:Kartographer

Map jumps continents between Preview and Save

8
Mathglot (talkcontribs)

I'm having a problem displaying a map generated by a <mapframe> which links to an OSM map via a wikidata id.

I created a Talk subpage at w:Talk:Anatolia/Maps to use as an illustration of a message I was going to add at the Rfc going on at w:Talk:Anatolia. This subpage has four maps using the Extension. All four maps show images of Anatolia (Turkey), with slightly varying zooms (4 or 5) and different aspect ratios. The first three are all simple, straight <mapframe> type maps, but the fourth one is a <mapframe> which links to an OSM map that has a wikidata property, and points to wikidata's Central Anatolia item. This fourth map is not displaying correctlyā€”most of the timeā€”but sometimes it does.

The first three always display correctly. However the fourth one which links to a Central Anatolia map created at w:OpenStreetMap (here) and is linked through the OSM wikidata property Q155526, and links to "Cenral Anatolia Region" as d:Q155526 is acting flakey.

The first three maps all look fine, both in Preview, and after Saving. However, two funny things are going on with the fourth map, that links through OSM and Wikidata:

  1. I usually have to hit "Preview" button twice or more, in order to visualize it. The first time, I usually just get a gray rectangle for the fourth one (the other three above it are always fine).
  2. After I hit "Publish", the fourth map displays, but it's no longer of Anatolia region (Turkey) anymore, instead, it shows a section of northern Africa centered on Algeria, and the containing box is twice as tall as it was.

If you look at the 4th map by viewing the page w:Talk:Anatolia/Maps, that's probably what you will see now, i.e. Algeria. But if you edit the page, and hit the "Show Preview" button a sufficient number of times, it will probably show Algeria several times in a row in Preview, and then at some point it will jump back to showing a map that looks just like the top one of Anatolia, except that the central portion will be shaded, matching the OSM map showing Central Anatolia shaded. (The last time I tried this, I had to give up and Cancel out once, then try again and "Preview" seven times before it "jumped" back to Anatolia, and showing the shaded border created by the OSM map.)

What is going on here? Why is it jumping back to Antatolia in Preview, but only rarely, and why, when I save the page, does it always show Algeria? (Please {{Ping}} me upon reply.) ~~~~ (hand stamped: May 12, 2018, 09:00 (UTC) )

Evad37 (talkcontribs)

@Mathglot: The saved page displaying differently to the previewed page (when the preview works) is probably phab:T193455 -- automatic zoom and centering only works on page preview.

Evad37 (talkcontribs)
Mathglot (talkcontribs)

@Evad37: Thanks. So, if I explicitly add the lat/long and zoom level in the <mapframe> tag, it should work? In that case, can someone please change the documentation, as the page shows examples which exclude everything in the <mapframe> except text and zoom. See "State of Colorado" examples at Help:Extension:Kartographer section "Markers".

Mathglot (talkcontribs)

Yep, I tried it, and that fixed it. Must be phab:T193455 as you said. Thanks again.

Mathglot (talkcontribs)

That's strange, I could've sworn that all the floated maps (w:Talk:Anatolia/Maps) were draggable and zoomable, but now they're not, unless you full-screen them first. Am I imagining that they were before?

Evad37 (talkcontribs)

@Mathglot: I think it's only in previews that non-full-screen maps are draggable and zoomable.

Mathglot (talkcontribs)

Very possibly that's what I remember; thanks. I can see this has a learning curve and takes some getting used to. But still, great product, looking forward to using it more and getting to know it; I'm sure as time goes on, various issues will be ironed out.

Reply to "Map jumps continents between Preview and Save"