mhawksey / wp-evidence-hub

OER Research Hub - WordPress plugin
6 stars 1 forks source link

Option to do something better with evidence that has no location - evidence map [LACE]+ #50

Closed nfreear closed 9 years ago

nfreear commented 9 years ago

Hi,

This issue, like #47 is a use-case for #49.

If you look at the live site, you'll see a cluster of evidence in the sea just west of Africa - below Ghana:

This is evidence that has no location, either because it is global in nature, the location is unknown, or it is simply missing. So it ends up at [ 0, 0 ]. This doesn't look great - it's in the centre of the map, noticeable, and confusing.

I'm proposing an option (and it would be an option) to re-position the evidence off to one side - where it is less noticeable. See the LACE test server for an example:

Most of the work happens in leaflet-map.js, with Javascript configuration added in the PHP.

Thoughts?

Nick

nfreear commented 9 years ago

Hi,

I've put the work for this on a branch,

The test ...

// Test for evidence located at, or v. near to [ 0, 0 ]
var near_zero = function (degrees) {
    return Math.abs(degrees) < 2;
}

//...

if (OERRH.geomap.no_location_latlng && near_zero(coord[0]) && near_zero(coord[1])) {

    // Re-locate ...
mhawksey commented 9 years ago

We should legend the area Limbo ;)

nfreear commented 9 years ago

We did (almost) seriously talk about creating a new location — a new country — an island called EvidĂȘncia....?!

nfreear commented 9 years ago

Deployed to live, 21 May: