Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

How to implement new look in osModule #44

Open
StefanNovakMP opened this issue Nov 9, 2023 · 1 comment
Open

How to implement new look in osModule #44

StefanNovakMP opened this issue Nov 9, 2023 · 1 comment

Comments

@StefanNovakMP
Copy link

Hi,

I am interested in implementing this style of OpenStreetMap: https://github.com/Zverik/leaflet-grayscale
But I am not sure how to do it.
It is impossible to do it by the module administration.
Would you be so kind as to guide me on how to do it?

Thank you very much in advance.

Stefan

@efduggan
Copy link

Basically, I think you're going to have to modify the osModule code, which is written in PHP.

I believe you want to edit line 235 of helper.php. The change might look like this:

$js .= "var baselayer".$id." = new L.TileLayer.grayscale('".$baselayerURL."', {".$baselayerSettings.$nowarp."attribution: '<a href="https://www.openstreetmap.org/copyright\" target="_blank">© OpenStreetMap contributors'});\n";

Note the reference you provided (https://github.com/Zverik/leaflet-grayscale) also suggest adding this option fadeAnimation: false

If you're not a coder, then you may want to find/hire someone who can do this customization work for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants