BiologicalRecordsCentre / plantportal

Focused repo for the Plant Portal website
0 stars 0 forks source link

Adding aerial mapping to squares and plots for spatial navigation #46

Closed NPMSSupport closed 2 years ago

NPMSSupport commented 2 years ago

@andrewvanbreda @sacrevert I realise this is quite a major ask, but it is something that has definitely come out of today's troubleshooting sessions. People are finding it very hard to get a bearing where they are when using the open map base mapping only. I believe this is one we can find budget for if needs be.

sacrevert commented 2 years ago

@andrewvanbreda presumably adding the google earth backdrop switch for all maps is straightforward?

@NPMSSupport the alternative is presumably for people to use grid refs collected via GPS in the field? There is no absolute requirement to set up plots online before going out and seeing what is possible/where plots can actually be established

andrewvanbreda commented 2 years ago

@sacrevert Very very simple on a technical level to add the layers. The snag is the site needs a Google API key otherwise you will get "For development purposes only" written all over the maps. I see the NPMS site has that key. I do not know what your policy is for using keys on sites. Alternatively we could use one of the other options, all the options are OpenStreetMap Google Physical Google Streets Google Hybrid Google Satellite Bing Aerial Bing Hybrid Big Shaded Bing Ordinance Survey Dynamic (OpenStreetMap > Ordnanc Survey Leisure > Google Satellite) Dynamic (OpenStreetMap > Google Satellite) OpenTopoMap OS Leisure OS Outdoor OS Road OS Light OS Night

It would be down to @BirenRathod to comment on what should happen with keys on your sites as there maybe charges depending on site traffic as far as I understand.

BirenRathod commented 2 years ago

@andrewvanbreda I can add one for this website. If charges occur, it will pass on to project code. is that ok @sacrevert?

sacrevert commented 2 years ago

@BirenRathod Yes, thanks! Please use 06730 Task 1 for any charges

BirenRathod commented 2 years ago

@sacrevert I don't have to use that project code. you need to use it by yourself. The reason I asked because you should not be restricted to use it. Also, Generally payment could be made via Creditcard or Debitcard on Google.

sacrevert commented 2 years ago

OK, fine. Well, obviously if i do need to enter project details anywhere, then I expect you'll let me know.

BirenRathod commented 2 years ago

@andrewvanbreda & @sacrevert I have now added the Google API key.

andrewvanbreda commented 2 years ago

@BirinRathod Thanks Biren, I got an error when activating the layers which surprised me. I will try again later or tomorrow, I think it is because it may have not activated yet or something.

BirenRathod commented 2 years ago

@andrewvanbreda Could be, Try tomorrow.

andrewvanbreda commented 2 years ago

Hi @BirenRathod I am still getting the error, screenshot of it below. I looked up and the general consensus on the internet seems to be that similar messages are a problem with the credentials. The obvious one I can think of is has Plant Portal been allowed to the list of allowed URLs on the API key settings?

Error

BirenRathod commented 2 years ago

@andrewvanbreda It was not a allowed URLs problem but it was the way I added URL was the problem. I amended now, so should work.

andrewvanbreda commented 2 years ago

@sacrevert @NPMSSupport Have change system to be as similar to NPMS as possible, minus the Ordinance Survey layer which I don't think is setup with a key for Plant Portal. Close if happy, or leave open and let me know if Ordinance Survey layer required.

andrewvanbreda commented 2 years ago

@BirenRathod Thanks for the fixes in regard to this issue

sacrevert commented 2 years ago

@andrewvanbreda it would be good to add OS mapping, but not urgent

BirenRathod commented 2 years ago

@andrewvanbreda I have already added API key for OS map.

andrewvanbreda commented 2 years ago

@BirenRathod Ok thanks. I will look at this again when I get chance.

andrewvanbreda commented 2 years ago

Hi @BirenRathod Just trying to have a looking at this again.

I have a problem where I can't enable Ordinance Survey maps because when I do, then the screen goes red with question marks, NPMS live is doing this too. The development tab is saying the request is unauthorised. There is an OS key, is it perhaps out of date.

