Page MenuHomeMiraheze

Configuration Kartographer on lebork.miraheze.org
Closed, ResolvedPublic

Description

lebork.miraheze.org

Please add the following lines to your LocalSettings.php file:

$wgKartographerStyles = '';
$wgKartographerDfltStyle = '';
$wgKartographerSimpleStyleMarkers = '';

This change will allow markers to be displayed correctly on the map.

Event Timeline

Herald added subscribers: Unknown Object (User), Unknown Object (User), Reception123. · View Herald TranscriptFeb 3 2023, 15:52

Hi there, you didn't give any values, anyway, these configurations are set on our LS.php file already, but we definitely need to update the default values, when this is done, everything should work fine.

@Ugochimobi If you want to do it don't feel afraid of claiming it.

Sorry, there was an error in my post.
Please add only this line: $wgKartographerSimpleStyleMarkers = '';
The value should be empty . This should display the marker built into Kartographer and not the one from openstreetmaps.

I prefer it when a system administrator assigns it to me :)

Sorry, there was an error in my post.
Please add only this line: $wgKartographerSimpleStyleMarkers = '';
The value should be empty . This should display the marker built into Kartographer and not the one from openstreetmaps.

We'd have to add that for your wiki only.

That's what I mean. On my wiki lebork.miraheze.org

And is it possible to change Kartographer files only on my wiki?
On the wiki that I have on my server (not miraheze) I set a slight change in the Kartographer files so that when adding a map to the wiki, the user would already have a different map zoom and location set.
The change includes one file in the Kartographer extension. It involves changing the default values to something else.

@danielg28 We don't make changes to the extension's code, the LocalSettings change we can do, however.

True is the default value, yes. This task, however is asking for the value to be set to false in order to use Kartographer's markers instead of OSM's (https://phabricator.miraheze.org/T10430#210082). This is achieved by setting that variable to false. Per settings.js at Kartographer:

// Disable hosted marker functionality
		if ( !mw.config.get( 'wgKartographerSimpleStyleMarkers' ) ) {
			L.Icon.Default.imagePath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Kartographer/lib/external/mapbox/images/';
			L.icon = function () {
				return new L.Icon.Default();
			};
		}

This is checking if the variable is set to false.

True is the default value, yes. This task, however is asking for the value to be set to false in order to use Kartographer's markers instead of OSM's (https://phabricator.miraheze.org/T10430#210082). This is achieved by setting that variable to false. Per settings.js at Kartographer:

// Disable hosted marker functionality
		if ( !mw.config.get( 'wgKartographerSimpleStyleMarkers' ) ) {
			L.Icon.Default.imagePath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Kartographer/lib/external/mapbox/images/';
			L.icon = function () {
				return new L.Icon.Default();
			};
		}

This is checking if the variable is set to false.

Makes sense.

OK thank you. When will the changes take effect?
I refreshed the browser, cleared the cache. No effects so far.

OK thank you. When will the changes take effect?
I refreshed the browser, cleared the cache. No effects so far.

I can confirm that they're working perfectly.

unfortunately it's not perfect. Change gun and markers are visible but not displayed as they should. The lower part of the marker is cut off. The fault lies in the Cartographer's files. But that doesn't bother me.
Now the markers are visible but the map tiles are not visible.
despite the settings:
'wgKartographerDfltStyle' => [
'default' => '.',
],
the address to the map tiles is different, so they don't show up.
Now the address of the map tile is:
https://tile.openstreetmap.org/osm-intl/14/9000/5218.png?lang=pl

and it should be like this:
https://tile.openstreetmap.org/./14/9000/5218.png?lang=pl

when you go to my website, you can't see the map -> https://lebork.miraheze.org/wiki/ZKM_Linia_1

Should I start a new thread as this one is marked as resolved?

OrangeStar closed this task as Resolved.EditedFeb 5 2023, 12:04

Reason for that is unrelated to this task, but will get fixed when Ugochimobi's PR is merged.

Edit: "fixed" -> "merged"

Cool !
Thank you very much.
Maps now load correctly.

Additional question:
Anyone know where to report bugs in the Kartographer module itself? I mean the marker display.
It would also be useful to set the area of the displayed map in the Kartographer settings.
Thanks again for solving the problem.

The extension is on Wikimedia's version control, so I think Wikimedia's Phabricator is where bug reports should be filled. There's a Kartographer project there, add it to the task when creating it.