Skip to content

Commit

Permalink
use new kreise api to get distinct images for sparql (ref #135)
Browse files Browse the repository at this point in the history
  • Loading branch information
atlefren committed Nov 27, 2015
1 parent 4835e1b commit cf0e52b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 15 deletions.
5 changes: 4 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@
"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.21",
"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": {
"KNreiseAPI": "1.7.22"
}
}
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.21",
"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.21",
"_release": "1.7.22",
"_resolution": {
"type": "version",
"tag": "1.7.21",
"commit": "de107ba0332076fc2cf54d2017b698cd6b787045"
"tag": "1.7.22",
"commit": "a61bd879b433e7c95136f7a0fbb0bff85d38f923"
},
"_source": "git://github.com/knreise/KNReiseAPI.git",
"_target": "1.7.21",
"_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.21",
"version": "1.7.22",
"description": "Api wrapper for KNreise",
"authors": [
"Atle Frenvik Sveen <[email protected]>"
Expand Down
12 changes: 9 additions & 3 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 @@ -1399,9 +1405,9 @@ KR.SparqlAPI = function (apiName, options) {
' ?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)' +
' 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) {
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.21",
"version": "1.7.22",
"description": "Api wrapper for KNreise",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions dist/scripts_external.js

Large diffs are not rendered by default.

0 comments on commit cf0e52b

Please sign in to comment.