diff --git a/front/index.js b/front/index.js index 97445eb..7d33593 100644 --- a/front/index.js +++ b/front/index.js @@ -1,17 +1,54 @@ import 'ol/ol.css'; -import {Map, View} from 'ol'; -import TileLayer from 'ol/layer/Tile'; -import OSM from 'ol/source/OSM'; +import Map from 'ol/Map'; +import View from 'ol/View'; +import {getCenter} from 'ol/extent'; +import ImageLayer from 'ol/layer/Image'; +import Projection from 'ol/proj/Projection'; +import Static from 'ol/source/ImageStatic'; -const map = new Map({ - target: 'map', +import {Vector as VectorLayer} from 'ol/layer'; +import VectorSource from 'ol/source/Vector'; + +import Feature from 'ol/Feature'; +import Point from 'ol/geom/Point'; + +var testMarker = new Feature({ + type: 'icon', + geometry: new Point([7000.0, 9000.0]) +}); + +var vectorLayer = new VectorLayer({ + source: new VectorSource({ + features: [testMarker] + }) +}) + +var extent = [0, 0, 15360, 15359]; +var projection = new Projection({ + code: 'xkcd-image', + units: 'pixels', + extent: extent +}); + +var map = new Map({ layers: [ - new TileLayer({ - source: new OSM() - }) + new ImageLayer({ + source: new Static({ + attributions: '© xkcd', + url: './maps/Tanoa.png', + projection: projection, + imageExtent: extent + }) + }), + vectorLayer ], + target: 'map', view: new View({ - center: [0, 0], - zoom: 0 + projection: projection, + center: getCenter(extent), + zoom: 2, + maxZoom: 8 }) }); + +// icon and text diff --git a/server.lisp b/server.lisp index 9c3c727..76e206b 100644 --- a/server.lisp +++ b/server.lisp @@ -90,8 +90,9 @@ (funcall route-function env))))) :name "webserver")) -(defparameter *web* (car (sb-thread:list-all-threads))) -(list *web*) -(sb-thread:terminate-thread *web*) - - +(sb-thread:list-all-threads) +(mapcar #'sb-thread:terminate-thread + (remove-if-not + (lambda (thread) + (string= "webserver" (sb-thread:thread-name thread))) + (sb-thread:list-all-threads))) diff --git a/static/index.html b/static/index.html index c538304..2f8510a 100644 --- a/static/index.html +++ b/static/index.html @@ -2,16 +2,19 @@ - Using Parcel with OpenLayers + leoservermod -
+