1

Topic: Novice looking for help.

Hi,

I'm a volunteer for a small charity called "The Tortoise Table" and we host a database of various flora for tortoise owners (often it's helping people know what can be fed from their backgardens). We were originally using your EasyMap service and are now looking to reimplement the maps due to the atlas update.

I have taken upon myself again to do this - I have some basic coding knowledge (through from some years ago now) and have been stumbling through your JavaScript examples. Unfortunatly I'm having a few difficulties and was wondering if you can provide insight.

This main difficulty is with the colour by facets, specifically the "facetname, cutpoints", I would like to generate a colour range by the data age. I was wondering if you are able to provide a working example I can look over as unfortunately I'm having no luck with the API documentation example.

Also I've noticed some of the taxonomic keys are associated differently now at the genus level (this is part of the difficulty with EasyMap, some of our plant records are at the genus level). So I think I'm correct in saying I can longer use keys to return all genus species, and instead need to use q=genus:"name"?

Many thanks! and apologies if anything is unclear.

Jon

2

Re: Novice looking for help.

Hi Jon,
Have you tried https://easymap.nbnatlas.org?
It replicates much of the old EasyMap functionality.
-D

3

Re: Novice looking for help.

Hi Duncan, I have yes, thank you!

I was having trouble using the taxonomic keys for genera using the EasyMap shim. I noticed that genus taxonomic keys only return a few records, where they used to return all species records (I assumed this might be to do with how the records are uploaded now). For example, if I search Malva on nbnatlas.org, it shows "Malva" has 62 occurances out of a total of 45,206 Malva search result occurances.

I was looking at using the WMS static map instead to search with q=genus:name, however I was having trouble changing the baselayer (to a white baselayer) from the ALA geoserver.

I'm more than happy to use/learn JS Leaflet, your examples are very helpful.

Jon

4

Re: Novice looking for help.

Hi Jon,

This:
   

https://records-ws.nbnatlas.org/occurrences/search?q=lsid:NHMSYS0000460576

Returns the correct value (I think, 19798 totalRecords)

This (which to my understanding should return the same)

https://records-ws.nbnatlas.org/occurrences/search?q=*:*&fq=lsid:NHMSYS0000460576

Only returns 62.

It's certainly a bug (perhaps in EasyMap).
I will ask and see what might be the cause (perhaps because it's a genus?).
I could update EasyMap to reflect this (unless it's better fixed in the API?)

All the best,
   -Duncan.

p.s. it's does work as expected when the lsid is a species:

https://records-ws.nbnatlas.org/occurrences/search?q=lsid:NHMSYS0000080188

vs

https://records-ws.nbnatlas.org/occurrences/search?q=*:*&fq=lsid:NHMSYS0000080188

both return 165082.

5

Re: Novice looking for help.

Much appreciated Duncan.

I can see a similar call is used on nbnatlas.org when a count of 62 is returned

records.nbnatlas.org/occurrences/search?q=Malva&fq=taxon_name%3A"Malva"

Yes no problem whatsoever with species!

Thanks for looking into it.

Jon

6

Re: Novice looking for help.

Thanks Jon,
I've started a discussion on GitHub about it, look there for updates, and I'll post back here once it's resolved.
https://github.com/nbnuk/nbnatlas-issues/issues/254
Atb, :D

7

Re: Novice looking for help.

Hi Jon,
   we decided it is better to change EasyMap, so this should work as expected now:
https://easymap.nbnatlas.org/EasyMap?tv … p;retina=2
   Essential problem was that q queries do extra work that fq don't do.
   For reference, it's in the github discussion :)
   Hope that helps,
      -Duncan.

8

Re: Novice looking for help.

p.s. If anyone wants to now regenerate an image (e.g. one displaying a genus, which will likely now have changed) you can force this to happen by appending &cachedays=0 to the url. This will cause the image and html page to expire immediately in the cache (by default this occurs every month) and so both will be recreated. N.B. It's important not to generally use this flag as it will cause your website to be very slow since it will not be making use of the caching.

9

Re: Novice looking for help.

Hi Duncan

Perfect! Thanks so much. I'll go ahead set the cachdays to 0 for the genera I've been using, and be sure not to include it as standard.

Also, I'm really sorry to be a pain, but are you able to provide a working example for "facetname,cutpoints" from WMS GetMap API documentation? I really can't seem to get it to work - maybe it's much more involved?

Thanks again for all your help.

Jon

10

Re: Novice looking for help.

Hi Jon,
   I have the "facetname,cutpoints" working I think:
https://duncanrowland.github.io/NBNMapO … flet4.html
   Source code is here:
https://github.com/DuncanRowland/NBNMap … flet4.html
   The important bit is...
ENV: "colormode:year,1000,1999,2000,2009,2010,2017;opacity:1.0"
   Hth, -D.

11

Re: Novice looking for help.

Thanks so much Duncan, I had "color"mode as "colour"mode.....doh!!! :)

Really appreciate all the help!

Jon

12

Re: Novice looking for help.

No worries :)
FWIW, In the api the spelling of color varies :(
"colormode - facet colouring type."
Atb, -D