1

Topic: EasyMaps (Beta) for NBN Atlas

As just announced in the NBN News, there is a new EasyMaps shim for the Atlas, currently in beta. This can be found at https://easymap.nbnatlas.org/. The link on that page to original easy map functionality documents the available parameters in full. I mention that as I overlooked it initially.

Jim Bacon.

2 (edited by chrisjohnson 06-04-2017 16:21:00)

Re: EasyMaps (Beta) for NBN Atlas

Thank you Jim.
This is really appreciated. I'll test it and post some feedback.

Christine

3

Re: EasyMaps (Beta) for NBN Atlas

All credit to Duncan for this. I'm just spreading the word.
Jim.

4

Re: EasyMaps (Beta) for NBN Atlas

Hi Duncan,
I've managed to get EasyMaps to work with the zoom set to Outer Hebrides and also with a national map.
The UK map looks little distorted, but it is OK as a temporary fix.

Unfortunately the maps won't work where there is a TVK mismatch, this is a fundamental problem which needs resolution before further attention can be given to mapping issues.

However, I can replace some of the maps on one of our websites, so thank you for getting us partially up and running again.

Christine

5

Re: EasyMaps (Beta) for NBN Atlas

Hi Chris,
   I've added a tvk lookup for people that are using synonyms, wasn't something I was aware of.
   Can you clarify 'a little distorted'?
   All the best,
      -Duncan.

6

Re: EasyMaps (Beta) for NBN Atlas

Hi Christine

You can distort the maps if you supply both a height and a width... might you have done that? Specify one only and the proportions should be correct.
Duncan, the default, with no height and width, defaults to 350x350 which is also distorted, i.e. not the aspect ratio of the bounding box.

Jim.

7

Re: EasyMaps (Beta) for NBN Atlas

Hi Jim,
   yes 350x350, that's what it said in the original documentation, I thought it was a bit odd :)
   I think it works best if you specify either a w(idth) or a h(eight), but not both.
   That way it calculates the other one for you to maintain the aspect ratio of the lat,lons.
   Atb, -D.
p.s. Also, I think it looks best if you generate on image that is too large and scale it down in the browser.

8

Re: EasyMaps (Beta) for NBN Atlas

Oh, yeah, and I think the problem with the TVKs that Christine refers to is that some of them are wrong or just plain missing. See the thread on accuracy of import for extensive discussions on the problem.
Jim.

9

Re: EasyMaps (Beta) for NBN Atlas

WRT: tvk, oh right. I was just referring to synonyms.
i.e.
https://species-ws.nbnatlas.org/species … 0000875588
Says that the tvk 'NHMSYS0000875588' is a synonym and the accepted one is 'NHMSYS0000875481'

Consequently:
https://species.nbnatlas.org/species/NHMSYS0000875588 = 0 records (as it's 'not accepted')
https://species.nbnatlas.org/species/NHMSYS0000875481 = 1047 records.

EasyMap now maps to accepted.

Atb, -D.

10 (edited by chrisjohnson 07-04-2017 16:02:13)

Re: EasyMaps (Beta) for NBN Atlas

Thank you both.
I now understand why the UK map appears distorted, I need to set a w or h value. I'd included this on the Outer Hebrides map which is OK, so I should be able to resolve the problem.

Apologies for the confusion, as Jim explained the TVK problem is not due to synonyms, but neverthelessa useful piece of information.

Christine

11

Re: EasyMaps (Beta) for NBN Atlas

