fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
454 stars 298 forks source link

Pedigree Map not obeying "Do not use maps" option #3080

Closed ddrury closed 2 years ago

ddrury commented 4 years ago

Control panel - Map - Map provider can set an option "Do not use maps" but the Pedigree map module has no code to take account of it.

(The place hierarchy & places tab do obey it)

Would it be better to give the place hierarchy module it's own local option and leave the others permanently enabled?

fisharebest commented 4 years ago

Perhaps there is a more general solution...?

Many modules have certain requirements. For example, the reports require the php-xml library, the fanchart requires the php-gd library.

So, if the module interface included a function along the lines of areRequirementsMet(), then we could suppress ones that won't work.

The pedigree map would then need to declare a dependency on there being a mapping provider.

ddrury commented 4 years ago

function along the lines of areRequirementsMet()

Sounds like a good idea, however, if the place hierarchy is to retain it's current functionality then it would still need an option to enable/disable map usage

fisharebest commented 4 years ago

If the place hierarchy is to retain it's current functionality then it would still need an option to enable/disable map usage

You mean this?

https://github.com/fisharebest/webtrees/blob/2.0.2/app/Http/Controllers/PlaceHierarchyController.php#L89

Or is there something else?

ddrury commented 4 years ago

Yep, that's what I meant

ddrury commented 4 years ago

BTW, I've implemented a method of providing different map providers using modules, but I don't want to create a pull request yet, particularly if you fundamentally disagree with the way I've gone about things, howabout I give a summary of what I've done on slack and we could go from there?

fisharebest commented 2 years ago

Fixed by #4166