NERC-CEH / fit-count-app

Fit Count App & Website
Apache License 2.0
0 stars 0 forks source link

Portugal FIT Counts map feature to PT webpage #189

Closed CCarvell closed 3 months ago

CCarvell commented 7 months ago

Joao and the Portugal team have asked for a live mapping feature similar to what Elisabeth has in Germany https://www.ufz.de/spring-pollination/index.php?en=49254 to link to the new PT webpage https://www.pollinet.pt/fitcount

They have also asked about the possibility of having the data table of counts below the map as in the UKPoMS (https://ukpoms.org.uk/fit-counts-map). I am not sure if this part is more complex or if it sets a difficult precedent for other countries with their own website?

@andrewvanbreda - David Roy is aware of this and was going to assign it to you but I cannot seem to tag him directly in this issue.

andrewvanbreda commented 7 months ago

Hi Claire,

I THINK you can still tag people by typing @DavidRoy even if Github doesn't pick up the person, they will still get a mail...I think anyway. I am not an admin on Github, so I can't add people to projects.

I guess I have some questions.

What is https://www.pollinet.pt/fitcount?

Is it even a Drupal site? Is it a site with just text on it? or is it a site that allows data entry? Does it have Indicia on it?

I guess the main question is whether https://www.pollinet.pt/ is a Drupal site that we can get access to.

I think what you want is probably fairly easy, providing we can put Indicia onto https://www.pollinet.pt/, assuming that all the data you want is in the BRC Warehouse.

A data table would be fairly easy in theory. The problem though is counting seems to be very slow. At times the UKPoMS map is very slow at the moment. However I am sure there is a way around this, even if it means pre-calculating the counts or something. I guess that element could be a tag tricky. That speed issue would be a problem at the moment for making it a homepage, we have got away with this at the moment because the map isn't the UKPoMS homepage. (I have mentioned this to Martin, I think speed improvement is on list for future consideration)

As for a precedent. Well I think it essentially just means that we (or someone) would need to do this same thing for any website that wants it. So anyone who wants it would need to give access and there would need to be budget for it. It may be issue if not a Drupal site (I remember once upon a time people were talking about having Indicia work on WordPress, but I am not sure if that ever became a real thing) So I guess it could be an issue if someone sees that someone else has a map, then says they want one too, but then we find their site isn't suitable for Indicia. Perhaps everyone uses Drupal, I don't know.

BirenRathod commented 7 months ago

@andrewvanbreda My initial investigation suggests that it was built using wix.com. Wix uses its built-in framework. I don't think that is a fit for Indicia if they don't use a similar framework/language of Drupal or WordPress.

andrewvanbreda commented 7 months ago

@BirenRathod I wonder if it would be possible to use a frame (I think called iFrame), where the page is loaded into a frame page from another page/site. I think I would of used one of these years and years ago, but I can't remember enough about them to comment on the suitability of this for a report. What do you think?

Thanks for the info by the way.

BirenRathod commented 7 months ago

@andrewvanbreda It is possible but implementation is needed at their end. We use it for some of our websites.

andrewvanbreda commented 7 months ago

Hi again @CCarvell, As you may of seen with my discussion with Biren, there is likely a difficulty because these websites have not been made with Drupal so are not compatible with Indicia in its current form. There is a possibility of running the report inside a window but have it run on another site, but it is so long since I have done something like that, that I can't really comment, unless that was investigated further. I guess if you are keen to see if we can go about doing that, then I could do some investigation under PoMS support budget. Let me know if you want me to check how this works further.

FLOWerLabUC commented 7 months ago

Many thanks all! Just to clarify, the https://www.pollinet.pt/fitcount will be landing page of FITCount PT version (it is still under development) where it would be nice to have the map with all the records from Portugal. The webpage was made by our team in Wix. We are not experts on web development, but are totally open to trying to implement any solution from our side.

DavidRoy commented 7 months ago

I'm not sure why this became so complicated so quickly!

As Claire's original post shows, we want to replicate the approach used for Germany - i.e. an iFrame to https://fitcount.ceh.ac.uk/external/summary-map. For Germany = https://fitcount.ceh.ac.uk/external/summary-map?filter-indexed_location_list=216020 To filter to Portugal will require the right indexed_location_list

@FLOWerLabUC you need to setup an iFrame on your website. e.g. https://www.w3schools.com/html/html_iframe.asp

FLOWerLabUC commented 7 months ago

@DavidRoy it seems a good solution. We will figure it out from our side on how to setup an iFrame to our website.

andrewvanbreda commented 7 months ago

@DavidRoy I think the complication was caused by me trying to remember how things work. There was also the suggestion of a table with counts in addition to this.

In terms of a table, I think if that was needed it would be another iFrame, and then we would need to make sure the FIT Count reports could accept outside access using a parameter. Currently outside access would be blocked because the access to the site's report is limited by Drupal role, so we would need to create a new page unless you already have one I don't know about.

FLOWerLabUC commented 7 months ago

Dear all, any news about on how to implement the German approach to the Portuguese map? We are finalizing the PT webpage (https://www.pollinet.pt/fitcount) and launch a press release next Monday, and it would be nice to have the map. @andrewvanbreda If you send us the iFrame code with the right indexed_location_list we can implement it. Many thanks in advance.

andrewvanbreda commented 7 months ago

Hi @FLOWerLabUC @DavidRoy,

To get an iframe to work for portugal you need this

However there is an issue with this. The map this points to has a fixed centre and zoom, so unless you scroll the map, Portugal is off the edge of the map. The current fixed settings are @initialLat=51.1657 @initialLng=10.4515 @initialZoom=5

I am not sure those values can be supplied as parameters in the URL, but I will have a look at the code (in an emergency we could create another map page, but that isn't really a very elegant solution)

FLOWerLabUC commented 7 months ago

Thanks @andrewvanbreda ! Let's hope you can find a solution after having a look at the code.

andrewvanbreda commented 7 months ago

Hi @FLOWerLabUC,

I have got this to work by altering the code. Please give this a try...

FLOWerLabUC commented 7 months ago

Many Thanks @andrewvanbreda! We have been able to add it: https://www.pollinet.pt/fitcount