README.md 3.41 KB
Newer Older
1
2
3
4
5
6
7
8
Intro
-----

Generic instructions and documentation concerning the Leuven virtual tour

- [http://leuven.isric.org/](http://leuven.isric.org/)
- [https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html](https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html)

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Running local server
--------------------

Local server (`server.py`) was rewritten to python3 (`3.8.4`), using the python3 `http.server` and `socketserver`, both packages are part of basic python3 distribution.

To run locally:

```
python server.py
```
The script binds to port `80`, it may require permissions to bind to a low port number. If so, change port number to `8080` or anything above `1024`, or sudo.

Local docker build
------------------

Script `run.sh` build and runs a local docker image.  


27
28
29
30
31
32
Deployment
----------

Tour is run from OC, project leuven:

```
33
#Note that there are some mis-confusion with image names and locations 
34
oc project leuven
35
36
37
38

docker build -t docker-registry.wur.nl/isric/leuven/leuven-v0-2 .
docker push docker-registry.wur.nl/isric/leuven/leuven-v0-2
oc import-image leuven:latest
39
40
```

41
42
43
The docker image contains a video folder that considerable increases the image size and the time for deployment: `./www/videos` this has been changed into using a pod container that will contain a permanent version of the videos.


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Google tour key
---------------

The google tour key is associated to the `worlsoilmuseum@gmail.com` 

```
key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w
```

The key  is used on `index.html` around line 30:

```javascirpt
<script>
   var s = document.createElement("script");
		s.type = "text/javascript";
		s.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w&callback=initTour";
		$("head").append(s);
</script>
```

Google tour medatainfo
----------------------

67
68
69
70
71
72
73
74
75
76
77
Checking on the network console (browser) we have the [GeoPhotoService.GetMetadata](https://maps.googleapis.com/maps/api/js/GeoPhotoService.GetMetadata?pb=!1m5!1sapiv3!5sUS!11m2!1m1!1b0!2m2!1sen!2sUS!3m3!1m2!1e10!2sAF1QipN8WM2np43B5Ze7P_A3_Ftc_EYPWRYV6BbFWmzl!4m6!1e1!1e2!1e3!1e4!1e8!1e6&callback=_xdc_._vlmdra) url that contains metadata of the tour:


Panoid
------

Panoid is used on `tour.js`  to start the tour and then on `leuven_tour.json`  to define the icon location. Therefore the icon location on the tour is defined by this specific id. Looking at the tour on a browser the current panoid can be obtain on the console, inspecting object `panorama.location`
 
```
 >> panorama.location
```
78

Jorge S. Mendes de Jesus's avatar
Jorge S. Mendes de Jesus committed
79
80
81
Google has new documentation concerning the customization of streeview: [here](https://developers.google.com/maps/documentation/javascript/examples/streetview-custom-simple?hl=nl
)

82
83
Development Notes
-----------------
Jorge S. Mendes de Jesus's avatar
Jorge S. Mendes de Jesus committed
84
check
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Hierbij de files voor de virtuele tour

De bestanden staan geordend zoals ze op mijn machine werken

Plaatsen waar het pad mogelijk aangepast moet worden:
-www/assets/js/tour.js : 

regel 17 -21 (Het pad van de links wanneer op de icoontjes wordt geklikt)

regel 28,29,30,31,32: img src (Het pad naar de icoontjes in de tour)

De links worden opgebouwd door het basis pad zoals in tour.js te koppelen aan de url per icoontje zoals in www/assets/tour/leuven_tour.json staat.

De gebruikte pdf-en staan in de folder www/assets/pdf.

De gebruikte video’s staan in de folder www/assets/video.

De foto’s van de objecten in de vitrinekasten en de foto’s van de panelen staan in www/images.