BirenRathod commented 2 years ago

@andrewvanbreda The OS key used on PlantPortal website is not any longer valid. Not sure, where does it come from? Anyway I have updated with now new one, see if that works.

andrewvanbreda commented 2 years ago

@BirenRathod Thanks Biren that is working now, so I will be able to meet Oli's requirement for an OS map layer.

However there is another issue that I need to deal with. If Google Maps are used, the system isn't zooming correctly when we require. Is it possible to add a Bing key so I can give those layers a go? Let me know if that isn't a quick job to setup. Cheers

BirenRathod commented 2 years ago

@andrewvanbreda That Google Maps zooming porblem has been resolved by @johnvanbreda. Not sure, how uptodate your code of iform module, so please check first with him or update iform module with the latest code.

andrewvanbreda commented 2 years ago

@BirenRathod Oh ok, thanks for letting me know, I hadn't realised that.

andrewvanbreda commented 2 years ago

Hi @johnvanbreda See Biren's comment. Is zooming fix for Google Maps? It isn't working on my machine running master iForm/client_helpers/media e.g. dynamic location doesn't zoom to location using a google map

johnvanbreda commented 2 years ago

I can't remember the specific fix @BirenRathod is talking about, but on iRecord, if I edit one of my locations, it does zoom in OK to the site boundary and shows the Google layer (using the dynamic layer which switches from OSM to OS then Google depending on how far you zoom in).

andrewvanbreda commented 2 years ago

@sacrevert @NPMSSupport Can you check the site. I have added the default layer as Open Street Map->Google Satellite on the pages which have the problem. This fixes the zoom issue but also allows satellite viewing at low levels. As we have some pages with squares, and some zoomed further with plots, I felt this gave a more consistent presentation than the layer john suggested in our particular case. The change has been made to Plot Maintenance View Square Edit Square (admin page) All 3 data entry pages.

Can you check this is all ok as you would want on Plant Portal live? If it is I think we need to add these changes to the main NPMS site which is also having the same issue.

sacrevert commented 2 years ago

@SarahSaxifrage @andrewvanbreda looks good to me, however, I think it would be better to switch to Google sooner on the square maps, as you have to zoom in quite far to get that point currently. Perhaps it would be better to dynamically switch to Google around the point at which the 1 km square fills the users's map screen, or just after.

By the way, can you tag @SarahSaxifrage rather than NPMSsupport in these Plant Portal issues, as it is Sarah who deals with this at Plantlife, not Rachel (@NPMSSupport ). Thanks!

NPMSSupport commented 2 years ago

Thanks @sacrevert Though useful to see update on this, as @andrewvanbreda said, main NPMS site having these issues. Hopefully these changes will apply/work there also.

andrewvanbreda commented 2 years ago

@NPMSSupport @sacrevert Yes NPMS will be fixed one I get the options to set the zoom level for switching to the satellite view to work. It is the same problem, so will get the same fixes.

andrewvanbreda commented 2 years ago

@SarahSaxifrage @sacrevert The fixes for this are now completely deployed to Plant Portal, but not NPMS yet.

SarahSaxifrage commented 2 years ago

I've just had a look and seems to be working nicely. Thanks.

andrewvanbreda commented 2 years ago

Hi @BirenRathod,

I need to deploy some code to NPMS, but you have quite a few pending deployes to live also. Is it OK for me to deploy those to live? or alternatively can you let me know once you have deployed.

Cheers

BirenRathod commented 2 years ago

@andrewvanbreda I'm in the process of resolving that old issue and let you know soon.

BirenRathod commented 2 years ago

@andrewvanbreda I have released your code including pending updates on live now. Also, resolved old problem which was occurred due to old 'Blog' module was restricting to update on live on & test.

andrewvanbreda commented 2 years ago

@BirenRathod Brilliant thanks :)

andrewvanbreda commented 2 years ago

@sacrevert @NPMSSupport This is live on NPMS. Close if happy, or comment further.

NPMSSupport commented 2 years ago

Thanks @andrewvanbreda Just checked and all looking good and working. Thanks so much for working on this! Closing