Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

maps question 2 weeks 3 days ago #1

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
I'm running webtrees 2.1.7 and the rural theme. I have been able to add maps using geographic data and it is a terrific feature. I was impressed with the way it was presented on the tab and how easy it was to implement. But I have a question: I would like for the map to be larger and to be able to click on it and open it in a tab using _blank.

Is the size of the map set by css? Is it something I can change?

The question about opening another is a bit more complicated. Any suggestions would be appreciated.

Folks, the more I work with webtrees the better I like it. This is a great application. Thank you for all you have done.

Carter

Please Log in or Create an account to join the conversation.

maps question 2 weeks 3 days ago #2

  • photon flip
  • photon flip's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 80
Hi Carter,
I'm thinking that instead of making the map bigger - it's limited by the block width - what about having a full-screen button. There is a module for the interactive chart that adds a full-screen button, I wonder if it would be possible for someone to adapt one for the map?
As for opening in a new window or tab, I duplicate the current window into a new tab or window - I have dual monitors that so I can see then side by side which is great. The windows run independently so you can branch off in different directions.
I agree, webtrees is an amazing piece of software and getting better all the time. Fantastic work by Greg Roach and others.

MurrayJ

Please Log in or Create an account to join the conversation.

maps question 2 weeks 3 days ago #3

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
Thanks for your reply, Murray. I have learned some more: when an individual has more than one place, the map is enlarged to show all places on a single map. I added the button for the interactive tree and like how it works. Also, I think there is an advantage to having consistency in the way things work across the site.

My initial response is that the button is probably a good solution. I'm going to play around with it on the interactive tree and make sure. Wonder how difficult it would be to adapt the module for maps?

Thanks again for your response.

Carter

Please Log in or Create an account to join the conversation.

maps question 2 weeks 2 days ago #4

  • hermann
  • hermann's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 667
btw: maybe you can add a review of webtrees at www.gensoftreviews.com/?p=1244
Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.7 (all custom modules installed, php 8.1, MySQL 5.7) @ ahnen.hartenthaler.eu

Please Log in or Create an account to join the conversation.

maps question 2 weeks 1 day ago #5

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
Done

Please Log in or Create an account to join the conversation.

maps question 2 weeks 1 day ago #6

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
i've been looking at the files in the full screen interactive button modules and realize I know nothing about coding modules. Wonder if there is someone who would be willing to mentor me?

Please Log in or Create an account to join the conversation.

maps question 2 weeks 1 day ago #7

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374
webtrees uses the Leaflet library for rendering the maps. There are a couple of fullscreen plugins available but to install any of them you'll need to understand how to use npm to import and compile the javascript code.

BTW the map code can be found in resources/js/webtrees.js
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

Last edit: by ddrury.

maps question 2 weeks 1 day ago #8

  • hermann
  • hermann's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 667
In the German webtrees manual, there is a rudimentary chapter about developing modules in general: wiki.genealogy.net/Webtrees_Handbuch/Ent...klung_eigener_Module

Maybe you can use the translation function of your browser to read it.
Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.7 (all custom modules installed, php 8.1, MySQL 5.7) @ ahnen.hartenthaler.eu

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

maps question 2 weeks 1 day ago #9

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 16475
It might be possible to do this using CSS.

Use a button to toggle a class (e.g. wt-map-fullscreen), which sets position absolute, width/height 100%, etc.

This technique might work on other charts, too.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

maps question 2 weeks 1 day ago #10

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
Thanks to each of you for your response. I have begun trying to educate myself on what will be needed to accomplish this.

Please Log in or Create an account to join the conversation.

maps question 1 week 2 days ago #11

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

maps question 6 days 20 hours ago #12

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 16475
I haven't had time to test this PR, but it looks as if it uses full-screen for the map in the same way that video-players use full-screen.

Is this what is desired? I presumed that users would want the entire chart (including the sidebar with facts/births) shown. i.e. similar to the way the interactive tree has a "full screen" mode.

I was thinking of a more generic solution that worked in a similar way to this.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

maps question 6 days 19 hours ago #13

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
Actually this sounds better than what I envisioned. Keeping the sidebar with a full screen map would be great and then toggling back and forth to hide/show the rest of the screen would exceed my hopes. I'll be glad to test if that would help.

Thank you, Greg and All.

Please Log in or Create an account to join the conversation.

maps question 6 days 19 hours ago #14

  • photon flip
  • photon flip's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 80
Greg, makes a good point about the side-bar but the same information and working links as the side-bar are there on clicking the map icons so perhaps the sidebar is not essential.
I think either way would work well.

MurrayJ

Please Log in or Create an account to join the conversation.

maps question 6 days 4 hours ago #15

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374

I presumed that users would want the entire chart (including the sidebar with facts/births)


Simple, as we pass the element to be fullscreened to the fullscreen function just change the element - for the maps
webtrees.fullScreen(document.getElementById(id).parentElement);

instead of
webtrees.fullScreen(document.getElementById(id));

See image

BTW the plugin (Which I abandoned!) had the full screen control icon attached to the zoom control making a run of three icons. I've left it separate but it's simple to change. Any preference?

...always assuming Greg accepts the PR
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by ddrury. Reason: Forgot example image

maps question 6 days 4 hours ago #16

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374
BTW, leaflet has a Sidebar plugin which looks nifty, put the current sidebar in that? I'll explore if anyone fancies it
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

maps question 5 days 19 hours ago #17

  • charris
  • charris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 24
You guys are amazing. I like it with the sidebar and links. The image looks good to me.

Please Log in or Create an account to join the conversation.

maps question 5 days 18 hours ago #18

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374
Just for the hell of it in the interactive tree module, I added the following line to resources\views\modules\interactive-tree\chart.phtml at about line 23
<li id="tvbfullScreen" class="tv_button" onclick="webtrees.fullScreen('tv_tree')" title="<?= I18N::translate('View Fullscreen') ?>"></li>

It successfully makes the tree fullscreen but reveals a minor problem in that the default background colour for fullscreen mode on as far as I can see on all browsers is black so a bit of css is needed.
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

Last edit: by ddrury.
  • Page:
  • 1
Powered by Kunena Forum