Skip to content

Commit

Permalink
fixes and docs for enkeltminner (ref #132)
Browse files Browse the repository at this point in the history
  • Loading branch information
atlefren committed Nov 11, 2015
1 parent c07da3e commit 04ff7a8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
11 changes: 11 additions & 0 deletions api_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ The DatasetWrapper passed to the DatasetLoader is a wrapper around the Dataset o
| loadWhenLessThan | dict | null | no | If set, with params ``count`` (int) and ``callback`` (function) will call callback when there are less than count features on the map, callback is called with ``map``, ``dataset`` and ``features`` |
| allowTopic | bool | false | no | For Norvegiana-datasets: should the user be able to set a "topic" in the generator |
| feedbackForm | bool | false | no | Should the dataset display a feedback-form when viewing an item in the sidebar? |
| showEnkeltminner | bool | true | no | Applies to ra sparql, and requires loadWhenLessThan to be set. Queries for enkeltminner when clicking on polygon |
| enkeltminner | enkeltMinneOpts| defaults | no | See, sets style for enkeltminne |

***toPointOptions***

Expand All @@ -88,6 +90,15 @@ This is a dict, with style properties:
fillcolor and bordercolor may also be a function that takes a feature and returns a hex string (in the form #RRGGBB)


***enkeltMinneOpts***
Options for enkeltminne

* style: a leaflet style dict (default: {color: '#fff', weight: 1, fillColor: '#B942D0'};)
* sidebarColor: color used in sidebar (default: #B942D0)
* provider: providertext for sidebar (default: "Enkeltminer")
* template: template used for sidebar render (default: /templates/datasets/ra_enkeltminne.tmpl)


***KR.setupMap***

The ``KR.setupMap`` is a utility-function for setting up a map with datasets and options. The signature is
Expand Down
2 changes: 1 addition & 1 deletion common/js/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ KR.Config = KR.Config || {};
color: '#fff',
weight: 1,
fillColor: '#B942D0'
}
};

enkeltMinneLayer = L.geoJson(null, {
onEachFeature: function (feature, layer) {
Expand Down
5 changes: 3 additions & 2 deletions dist/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,7 @@ KR.Config = KR.Config || {};
color: '#fff',
weight: 1,
fillColor: '#B942D0'
}
};

enkeltMinneLayer = L.geoJson(null, {
onEachFeature: function (feature, layer) {
Expand Down Expand Up @@ -3609,7 +3609,8 @@ KR.Config = KR.Config || {};
count: 10,
callback: kulturminneFunctions.loadKulturminnePoly
},
description: 'Data fra Riksantikvarens kulturminnesøk'
description: 'Data fra Riksantikvarens kulturminnesøk',
showEnkeltminner: false
},
'brukerminner': {
name: 'Kulturminnesøk - brukerregistreringer',
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/scripts3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -2534,7 +2534,7 @@ KR.Config = KR.Config || {};
color: '#fff',
weight: 1,
fillColor: '#B942D0'
}
};

enkeltMinneLayer = L.geoJson(null, {
onEachFeature: function (feature, layer) {
Expand Down Expand Up @@ -2954,7 +2954,8 @@ KR.Config = KR.Config || {};
count: 10,
callback: kulturminneFunctions.loadKulturminnePoly
},
description: 'Data fra Riksantikvarens kulturminnesøk'
description: 'Data fra Riksantikvarens kulturminnesøk',
showEnkeltminner: false
},
'brukerminner': {
name: 'Kulturminnesøk - brukerregistreringer',
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts3d.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scripts_external.js

Large diffs are not rendered by default.

0 comments on commit 04ff7a8

Please sign in to comment.