css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <body style="margin: 0px 0px">
  <p width="100%" style="text-align:center">
    Only show parking lots with currently more than <input type="number" min="0" max="500" step="20" id="free_space" value="100" size="1"/> parking spaces available.
  <div id="map_isochrone" style="height:350px;"/>
  # In this demo we query 2 datasets at the same time with the Linked Data Fragments Client: 
  #   * Linked Geo Data at http://data.linkeddatafragments.org/linkedgeodata/
  #   * an RDF file at the City of Ghent with the dynamic parking site’s availability at http://linked.open.gent/parking

$(function() {
  var map = L.map('map_isochrone', {
    scrollWheelZoom: false //3.7260027 51.0417413
  }).setView([51.0487413, 3.7260027], 14);
  L.tileLayer('https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
  var refresh = function () {
    refreshMap(map, $("#free_space").val());
  window.setInterval(refresh, 30000);
var markers = [];
var refreshMap = function (map, free_space) {
  var fragmentsClient = new ldf.FragmentsClient(['http://data.linkeddatafragments.org/linkedgeodata', 'https://linked.open.gent/parking/']);
  var query = 'SELECT ?name ?free ?long ?lat ?capacity WHERE {?ParkingGent a <http://vocab.datex.org/terms#UrbanParkingSite>.  ?ParkingGent <http://www.w3.org/2002/07/owl#sameAs> ?parkingLGD .  ?ParkingGent <http://www.w3.org/2000/01/rdf-schema#label> ?name.  ?parkingLGD  <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?long ; <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?lat . ?ParkingGent <http://vocab.datex.org/terms#parkingNumberOfVacantSpaces> ?free ; <http://vocab.datex.org/terms#parkingNumberOfSpaces> ?capacity . FILTER ( ?free > ' + free_space + ' )}';
  //var query = 'select * where { ?s ?p ?o } LIMIT 10';
  var results = new ldf.SparqlIterator(query, {
    fragmentsClient: fragmentsClient
  for (key in markers) {
  results.on('data', function(parking) {
    parking["?lat"] = N3.Util.getLiteralValue(parking["?lat"]);
    parking["?long"] = N3.Util.getLiteralValue(parking["?long"]);
    var point = new L.LatLng(parking["?lat"],parking["?long"]);
    markers[markers.length-1].on("click", function() {
      handleClick(markers.length-1, markers[markers.length-1]);
    }).on('error', function (e) {

    var startIcon = L.icon({
      iconUrl: 'http://linkedconnections.org/images/marker-icon-start.png',
      iconRetinaUrl: 'http://linkedconnections.org/images/marker-icon-2x-start.png'

    L.Icon.Default.iconUrl = 'http://linkedconnections.org/images/marker-icon.png';
    L.Icon.Default.iconRetinaUrl = 'http://linkedconnections.org/images/marker-icon-2x.png';
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................