Hi Chris,
You might find it looks best to set the w to be twice the width specified for the image in the img
e.g. the 200 and the 400 in the following from the release notes (https://easymap.nbnatlas.org/):
<img width="200px" src="https://easymap.nbnatlas.org/Image?tvk=NHMSYS0000344177&w=400&ds=GA000012&b0fill=ff0000"></img>
That way, the image will be scaled down when it's displayed and I've found this can make it look nicer. If the w value is going to be larger than 800 though, it will get clamped, so best to limit it to that.
Hth, -:D

12

Re: EasyMaps (Beta) for NBN Atlas

Duncan - Any reason why the service is limited to generating 800px wide maps? I can see a use for these at a slightly higher  resolution.

Mark Pollitt
SWSEIC (formerly DGERC)

13

Re: EasyMaps (Beta) for NBN Atlas

Hi Mark, it's only because that's what the original EasyMap service was limited to, and the goal in developing the shim was to replicate that original functionality.

14

Re: EasyMaps (Beta) for NBN Atlas

Thanks Duncan

Can I therefore make a request that this be extended to larger format maps? Given that screen resolutions have moved on significantly since easymaps was first launched I would have thought that it is likely that some users replacing the functionality on their websites would welcome the ability to create maps at higher resolution.

For many the easymaps service will be the simplest way to create familiar looking distribution maps customised for their specific area. The new web services may be infinitely more powerful and capable of generating interactive maps but this will be beyond the capabilities of many and the new maps may not be to everyone's taste.

MARK

Mark Pollitt
SWSEIC (formerly DGERC)

15

Re: EasyMaps (Beta) for NBN Atlas

Hi Mark,

   I've added a *test* feature 'retina' (and by 'test' I mean, it's outside the scope of the original easymap shim, so if it breaks something, or otherwise causes trouble I will need to remove it, so please don't rely on it just yet for anything mission critical, but do feel free to test it and feedback any issues).

   The retina value can be either 1 or 2):

   Setting it to 1 will do nothing (and is the default, so no need to include it).
   Setting it to 2 will double the resolution of the returned image.

e.g.
   

https://easymap.nbnatlas.org/Image?tvk=NBNSYS0000005108&w=790

   Image will be 790 pixels wide.

   

https://easymap.nbnatlas.org/Image?tvk=NBNSYS0000005108&w=790&retina=2

   Image will be 1580 pixels wide.

   The w parameter itself is still clamped to 800.
   So we'll have to see if works ok, but it shouldn't effect existing urls.

Atb, -Duncan.

16

Re: EasyMaps (Beta) for NBN Atlas

Hi Duncan - this was working when I first tested it but now appears to have stopped working and just displays the same size retina argument is added or not.

MARK

Mark Pollitt
SWSEIC (formerly DGERC)

17

Re: EasyMaps (Beta) for NBN Atlas

Hi Mark,
   I think it is working. I've added some javascript that halves the display size when showing the retina image. This means that the images will look the same size on a web page (as specified by the w,h parameters) whether shown as retina or not (although the retina image are still actually twice the resolution). If you want the image shown at its native size, then you can just access the image itself and embed that to your site (rather than the easymap html page).
i.e.
https://easymap.nbnatlas.org/EasyMap?tv … p;retina=2
vs
https://easymap.nbnatlas.org/Image?tvk= … p;retina=2
Hth, -D.

18

Re: EasyMaps (Beta) for NBN Atlas

Thanks Duncan

I see what you've done now. However it still therefore leaves us with the 800px limit, which is rather small for many standard website block dimensions nowadays.

MARK

Mark Pollitt
SWSEIC (formerly DGERC)

19

Re: EasyMaps (Beta) for NBN Atlas

e.g.

https://easymap.nbnatlas.org/Image?tvk= … p;retina=2

Will have a 2x800 width (totals: Image (PNG Image, 1600 × 2191 pixels)).

I think that should be large enough?

p.s. The reason I'm reluctant to change the limits is that it would break the original api specification (and that is what the shim was created to replicate).

20

Re: EasyMaps (Beta) for NBN Atlas

Hi
In the list of datasets that EasyMaps repots there always seems to be 'Unknown' at the bottom. If there really are records of unknown provenance in the system that may need checking out but, if this is just some unnecessary artefact, perhaps it could be removed.
Jim.

21

Re: EasyMaps (Beta) for NBN Atlas

Thanks Jim. Odd one, it returns an 'Unknown' record in the list of datasets, but its occurrence count is 0. I've removed any datasets like this from the list, so should be fixed now I think. Atb -D.