Skip to content

Commit 9ad062c

Browse files
committed
Website updates
1 parent f393624 commit 9ad062c

File tree

13 files changed

+1026
-4
lines changed

13 files changed

+1026
-4
lines changed

dist/en/main/apidoc/module-ol_source_mapserver.html

Lines changed: 643 additions & 0 deletions
Large diffs are not rendered by default.

dist/en/main/apidoc/navigation.tmpl.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5847,6 +5847,23 @@
58475847
<li data-name="createloader"><a href="module-ol_source_mapguide.html#.createLoader">createLoader</a>
58485848
</ul>
58495849
</div>
5850+
<li class="item item-module" data-longname="module:ol/source/mapserver" data-name="ol/source/mapserver">
5851+
<span class="title toggle">
5852+
<span class="fa fa-plus me-2 mt-1"></span>
5853+
<span><a href="module-ol_source_mapserver.html">ol​/source​/mapserver</a></span>
5854+
</span>
5855+
<div class="member-list" data-type="typedefs">
5856+
<span class="subtitle">Typedefs</span>
5857+
<ul>
5858+
<li data-name="loaderoptions"><a href="module-ol_source_mapserver.html#~LoaderOptions">LoaderOptions</a>
5859+
</ul>
5860+
</div>
5861+
<div class="member-list" data-type="methods">
5862+
<span class="subtitle">Methods</span>
5863+
<ul>
5864+
<li data-name="createloader"><a href="module-ol_source_mapserver.html#.createLoader">createLoader</a>
5865+
</ul>
5866+
</div>
58505867
<li class="item item-class" data-longname="module:ol/source/OGCMapTile~OGCMapTile" data-name="ol/source/ogcmaptile">
58515868
<span class="title toggle">
58525869
<span class="fa fa-chevron-right me-2 mt-1"></span>

