Skip to content

Commit

Permalink
merge master (ref #132)
Browse files Browse the repository at this point in the history
  • Loading branch information
atlefren committed Nov 27, 2015
2 parents 8fdfdc6 + cf0e52b commit c109be1
Show file tree
Hide file tree
Showing 40 changed files with 1,433 additions and 274 deletions.
11 changes: 8 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ module.exports = function (grunt) {

'build-demos': {
files: grunt.util._.map(getNonUrlDemos(), function (demonstrator) {

if (grunt.util._.has(demonstrator, 'params')) {
var _ = grunt.util._;
if (_.has(demonstrator, 'params')) {
return {
file: 'demonstratorer/' + demonstrator.id + '.html',
method: function (fs, fd, done) {
Expand Down Expand Up @@ -104,8 +104,13 @@ module.exports = function (grunt) {
demonstrator.desc = '';
}

var scripts = ['dist/scripts_external.js', 'dist/scripts.min.js'];
if (_.has(demonstrator, 'extraScripts') && _.isArray(demonstrator.extraScripts)) {
scripts = scripts.concat(demonstrator.extraScripts);
}

demonstrator.inline_js = fs.readFileSync('demonstratorer_content/' + demonstrator.id + '.js', 'utf8');
demonstrator.scriptLinks = ['dist/scripts_external.js', 'dist/scripts.min.js'];
demonstrator.scriptLinks = scripts;
demonstrator.cssLinks = userConfig.demoCssExternal.concat(['dist/style.css']);

var pageTemplate = getTemplateFromFile('./grunt_templates/new_demo.html.tpl', fs);
Expand Down
6 changes: 1 addition & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@
"esri2geo": "https://github.com/calvinmetcalf/esri2geo.git",
"L.TileLayer.Kartverket": "1.0.2",
"Leaflet-MiniMap": "https://github.com/Norkart/Leaflet-MiniMap.git#~2.2.0",
"KNreiseAPI": "1.7.19",
"KNreiseAPI": "1.7.22",
"cesium-minimap": "0.0.2",
"cilogi-marker": "https://github.com/cilogi/cilogi-marker.git",
"leaflet.knreise-markers": "https://github.com/knreise/Leaflet.knreise-markers.git",
"leaflet-draw": "~0.2.4",
"Leaflet.TileLayer.PouchDBCached": "https://github.com/MazeMap/Leaflet.TileLayer.PouchDBCached.git#0.1.0",
"fontawesome": "4.4.0"
},
"resolutions": {
"fontawesome": "4.4.0",
"KNreiseAPI": "1.7.20"
}
}
10 changes: 5 additions & 5 deletions bower_components/KNreiseAPI/.bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "KNreiseAPI",
"version": "1.7.20",
"version": "1.7.22",
"description": "Api wrapper for KNreise",
"authors": [
"Atle Frenvik Sveen <[email protected]>"
Expand All @@ -26,14 +26,14 @@
"proj4": "~2.3.6"
},
"homepage": "https://github.com/knreise/KNReiseAPI",
"_release": "1.7.20",
"_release": "1.7.22",
"_resolution": {
"type": "version",
"tag": "1.7.20",
"commit": "30f8269e845ba81341ab6e71afe8fcc44216c6c7"
"tag": "1.7.22",
"commit": "a61bd879b433e7c95136f7a0fbb0bff85d38f923"
},
"_source": "git://github.com/knreise/KNReiseAPI.git",
"_target": "1.7.20",
"_target": "1.7.22",
"_originalSource": "KNreiseAPI",
"_direct": true
}
2 changes: 1 addition & 1 deletion bower_components/KNreiseAPI/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "KNreiseAPI",
"version": "1.7.20",
"version": "1.7.22",
"description": "Api wrapper for KNreise",
"authors": [
"Atle Frenvik Sveen <[email protected]>"
Expand Down
92 changes: 56 additions & 36 deletions bower_components/KNreiseAPI/dist/KNreiseAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,8 @@ var KR = this.KR || {};
KR.SparqlAPI = function (apiName, options) {
'use strict';

var license = options.licenseText || 'http://data.norge.no/nlod/no';

var BASE_URL = options.url;

if (typeof proj4 !== 'undefined') {
Expand Down Expand Up @@ -1308,6 +1310,10 @@ KR.SparqlAPI = function (apiName, options) {
}
attrs.title = attrs.name;

if (!attrs.license) {
attrs.license = license;
}

if (_.has(item, 'point')) {
return KR.Util.createGeoJSONFeatureFromGeom(
_parseGeom(item.point),
Expand Down Expand Up @@ -1356,7 +1362,6 @@ KR.SparqlAPI = function (apiName, options) {

function _parseEnkeltminnePoly(response, errorCallback) {
var bindings = response.results.bindings;
console.log(bindings);
return bindings;
}

Expand All @@ -1380,23 +1385,31 @@ KR.SparqlAPI = function (apiName, options) {
return;
}

var query = 'select distinct ?id ?name ?description ?loccatlabel ?img ?thumbnail (SAMPLE(?point) as ?point) ?url as ?link {' +
' ?id a ?type ;' +
' rdfs:label ?name ;' +
' <https://data.kulturminne.no/askeladden/schema/beskrivelse> ?description ;' +
' <https://data.kulturminne.no/askeladden/schema/lokalitetskategori> ?loccat ;' +
' ?p <https://data.kulturminne.no/difi/geo/kommune/' + dataset.kommune + '> ;' +
' <https://data.kulturminne.no/askeladden/schema/geo/point/etrs89> ?point .' +
' ?loccat rdfs:label ?loccatlabel .' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid)' +
' BIND(bif:concat("http://www.kulturminnesok.no/kulturminnesok/kulturminne/?LOK_ID=", ?lokid) AS ?url)' +
' optional {' +
' ?picture <https://data.kulturminne.no/bildearkivet/schema/lokalitet> ?id .' +
' ?picture <https://data.kulturminne.no/schema/source-link> ?link' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid)' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=600&rs=0&pg=0&sr=", ?lokid) AS ?img)' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=75&rs=0&pg=0&sr=", ?lokid) AS ?thumbnail)' +
' }';
var query = 'select distinct ?id ?name ?description ?loccatlabel ?locartlabel ?orglabel ?img ?thumbnail (SAMPLE(?point) as ?point) ?url as ?link ?picture ?picturelabel ?picturedescription ?picturelicence { ' +
' ?id a ?type ; ' +
' rdfs:label ?name ; ' +
' <https://data.kulturminne.no/askeladden/schema/beskrivelse> ?description ; ' +
' <https://data.kulturminne.no/askeladden/schema/lokalitetskategori> ?loccat ; ' +
' <https://data.kulturminne.no/askeladden/schema/lokalitetsart> ?locart ; ' +
' <https://data.kulturminne.no/askeladden/schema/AnsvarligOrganisasjon> ?org ; ' +
' ?p <https://data.kulturminne.no/difi/geo/kommune/' + dataset.kommune + '> ; ' +
' <https://data.kulturminne.no/askeladden/schema/geo/point/etrs89> ?point . ' +
' optional { ?loccat rdfs:label ?loccatlabel .} ' +
' optional { ?locart rdfs:label ?locartlabel .} ' +
' optional { ?org rdfs:label ?orglabel .} ' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid) ' +
' BIND(bif:concat("http://www.kulturminnesok.no/kulturminnesok/kulturminne/?LOK_ID=", ?lokid) AS ?url) ' +
' optional { ' +
' ?picture <https://data.kulturminne.no/bildearkivet/schema/lokalitet> ?id . ' +
' ?picture <https://data.kulturminne.no/schema/source-link> ?link . ' +
' ?picture rdfs:label ?picturelabel . ' +
' ?picture dc:description ?picturedescription . ' +
' ?picture <https://data.kulturminne.no/bildearkivet/schema/license> ?picturelicence . ' +
' BIND(REPLACE(STR(?link), "http://kulturminnebilder.ra.no/fotoweb/default.fwx\\\\?search\\\\=", "") AS ?linkid) ' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=600&rs=0&pg=0&sr=", ?linkid) AS ?img) ' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=75&rs=0&pg=0&sr=", ?linkid) AS ?thumbnail) ' +
'} ';

if (dataset.filter) {
query += ' ' + dataset.filter;
}
Expand All @@ -1418,24 +1431,31 @@ KR.SparqlAPI = function (apiName, options) {
fylke = '0' + fylke;
}

var query = 'select ?id ?name ?description ?loccatlabel (SAMPLE(?point) as ?point) ?img ?thumbnail ?url as ?link {' +
' ?id a ?type .' +
' ?id rdfs:label ?name .' +
' ?id <https://data.kulturminne.no/askeladden/schema/i-kommune> ?kommune .' +
' ?id <https://data.kulturminne.no/askeladden/schema/beskrivelse> ?description .' +
' ?id <https://data.kulturminne.no/askeladden/schema/lokalitetskategori> ?lokalitetskategori .' +
' ?lokalitetskategori rdfs:label ?loccatlabel .' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid)' +
' BIND(bif:concat("http://www.kulturminnesok.no/kulturminnesok/kulturminne/?LOK_ID=", ?lokid) AS ?url)' +
' ?id <https://data.kulturminne.no/askeladden/schema/geo/point/etrs89> ?point .' +
' optional {' +
' ?picture <https://data.kulturminne.no/bildearkivet/schema/lokalitet> ?id .' +
' ?picture <https://data.kulturminne.no/schema/source-link> ?link' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid)' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=400&rs=0&pg=0&sr=", ?lokid) AS ?img)' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=75&rs=0&pg=0&sr=", ?lokid) AS ?thumbnail)' +
' }' +
' FILTER regex(?kommune, "^.*' + fylke + '[0-9]{2}") .';
var query = ' select distinct ?id ?name ?description ?loccatlabel ?locartlabel ?orglabel ?img ?thumbnail (SAMPLE(?point) as ?point) ?url as ?link ?picture ?picturelabel ?picturedescription ?picturelicence { ' +
' ?id a ?type ; ' +
' rdfs:label ?name ; ' +
' <https://data.kulturminne.no/askeladden/schema/beskrivelse> ?description ; ' +
' <https://data.kulturminne.no/askeladden/schema/lokalitetskategori> ?loccat ; ' +
' <https://data.kulturminne.no/askeladden/schema/lokalitetsart> ?locart ; ' +
' <https://data.kulturminne.no/askeladden/schema/AnsvarligOrganisasjon> ?org ; ' +
' <https://data.kulturminne.no/askeladden/schema/i-kommune> ?kommune ; ' +
' <https://data.kulturminne.no/askeladden/schema/geo/point/etrs89> ?point . ' +
' optional { ?loccat rdfs:label ?loccatlabel .} ' +
' optional { ?locart rdfs:label ?locartlabel .} ' +
' optional { ?org rdfs:label ?orglabel .} ' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid) ' +
' BIND(bif:concat("http://www.kulturminnesok.no/kulturminnesok/kulturminne/?LOK_ID=", ?lokid) AS ?url) ' +
' optional { ' +
' ?picture <https://data.kulturminne.no/bildearkivet/schema/lokalitet> ?id . ' +
' ?picture <https://data.kulturminne.no/schema/source-link> ?link . ' +
' ?picture rdfs:label ?picturelabel . ' +
' ?picture dc:description ?picturedescription . ' +
' ?picture <https://data.kulturminne.no/bildearkivet/schema/license> ?picturelicence . ' +
' BIND(REPLACE(STR(?id), "https://data.kulturminne.no/askeladden/lokalitet/", "") AS ?lokid) ' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=600&rs=0&pg=0&sr=", ?lokid) AS ?img) ' +
' BIND(bif:concat("http://kulturminnebilder.ra.no/fotoweb/cmdrequest/rest/PreviewAgent.fwx?ar=5001&sz=75&rs=0&pg=0&sr=", ?lokid) AS ?thumbnail) ' +
' } ' +
' FILTER regex(?kommune, "^.*' + fylke + '[1-9]{2}") . ';

if (dataset.filter) {
query += ' ' + dataset.filter;
Expand Down
4 changes: 2 additions & 2 deletions bower_components/KNreiseAPI/dist/KNreiseAPI.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower_components/KNreiseAPI/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "KNreiseAPI",
"version": "1.7.20",
"version": "1.7.22",
"description": "Api wrapper for KNreise",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit c109be1

Please sign in to comment.