1

Topic: EasyMap problems

We have implemented EasyMaps for a few years on http://www.hbrg.org.uk/TRY/TRYmaps.html.
The code is the same for all the links, through a bit of javascript thus:

//<![CDATA[
function showGridmap(tvk)
{
var Gridmap = document.getElementById("OrigMap");
Gridmap.src = 'http://www.brc.ac.uk/schemes/NBNWidget/ … .aspx?tvk=' + tvk + '&bg=VC&ds=GA000495,GA000383,GA000496,GA000499,GA000497,GA001303&gd=100km&zoom=highland&b0from=1900&b0to=2009&b0fill=0000BB&w=200&terms=0&ref=0&link=0&css=http://www.hbrg.org.uk/CommonItems/nbn.css';

var Gridmap = document.getElementById("CurrentMap");
Gridmap.src = 'http://www.brc.ac.uk/schemes/NBNWidget/ … .aspx?tvk=' + tvk + '&bg=VC&ds=GA000495,GA000383,GA000496,GA000499,GA000497,GA001303&gd=100km&zoom=highland&b0from=1900&b0to=2050&b0fill=00BB00&w=200&terms=0&ref=0&link=0&css=http://www.hbrg.org.uk/CommonItems/nbn.css';
}
//]]>
</script>

That is called by the hyperlinks e.g.

<a title="Acalitus longisetosus" href="javascript:%20showGridmap('NHMSYS0020703336');">Birch Felt-mite Gall</a>

<a title="Phragmidium bulbosum" href="javascript:%20showGridmap('NHMSYS0001493534');">Bramble Rust Fungus (1)</a>

I have chosen these examples deliberately, as the first one, LH map, gives the error ‘Your request could not be completed because of the following errors.  No data returned for the criteria you have specified’.

The other shows a blank map, as I would want, and as happened originally under G4.

The links for the two Uromyces also give the error, while the Knopper also shows a blank map.

The problem, therefore - why do some calls give an error and others do not, despite neither having any records that meet the request?

Also, the RH map intermittently fails in both instances with an identical error as above, but with the ‘No data …’ line in small blue font rather than the large black.  Clicking the link again once or twice, or doing a manual reload of the iframe, will load the RH map correctly (but this never happens with the LH map).

Please identify the problem(s), and allow a blank map to be displayed in all cases if no records exist, and investigate why there should be that intermittent display of an error when clearly no error exists.

Identical behaviour in Opera and Chrome.

Murdo

2

Re: EasyMap problems

The issues you describe here are a lot of separate issues;

Maps not returning with any data and presenting an error message, this is exactly what it says on the tin, no records where returned. I have taken this down to a warning so it doesn't stop processing the page now and should return a blank map. I haven't figured out a reasonable way of displaying the warnings at the moment however as they can be useful but can't be put on by default due to the fact that this service is already being used and thus would change the output for some people.

Blank maps being returned, a blank map was in fact not being returned, there is a record in one of the provided datasets, but you have zoomed into an area which excludes that record, so you in effect are getting a blank map in this case by zooming into an area which doesn't contain the record. The issue here is that datasets are listed as containing data on the map when they are displaying data which isn't in the given bounding box. I have resolved this as only datasets with data in the bounding box will show up now, but this would have resulted in an error as before, however this issue has been already been resolved as above.

I have yet to see an error occur on your site as of yet, I will keep trying but as of yet I haven't seen anything happen so its a little difficult to diagnose the problem until I do.

The error message you are getting on the RH map, sounds like its occurring after the CSS has been applied, hence the message, but this is tied up with the problem above and I can't really act on it until I can see it happening. I will keep trying in the mean time however.

Matt

Matt Debont
Application Developer
Joint Nature Conservation Committee, Monkstone House, City Road, Peterborough PE1 1JY, UK

3

Re: EasyMap problems

Thanks Matt.  The display seems now to be acceptable.

I am unable to generate the error in the RH map myself just now, but it was happening frequently with different links in 2 different browsers and on two different machines yesterday.  I will let you know if it recurs.

Murdo