klokantech / bmarchives-tickets

BMArchives Request/Issue Tickets Tracker
1 stars 0 forks source link

Georeferencer integration - a button to georeference a map should be available on the detail page of the map #2

Closed klokan closed 11 years ago

klokan commented 11 years ago

All pages with details about items, e.g. /items/show/xxxxx.

There should be a new button close the Twitter, etc buttons - allowing with one click to go to Georeferencer. The button should lead people to georeferencing interface for not-yet georeferenced map and to visualisation for already georeferenced maps.

This way people can find the maps with Search/Browse on www.bmarchives.org and georeference only those which are interesting for me - instead of random maps from the http://www.bmarchives.org/georeferencer/.

klokan commented 11 years ago

You need to make a JSONP query.

We need to implement:

ADVANCED LINK

In case you want to display/hide a button depending on the status of the map in Georefrencer system it should be done with a JavaScript function which will use extra JSONP query (for example with jQuery).

This way request from JavaScript will allow non-blocking update. Even in case of unavailability of our Georeferencer servers, the webpage performance is not going to be affected.

Such JavaScript function should be included in the page code only for maps!

An example map datail page where should be the Georeference button: http://www.bmarchives.org/items/show/100204094

Is available in the Georeferencer itself at: http://bmarchives.georeferencer.com/map/v3s7pnqhta4OeyW715O1UR/201212141032-Cs0ETG/visualize

The JSONP query is going to look like:

http://bmarchives.georeferencer.com/id/100204094/state?callback=foo

The call tells you 'georeferenced' or 'ungeoreferenced' or 'not_found'.

For the first two states we need to display a button georeferencer-banner-link-small.png from http://help.georeferencer.com/design on the page with a link to: http://bmarchives.georeferencer.com/id/100204094

If 'not_found' is returned, then the button should not be visible, because the map is not part of the georeferencer system.

Technically we could display two different buttons depending on the answer - either "Help us to locate this map" or "View this map in 3D" or the link can be hidden if the identifier does not exist in Georefrencer. But for now lets just put there one or no button.

klokan commented 11 years ago

The API is documented also at http://help.georeferencer.com/api

o1da commented 11 years ago

It works and it is deployed, but please tell me exactly where should I place the icon.

klokan commented 11 years ago

I suggest to add a title: "This map in Google Earth / Maps:" with the orange "Georeferencer" button bellow. This all should be displayed only for the maps available in Georeferencer pilot in the place of the "Share this item with:", which will move slightly down. After this is done, please close this ticket.

o1da commented 11 years ago

It is done.