dist/en/main/examples/examples-info.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
6+
<title>MapServer CGI</title>
7+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
8+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css" crossorigin="anonymous">
9+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/solid.css" crossorigin="anonymous">
10+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/brands.css" crossorigin="anonymous">
11+
<link rel="stylesheet" type="text/css" href="./theme/ol.css">
12+
<link rel="stylesheet" type="text/css" href="/theme/site.css">
13+
<link rel="icon" type="image/svg+xml" href="/theme/img/logo-light.svg" media="(prefers-color-scheme: light)" />
14+
<link rel="icon" type="image/svg+xml" href="/theme/img/logo-dark.svg" media="(prefers-color-scheme: dark)" />
15+
</head>
16+
<body>
17+
<header class="navbar navbar-expand-md navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
18+
<a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70" alt="">&nbsp;OpenLayers</a>
19+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
20+
<span class="navbar-toggler-icon"></span>
21+
</button>
22+
23+
<!-- menu items that get hidden below 768px width -->
24+
<nav class="collapse navbar-collapse" id="olmenu">
25+
<ul class="nav navbar-nav ms-auto">
26+
<li class="nav-item dropdown">
27+
<a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
28+
<div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="docdropdown">
29+
<a class="dropdown-item" href="/doc/">Docs</a>
30+
<div class="dropdown-divider"></div>
31+
<a class="dropdown-item" href="/doc/quickstart.html"><i class="fa fa-check fa-fw me-2 fa-lg"></i>Quick Start</a>
32+
<a class="dropdown-item" href="/doc/faq.html"><i class="fa fa-question fa-fw me-2 fa-lg"></i>FAQ</a>
33+
<a class="dropdown-item" href="/doc/tutorials/"><i class="fa fa-book fa-fw me-2 fa-lg"></i>Tutorials</a>
34+
<a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw me-2 fa-lg"></i>Workshop</a>
35+
<div class="dropdown-divider"></div>
36+
<a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fab fa-stack-overflow fa-fw me-2"></i>Ask a Question</a>
37+
</div>
38+
</li>
39+
<li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li>
40+
<li class="nav-item"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap me-1"></i>API</a></li>
41+
<li class="nav-item dropdown">
42+
<a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
43+
<div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="codedropdown">
44+
<a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fab fa-github fa-fw me-2 fa-lg"></i>Repository</a>
45+
<a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw me-2 fa-lg"></i>Download</a>
46+
</div>
47+
</li>
48+
</ul>
49+
</nav>
50+
</header>
51+
52+
<div class="container-fluid line-numbers">
53+
<div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
54+
<button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
55+
This example uses OpenLayers v<span>10.3.2-dev</span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
56+
</div>
57+
58+
59+
<div class="row-fluid">
60+
<a href="#" id="codepen-button" class="btn btn-link float-end">
61+
<i class="fab fa-codepen fa-lg"></i> Edit
62+
</a>
63+
<h4 id="title">MapServer CGI</h4>
64+
<p class="tags">
65+
<span class="badge-group">
66+
<a
67+
href="./index.html?q=mapserver" class="badge badge-info">mapserver</a
68+
><a
69+
class="badge badge-info tag-modal-toggle"
70+
data-bs-toggle="modal"
71+
data-bs-target="#tag-example-list"
72+
data-title="mapserver"
73+
data-content="&lt;ul class=&quot;list-group&quot;&gt;
74+
&lt;li&gt;&lt;a class=&quot;list-group-item list-group-item-action active&quot; href=&quot;./mapserver-cgi.html&quot;&gt;MapServer CGI&lt;/a&gt;
75+
&lt;/ul&gt;"
76+
tabindex="0"
77+
>1</a>
78+
</span>
79+
<span class="badge-group">
80+
<a
81+
href="./index.html?q=cgi" class="badge badge-info">cgi</a
82+
><a
83+
class="badge badge-info tag-modal-toggle"
84+
data-bs-toggle="modal"
85+
data-bs-target="#tag-example-list"
86+
data-title="cgi"
87+
data-content="&lt;ul class=&quot;list-group&quot;&gt;
88+
&lt;li&gt;&lt;a class=&quot;list-group-item list-group-item-action active&quot; href=&quot;./mapserver-cgi.html&quot;&gt;MapServer CGI&lt;/a&gt;
89+
&lt;/ul&gt;"
90+
tabindex="0"
91+
>1</a>
92+
</span>
93+
</p>
94+
<div class="modal modal-tag-example" id="tag-example-list" tabindex="-1" role="dialog" aria-labelledby="tag-example-title" aria-hidden="true">
95+
<div class="modal-dialog modal-dialog-scrollable" role="document">
96+
<div class="modal-content">
97+
<div class="modal-header">
98+
<h5 class="modal-title" id="tag-example-title"></h5>
99+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
100+
</div>
101+
<div class="modal-body">
102+
<div class="list-group"></div>
103+
</div>
104+
</div>
105+
</div>
106+
</div>
107+
<div id="map" class="map"></div>
108+
109+
<form method="POST" id="codepen-form" target="_blank" action="https://codesandbox.io/api/v1/sandboxes/define">
110+
<input id="codesandbox-params" type="hidden" name="parameters">
111+
</form>
112+
</div>
113+
114+
<div class="row-fluid">
115+
<p id="shortdesc">Example of a MapServer CGI map.</p>
116+
<div id="docs"><p>Example of a map generated using the MapServer <a href="https://mapserver.org/cgi/controls.html">CGI Controls</a>. The CGI interface allows testing a Mapfile without having to configure WMS services. The Mapfile used in this example can be seen <a href="https://demo.mapserver.org/itasca_legend/itasca3.txt">here</a>.
117+
It is <strong>strongly</strong> recommended to configure MapServer to serve WMS and use the OpenLayers WMS loader, rather than this older CGI approach.</p>
118+
</div>
119+
</div>
120+
121+
<div class="row-fluid">
122+
<h5 class="source-heading">main.js</h5>
123+
<pre><code id="example-js-source" class="language-js">import Map from &#x27;ol/Map.js&#x27;;
124+
import View from &#x27;ol/View.js&#x27;;
125+
import {getCenter} from &#x27;ol/extent.js&#x27;;
126+
import ImageLayer from &#x27;ol/layer/Image.js&#x27;;
127+
import ImageSource from &#x27;ol/source/Image.js&#x27;;
128+
import {createLoader} from &#x27;ol/source/mapserver.js&#x27;;
129+
130+
const mapserverUrl &#x3D; &#x27;https://demo.mapserver.org/cgi-bin/mapserv?&#x27;;
131+
const bounds &#x3D; [388039, 5234969, 500964, 5295764];
132+
const mapServerLayer &#x3D; new ImageLayer({
133+
extent: bounds,
134+
source: new ImageSource({
135+
loader: createLoader({
136+
url: mapserverUrl,
137+
params: {
138+
&#x27;map&#x27;: &#x27;/mapserver/apps/itasca_legend/map/itasca3.map&#x27;,
139+
&#x27;layers&#x27;: &#x27;boundaries water roads other cities&#x27;,
140+
},
141+
}),
142+
}),
143+
});
144+
145+
const map &#x3D; new Map({
146+
layers: [mapServerLayer],
147+
target: &#x27;map&#x27;,
148+
view: new View({
149+
center: getCenter(bounds),
150+
zoom: 10,
151+
}),
152+
});
153+
</code></pre>
154+
</div>
155+
156+
<div class="row-fluid">
157+
<h5 class="source-heading">index.html</h5>
158+
<pre><code id="example-html-source" class="language-markup">&lt;!DOCTYPE html&gt;
159+
&lt;html lang="en"&gt;
160+
&lt;head&gt;
161+
&lt;meta charset="UTF-8"&gt;
162+
&lt;title&gt;MapServer CGI&lt;/title&gt;
163+
&lt;link rel="stylesheet" href="node_modules/ol/ol.css"&gt;
164+
&lt;style&gt;
165+
.map {
166+
width: 100%;
167+
height: 400px;
168+
}
169+
&lt;/style&gt;
170+
&lt;/head&gt;
171+
&lt;body&gt;
172+
&lt;div id&#x3D;&quot;map&quot; class&#x3D;&quot;map&quot;&gt;&lt;/div&gt;
173+
174+
&lt;script type="module" src="main.js"&gt;&lt;/script&gt;
175+
&lt;/body&gt;
176+
&lt;/html&gt;</code></pre>
177+
</div>
178+
179+
<div class="row-fluid">
180+
<h5 class="source-heading">package.json</h5>
181+
<pre><code id="example-pkg-source" class="language-json">{
182+
&quot;name&quot;: &quot;mapserver-cgi&quot;,
183+
&quot;dependencies&quot;: {
184+
&quot;ol&quot;: &quot;10.3.2-dev&quot;
185+
},
186+
&quot;devDependencies&quot;: {
187+
&quot;vite&quot;: &quot;^3.2.3&quot;
188+
},
189+
&quot;scripts&quot;: {
190+
&quot;start&quot;: &quot;vite&quot;,
191+
&quot;build&quot;: &quot;vite build&quot;
192+
}
193+
}</code></pre>
194+
</div>
195+
</div>
196+
197+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
198+
<script src="common.js"></script>
199+
<script src="mapserver-cgi.js"></script>
200+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-core.min.js"></script>
201+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/autoloader/prism-autoloader.min.js"></script>
202+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/toolbar/prism-toolbar.min.js"></script>
203+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.js"></script>
204+
<script src="./resources/common.js"></script>
205+
<script>
206+
document.getElementById('tag-example-list')
207+
.addEventListener('show.bs.modal', function (event) {
208+
const button = event.relatedTarget; // Button that triggered the modal
209+
this.querySelector('.modal-title').innerText = button.dataset.title;
210+
this.querySelector('.modal-body').innerHTML = button.dataset.content;
211+
});
212+
</script>
213+
<script>
214+
const releaseUrl = 'https://cdn.jsdelivr.net/npm/ol/package.json';
215+
fetch(releaseUrl).then(function(response) {
216+
return response.json();
217+
}).then(function(json) {
218+
const latestVersion = json.version;
219+
document.getElementById('latest-version').innerHTML = latestVersion;
220+
const url = window.location.href;
221+
const branchSearch = url.match(/\/([^\/]*)\/examples\//);
222+
const storageKey = 'ol-dismissed=-' + latestVersion;
223+
const dismissed = localStorage.getItem(storageKey) === 'true';
224+
if (branchSearch && !dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && '10.3.2-dev' != latestVersion) {
225+
const link = url.replace(branchSearch[0], '/latest/examples/');
226+
fetch(link, {method: 'head'}).then(function(response) {
227+
const a = document.getElementById('latest-link');
228+
a.href = response.status == 200 ? link : '../../latest/examples/';
229+
});
230+
const latestCheck = document.getElementById('latest-check');
231+
latestCheck.style.display = '';
232+
document.getElementById('latest-dismiss').onclick = function() {
233+
latestCheck.style.display = 'none';
234+
localStorage.setItem(storageKey, 'true');
235+
}
236+
}
237+
});
238+
</script>
239+
</body>
240+
</html>

dist/en/main/examples/mapserver-cgi.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/mapserver-cgi.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)