-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
161 lines (155 loc) · 9.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<html lang="en">
<head>
<meta charset="utf-8">
<title>African Bird Atlas API | Zoziologie</title>
<meta name="description" content="My personal website for bird related stuff.">
<link rel="icon" href="/assets/logo.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1YGJHDR2PZ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-1YGJHDR2PZ');
</script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-vue/2.21.2/bootstrap-vue.min.js" integrity="sha512-Z0dNfC81uEXC2iTTXtE0rM18I3ATkwn1m8Lxe0onw/uPEEkCmVZd+H8GTeYGkAZv50yvoSR5N3hoy/Do2hNSkw==" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-vue/2.21.2/bootstrap-vue.min.css" integrity="sha512-YnP4Ql71idaMB+/ZG38+1adSSQotdqvixQ+dQg8x/IFA4heIj6i0BC31W5T5QUdK1Uuwa01YdqdcT42q+RldAg==" crossorigin="anonymous" />
<script src="https://unpkg.com/[email protected]/dist/vue2-leaflet.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-select.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-select.css" type="text/css">
<script src="script.js" type="text/javascript"></script>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<b-container fluid id="ff">
<b-row>
<b-col>
<b-input-group id="url-group" class="mb-3 mt-3">
<b-input-group-prepend class="url-innertext">
<b-button variant="outline-secondary" onclick="window.open('http://api.adu.org.za/sabap2/v2/');">
<i class="fas fa-info"></i>
</b-button>
<b-button v-b-tooltip.click title="Copy to clipboard" variant="outline-secondary" v-on:click="copyURL()">
<i class="fas fa-link"></i>
</b-button>
<!--<b-button variant="outline-secondary" v-b-toggle.sidebar-1><i class="fas fa-wrench"></i></b-button>-->
<b-input-group-text variant="outline-secondary">https://api.birdmap.africa/sabap2/v2/</b-input-group-text>
</b-input-group-prepend>
<b-form-select v-model="base" :options="base_opts" required class="url-val" width=></b-form-select>
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
<template v-for="item in clayer.items">
<template v-if="item === 'date'">
<b-form-input v-model="startdate" type="date" required class="url-val"></b-form-input>
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
<b-form-input v-model="enddate" type="date" required class="url-val"></b-form-input>
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
</template>
<template v-else-if="item === 'region'">
<b-form-select v-model="regionType" :options="base=='R' ? regions : regions_opt" required class="url-val"></b-form-select>
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
<template v-if="regionType === 'country'">
<b-form-select class="url-val" v-model="regionCountry" :options="countries" required></b-form-select>
</template>
<template v-else-if="regionType === 'province'">
<b-form-input v-model="regionProvince" type="text" required class="url-val"></b-form-input>
</template>
<template v-else-if="regionType === 'pentad'">
<b-form-input v-model="regionPentad" type="text" class="url-val" required></b-form-input>
<b-input-group-prepend class="url-pass">
<b-button variant="outline-secondary" :pressed.sync="buttonDisplayMarkerPentad" >
<i class="fas fa-marker"></i>
</b-button>
</b-input-group-prepend>
</template>
<template v-else-if="regionType === 'group'">
<v-select v-model="regionGroup" label="label" :options="groups" :reduce="e => e.code" required class="url-species"></v-select>
</template>
<template v-else-if="regionType === 'qdgc'">
<b-form-input v-model="regionQdgc" type="text" required class="url-val"></b-form-input>
</template>
<template v-if="base!='summary'">
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary" >/data</b-input-group-text></b-input-group-prepend>
</template>
</template>
<template v-else-if="item === 'filter'">
<b-form-select v-model="filterType" :options="['','/observers','/species']" required class="url-val"></b-form-select>
<template v-if="filterType === '/observers'">
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
<b-form-input v-model="filterObserver" type="text" required class="url-val"></b-form-input>
</template>
<template v-else-if="filterType === '/species'">
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
<v-select taggable multiple v-model="speciesCode" label="label" :options="species" :reduce="e => e.code" required class="url-species"></v-select>
</template>
</template>
<template v-else-if="item === 'species'">
<template v-if="base == 'cards'">
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">species/0/</b-input-group-text></b-input-group-prepend>
</template>
<template v-else>
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">species/</b-input-group-text></b-input-group-prepend>
</template>
<v-select taggable v-model="speciesCode" label="label" :options="species" :reduce="e => e.code" required class="url-species"></v-select>
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">/</b-input-group-text></b-input-group-prepend>
</template>
<template v-else-if="item === 'cardNo'">
<b-input-group-prepend class="url-innertext"><b-input-group-text variant="outline-secondary">full/0/</b-input-group-text></b-input-group-prepend>
<b-form-input v-model="cardNo" type="text" required class="url-val"></b-form-input>
</template>
</template>
<b-input-group-append>
<template v-if="clayer.format.includes('map')">
<b-button variant="outline-secondary" v-on:click="exportMap($event)" id="btn-download"><i class="fas fa-globe-africa"></i> Map</b-button>
</template>
<b-dropdown variant="outline-secondary">
<template v-slot:button-content>
<i class='fas fa-download'></i> Download
</template>
<template v-if="clayer.format.includes('csv')">
<b-dropdown-item v-on:click="exportURL('toCSV',$event)">CSV</b-dropdown-item>
</template>
<template v-if="clayer.format.includes('json2csv')">
<b-dropdown-item v-on:click="json2csv($event)">CSV</b-dropdown-item>
</template>
<template v-if="clayer.format.includes('json')">
<b-dropdown-item v-on:click="exportURL('toJSON',$event)">JSON</b-dropdown-item>
</template>
</b-dropdown>
</b-input-group-append>
</b-input-group>
</b-col>
</b-row>
<b-row class="h-100">
<b-col class="h-100 pb-3">
<l-map :bounds="bounds">
<l-tile-layer :url="lurl"></l-tile-layer>
<l-marker :lat-lng.sync="marker_pentad.position" :draggable="true" :visible="displayMarkerPentad"></l-marker>
<l-rectangle :bounds="rectangle_pentad" :visible="displayMarkerPentad"></l-rectangle>
<l-geo-json :geojson="geojson"></l-geo-json>
</l-map>
</b-col>
</b-row>
<b-row align-v="end" class="text-center" id="footer">
<b-col>
<b-button-group>
<b-button variant="light" href="https://github.com/Zoziologie/Map-African-Bird-Map-API"><i class="fab fa-github"></i> Github</b-button>
<b-button variant="light" href="https://zoziologie.raphaelnussbaumer.com/"><b-img src="/assets/logo.png" height=16></b-img> Zoziology</b-button>
<b-button variant="light" href="http://kenya.birdmap.africa/"><b-img src="https://kenya.birdmap.africa/img/ico/favicon-16x16.png" height=16></b-img> Kenya Bird Map</b-button>
<b-button variant="light" href="https://www.arocha.or.ke/"><b-img src="https://avatars0.githubusercontent.com/u/64659171?s=16&v=4"></b-img> A Rocha Kenya</b-button>
</b-button-group>
<a ></a>
</b-col>
</b-row>
</b-container>
<footer>
</footer>
</body>
</html>