text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: examples/feature-animation.html
---
layout: example.html
title: Custom Animation
shortdesc: Demonstrates how to animate features.
docs: >
This example shows how to use <b>postrender</b> and <b>vectorContext</b> to
animate features. Here we choose to do a flash animation each time a feature
is added to t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/feature-animation.html", "license": "bsd-2-clause", "size": 367} |
### File: examples/feature-animation.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import View from '../src/ol/View.js';
import {Circle as CircleStyle, Stroke, Style} from '../src/ol/style.js';
import {OSM, Vector as VectorSource} from '.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/feature-animation.js", "license": "bsd-2-clause", "size": 2291} |
### File: examples/feature-move-animation.html
---
layout: example.html
title: Marker Animation
shortdesc: Demonstrates how to move a feature along a line.
docs: >
This example shows how to use <b>postrender</b> events and a <b>vector context</b> to
animate a marker feature along a line. In this example an encoded ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/feature-move-animation.html", "license": "bsd-2-clause", "size": 684} |
### File: examples/feature-move-animation.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import Polyline from '../src/ol/format/Polyline.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
impo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/feature-move-animation.js", "license": "bsd-2-clause", "size": 7572} |
### File: examples/filter-points-webgl.html
---
layout: example.html
title: Filtering features with WebGL
shortdesc: Using WebGL to filter large quantities of features
docs: >
This example shows how to use `ol/layer/WebGLPoints` with a literal style to dynamically filter a large amount
of point geometries. The ab... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/filter-points-webgl.html", "license": "bsd-2-clause", "size": 1316} |
### File: examples/filter-points-webgl.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import Stamen from '../src/ol/source/Stamen.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import WebGLPoint... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/filter-points-webgl.js", "license": "bsd-2-clause", "size": 3446} |
### File: examples/flight-animation.html
---
layout: example.html
title: Flight Animation
shortdesc: Demonstrates how to animate flights with ´postrender´.
docs: >
This example shows how to use <b>postrender</b> and <b>vectorContext</b> to
animate flights. A great circle arc between two airports is calculated using... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/flight-animation.html", "license": "bsd-2-clause", "size": 820} |
### File: examples/flight-animation.js
import Feature from '../src/ol/Feature.js';
import LineString from '../src/ol/geom/LineString.js';
import Map from '../src/ol/Map.js';
import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
impo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/flight-animation.js", "license": "bsd-2-clause", "size": 3662} |
### File: examples/fractal.css
.map {
background: whitesmoke;
}
#depth {
width: 100px;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/fractal.css", "license": "bsd-2-clause", "size": 62} |
### File: examples/fractal.html
---
layout: example.html
title: Fractal Rendering
shortdesc: Example of a fractal.
docs: >
This example demonstrates how features with many vertices can be efficiently rendered.
tags: "fractal, vector"
---
<div id="map" class="map"></div>
<label for="depth">
depth:
<input id=... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/fractal.html", "license": "bsd-2-clause", "size": 397} |
### File: examples/fractal.js
import Feature from '../src/ol/Feature.js';
import LineString from '../src/ol/geom/LineString.js';
import Map from '../src/ol/Map.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
const ra... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/fractal.js", "license": "bsd-2-clause", "size": 2958} |
### File: examples/full-screen-drag-rotate-and-zoom.css
.map:-webkit-full-screen {
height: 100%;
margin: 0;
}
.map:-ms-fullscreen {
height: 100%;
}
.map:fullscreen {
height: 100%;
}
/* position the rotate control lower than usual */
.ol-rotate {
top: 3em;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen-drag-rotate-and-zoom.css", "license": "bsd-2-clause", "size": 212} |
### File: examples/full-screen-drag-rotate-and-zoom.html
---
layout: example.html
title: Full Screen Drag, Rotate, and Zoom
shortdesc: Example of drag rotate and zoom control with full screen effect.
docs: >
<p>Hold down <code>Shift+Drag</code> to rotate and zoom. Click the button in the top right corner to go full ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen-drag-rotate-and-zoom.html", "license": "bsd-2-clause", "size": 678} |
### File: examples/full-screen-drag-rotate-and-zoom.js
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {
DragRotateAndZoom,
defaults as defaultInteractions,
} from '../src/ol/interaction.js';... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen-drag-rotate-and-zoom.js", "license": "bsd-2-clause", "size": 1118} |
### File: examples/full-screen-source.css
.fullscreen:-webkit-full-screen {
height: 100%;
margin: 0;
}
.fullscreen:-ms-fullscreen {
height: 100%;
}
.fullscreen:fullscreen {
height: 100%;
}
.fullscreen {
margin-bottom: 10px;
width: 100%;
height: 400px;
}
.ol-rotate {
top: 3em;
}
.map {
width: 80%;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen-source.css", "license": "bsd-2-clause", "size": 508} |
### File: examples/full-screen-source.html
---
layout: example.html
title: Full Screen Control with extended source element
shortdesc: Example of a full screen control with a source option definition.
docs: >
<p>Click the control in the top right corner to go full screen. Click it again to exit full screen.</p>
<p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen-source.html", "license": "bsd-2-clause", "size": 653} |
### File: examples/full-screen-source.js
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import {FullScreen, defaults as defaultControls} from '../src/ol/control.js';
const view = new View({
center: ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen-source.js", "license": "bsd-2-clause", "size": 546} |
### File: examples/full-screen.css
.map:-webkit-full-screen {
height: 100%;
margin: 0;
}
.map:-ms-fullscreen {
height: 100%;
}
.map:fullscreen {
height: 100%;
}
.ol-rotate {
top: 3em;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen.css", "license": "bsd-2-clause", "size": 161} |
### File: examples/full-screen.html
---
layout: example.html
title: Full Screen Control
shortdesc: Example of a full screen control.
docs: >
<p>Click the control in the top right corner to go full screen. Click it again to exit full screen.</p>
<p>If there is no button on the map, your browser does not support the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen.html", "license": "bsd-2-clause", "size": 545} |
### File: examples/full-screen.js
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {FullScreen, defaults as defaultControls} from '../src/ol/control.js';
const view = new View({
center: [-91017... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/full-screen.js", "license": "bsd-2-clause", "size": 931} |
### File: examples/geographic.css
td {
padding: 0 0.5em;
text-align: right;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geographic.css", "license": "bsd-2-clause", "size": 48} |
### File: examples/geographic.html
---
layout: example.html
title: Geographic Coordinates
shortdesc: Using geographic coordinates for the map view.
docs: >
Calling the <code>useGeographic</code> function in the <code>'ol/proj'</code> module
makes it so the map view uses geographic coordinates (even if the view proj... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geographic.html", "license": "bsd-2-clause", "size": 639} |
### File: examples/geographic.js
import {Circle, Fill, Style} from '../src/ol/style.js';
import {Feature, Map, Overlay, View} from '../src/ol/index.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Point} from '../src/ol/geom.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../sr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geographic.js", "license": "bsd-2-clause", "size": 2102} |
### File: examples/geojson-vt.html
---
layout: example.html
title: geojson-vt integration
shortdesc: Slice GeoJSON into vector tiles on the fly in the browser.
docs: >
Example of integration with <a href="https://github.com/mapbox/geojson-vt">geojson-vt</a> library.
tags: "mapbox, vector, tiles, geojson"
resources:
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geojson-vt.html", "license": "bsd-2-clause", "size": 379} |
### File: examples/geojson-vt.js
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import Projection from '../src/ol/proj/Projection.js';
import VectorTileSource from '../src/ol/source/VectorTile.js';
import View from '../src/ol/View.js';
i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geojson-vt.js", "license": "bsd-2-clause", "size": 2883} |
### File: examples/geojson.html
---
layout: example.html
title: GeoJSON
shortdesc: Example of GeoJSON features.
docs: >
Example of GeoJSON features.
tags: "geojson, vector, openstreetmap"
---
<div id="map" class="map"></div>
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geojson.html", "license": "bsd-2-clause", "size": 195} |
### File: examples/geojson.js
import Circle from '../src/ol/geom/Circle.js';
import Feature from '../src/ol/Feature.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geojson.js", "license": "bsd-2-clause", "size": 4815} |
### File: examples/geolocation-orientation.html
---
layout: example-verbatim.html
title: Geolocation Tracking with Orientation
shortdesc: Example of a geolocated and oriented map.
tags: "fullscreen, geolocation, orientation, mobile"
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geolocation-orientation.html", "license": "bsd-2-clause", "size": 1578} |
### File: examples/geolocation-orientation.js
import Geolocation from '../src/ol/Geolocation.js';
import LineString from '../src/ol/geom/LineString.js';
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import Overlay from '../src/ol/Overlay.js';
import TileLayer from '../src/ol/layer/Tile.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geolocation-orientation.js", "license": "bsd-2-clause", "size": 6116} |
### File: examples/geolocation.html
---
layout: example.html
title: Geolocation
shortdesc: Using geolocation to control a map view.
docs: >
This example uses the Geolocation API to control the view.
tags: "geolocation, openstreetmap"
---
<div id="map" class="map"></div>
<div id="info" style="display: none;"></div>
<l... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geolocation.html", "license": "bsd-2-clause", "size": 646} |
### File: examples/geolocation.js
import Feature from '../src/ol/Feature.js';
import Geolocation from '../src/ol/Geolocation.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import View from '../src/ol/View.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/sty... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/geolocation.js", "license": "bsd-2-clause", "size": 2347} |
### File: examples/getfeatureinfo-image.html
---
layout: example.html
title: WMS GetFeatureInfo (Image Layer)
shortdesc: Using an image WMS source with GetFeatureInfo requests
docs: >
This example shows how to trigger WMS GetFeatureInfo requests on click for a WMS image layer. Additionally <code>map.forEachLayerAtPi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/getfeatureinfo-image.html", "license": "bsd-2-clause", "size": 481} |
### File: examples/getfeatureinfo-image.js
import ImageLayer from '../src/ol/layer/Image.js';
import ImageWMS from '../src/ol/source/ImageWMS.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
const wmsSource = new ImageWMS({
url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS':... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/getfeatureinfo-image.js", "license": "bsd-2-clause", "size": 1295} |
### File: examples/getfeatureinfo-layers.html
---
layout: example.html
title: WMS GetFeatureInfo (Layers)
shortdesc: >
Shows how to fetch features per layer name in a single WMS GetFeatureInfo
request
docs: >
Demonstrates the use of the `layers` option in the
`ol/format/WMSGetFeatureInfo` format object, which a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/getfeatureinfo-layers.html", "license": "bsd-2-clause", "size": 645} |
### File: examples/getfeatureinfo-layers.js
import WMSGetFeatureInfo from '../src/ol/format/WMSGetFeatureInfo.js';
fetch('data/wmsgetfeatureinfo/osm-restaurant-hotel.xml')
.then(function (response) {
return response.text();
})
.then(function (response) {
// this is the standard way to read the features
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/getfeatureinfo-layers.js", "license": "bsd-2-clause", "size": 966} |
### File: examples/getfeatureinfo-tile.html
---
layout: example.html
title: WMS GetFeatureInfo (Tile Layer)
shortdesc: Issuing GetFeatureInfo requests with a WMS tiled source
docs: >
This example shows how to trigger WMS GetFeatureInfo requests on click for a WMS tile layer. Additionally <code>map.forEachLayerAtPixe... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/getfeatureinfo-tile.html", "license": "bsd-2-clause", "size": 480} |
### File: examples/getfeatureinfo-tile.js
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import TileWMS from '../src/ol/source/TileWMS.js';
import View from '../src/ol/View.js';
const wmsSource = new TileWMS({
url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS': 'ne:n... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/getfeatureinfo-tile.js", "license": "bsd-2-clause", "size": 1304} |
### File: examples/gpx.html
---
layout: example.html
title: GPX Data
shortdesc: Example of using the GPX source.
docs: >
Example of using the GPX source.
tags: "GPX, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/gpx.html", "license": "bsd-2-clause", "size": 332} |
### File: examples/gpx.js
import GPX from '../src/ol/format/GPX.js';
import Map from '../src/ol/Map.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js';
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/gpx.js", "license": "bsd-2-clause", "size": 2506} |
### File: examples/graticule.html
---
layout: example.html
title: Map Graticule
shortdesc: This example shows how to add a graticule layer to a map.
docs: >
This example shows how to add a graticule layer to a map.
tags: "graticule"
---
<div id="map" class="map"></div>
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/graticule.html", "license": "bsd-2-clause", "size": 238} |
### File: examples/graticule.js
import Graticule from '../src/ol/layer/Graticule.js';
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import Stroke from '../src/ol/style/Stroke.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import {fromLonLat} ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/graticule.js", "license": "bsd-2-clause", "size": 784} |
### File: examples/heatmap-earthquakes.html
---
layout: example.html
title: Earthquakes Heatmap
shortdesc: Demonstrates the use of a heatmap layer.
docs: >
This example parses a KML file and renders the features as a <code>ol/layer/Heatmap</code> layer.
tags: "heatmap, kml, vector, style, webgl"
---
<div id="map" cla... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/heatmap-earthquakes.html", "license": "bsd-2-clause", "size": 506} |
### File: examples/heatmap-earthquakes.js
import KML from '../src/ol/format/KML.js';
import Map from '../src/ol/Map.js';
import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Heatmap as HeatmapLayer, Tile as TileLayer} from ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/heatmap-earthquakes.js", "license": "bsd-2-clause", "size": 1558} |
### File: examples/here-maps.html
---
layout: example.html
title: HERE Map Tile API
shortdesc: Example of a map with map tiles from HERE.
docs: >
<p><a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile">HERE Map Tile API</a> used with <code>ol/source/XYZ</code>.</p>
<p>Be sure to respect ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/here-maps.html", "license": "bsd-2-clause", "size": 1052} |
### File: examples/here-maps.js
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
const appId = 'kDm0Jq1K4Ak7Bwtn8uvk';
const appCode = 'xnmvc4dKZrDfGlvQHXSvwQ';
const hereLayers = [
{
base: 'base'... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/here-maps.js", "license": "bsd-2-clause", "size": 2303} |
### File: examples/hit-tolerance.html
---
layout: example.html
title: Hit Tolerance
shortdesc: Example using the hitTolerance parameter.
docs: >
By default, the map.forEachFeatureAtPixel() function only considers features that are directly under the provided
pixel. This can make it difficult to interact with featur... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/hit-tolerance.html", "license": "bsd-2-clause", "size": 1050} |
### File: examples/hit-tolerance.js
import Feature from '../src/ol/Feature.js';
import LineString from '../src/ol/geom/LineString.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Stroke, Style} from '../src/ol/style.j... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/hit-tolerance.js", "license": "bsd-2-clause", "size": 2030} |
### File: examples/hitdetect-vector.html
---
layout: example.html
title: Vector Layer Hit Detection
shortdesc: Example of hit detection on a countries vector layer with country information.
docs: >
The countries are loaded from a GeoJSON file. Information about countries is
on hover and click is retrieved using the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/hitdetect-vector.html", "license": "bsd-2-clause", "size": 739} |
### File: examples/hitdetect-vector.js
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Fill, Stroke, Style, Text} from '../src/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/hitdetect-vector.js", "license": "bsd-2-clause", "size": 2437} |
### File: examples/icon-color.html
---
layout: example.html
title: Icon Colors
shortdesc: Example assigning a custom color to an icon
docs: >
Example assigning a custom color to an icon. The features in this examples are all using the same image with the different colors coming from the javascript file.
Note that i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-color.html", "license": "bsd-2-clause", "size": 563} |
### File: examples/icon-color.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Icon, St... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-color.js", "license": "bsd-2-clause", "size": 1685} |
### File: examples/icon-negative.html
---
layout: example.html
title: Icon Pixel Operations
shortdesc: Canvas pixel operations on a point icon.
docs: >
Example using an icon to symbolize a point. Click on the icon to select it, and it will be rendered using its negative image.
tags: "vector, style, icon, marker, canv... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-negative.html", "license": "bsd-2-clause", "size": 331} |
### File: examples/icon-negative.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import Select from '../src/ol/interaction/Select.js';
import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js';
i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-negative.js", "license": "bsd-2-clause", "size": 2181} |
### File: examples/icon-scale.html
---
layout: example.html
title: Icon Scale
shortdesc: Example of scaling icons and labels.
docs: >
Icons and labels can be scaled in both dimensions if required. A negative value will flip the image
or text around its anchor point (reversed text is <b>not</b> suitable for line pl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-scale.html", "license": "bsd-2-clause", "size": 739} |
### File: examples/icon-scale.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Overlay from '../src/ol/Overlay.js';
import Point from '../src/ol/geom/Point.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js';
import Vie... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-scale.js", "license": "bsd-2-clause", "size": 3358} |
### File: examples/icon-sprite-webgl.html
---
layout: example.html
title: Icon Sprites with WebGL
shortdesc: Rendering many icons with WebGL
docs: >
This example shows how to use `ol/layer/WebGLPoints` to render
a very large amount of sprites. The above map is based on a dataset from the National UFO Reporting Ce... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-sprite-webgl.html", "license": "bsd-2-clause", "size": 1122} |
### File: examples/icon-sprite-webgl.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js';
impor... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon-sprite-webgl.js", "license": "bsd-2-clause", "size": 4490} |
### File: examples/icon.html
---
layout: example.html
title: Icon Symbolizer
shortdesc: Example using an icon to symbolize a point.
docs: >
Example using an icon to symbolize a point.
tags: "vector, style, icon, marker, popup"
resources:
- https://code.jquery.com/jquery-2.2.3.min.js
- https://maxcdn.bootstrapcdn.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon.html", "license": "bsd-2-clause", "size": 464} |
### File: examples/icon.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Overlay from '../src/ol/Overlay.js';
import Point from '../src/ol/geom/Point.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/icon.js", "license": "bsd-2-clause", "size": 2210} |
### File: examples/igc.html
---
layout: example.html
title: IGC Data
shortdesc: Example of tracks recorded from multiple paraglider flights on the same day, read from an IGC file.
docs: >
<p>The five tracks contain a total of 49,707 unique coordinates. Zoom in to see more detail. The background layer is from <a href=... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/igc.html", "license": "bsd-2-clause", "size": 652} |
### File: examples/igc.js
import Feature from '../src/ol/Feature.js';
import IGC from '../src/ol/format/IGC.js';
import Map from '../src/ol/Map.js';
import OSM, {ATTRIBUTION} from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Circle as Ci... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/igc.js", "license": "bsd-2-clause", "size": 5324} |
### File: examples/iiif.html
---
layout: example.html
title: IIIF Image API
shortdesc: Example of a IIIF Image API source.
docs: >
Example of a tile source for an International Image Interoperability Framework (IIIF) Image Service.
Try any Image API version 1 or 2 service.
tags: "IIIF, IIIF Image API, tile source"
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/iiif.html", "license": "bsd-2-clause", "size": 615} |
### File: examples/iiif.js
import IIIF from '../src/ol/source/IIIF.js';
import IIIFInfo from '../src/ol/format/IIIFInfo.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const layer = new TileLayer(),
map = new Map({
layers: [layer],
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/iiif.js", "license": "bsd-2-clause", "size": 1773} |
### File: examples/image-filter.html
---
layout: example.html
title: Image Filters
shortdesc: Apply a filter to imagery
docs: >
<p>Layer rendering can be manipulated in <code>prerender</code> and <code>postrender</code> event listeners.
These listeners get an event with a reference to the Canvas rendering context.
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-filter.html", "license": "bsd-2-clause", "size": 855} |
### File: examples/image-filter.js
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {fromLonLat} from '../src/ol/proj.js';
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-filter.js", "license": "bsd-2-clause", "size": 3718} |
### File: examples/image-load-events.css
.map {
background: #E0ECED;
}
.wrapper {
position: relative;
}
#progress {
position: absolute;
bottom: 0;
left: 0;
height: 2px;
background: rgba(0, 60, 136, 0.4);
width: 0;
transition: width 250ms;
} | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-load-events.css", "license": "bsd-2-clause", "size": 217} |
### File: examples/image-load-events.html
---
layout: example.html
title: Image Load Events
shortdesc: Example using image load events.
docs: >
<p>Image sources fire events related to image loading. You can
listen for <code>imageloadstart</code>, <code>imageloadend</code>,
and <code>imageloaderror</code> type ev... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-load-events.html", "license": "bsd-2-clause", "size": 572} |
### File: examples/image-load-events.js
import ImageLayer from '../src/ol/layer/Image.js';
import ImageWMS from '../src/ol/source/ImageWMS.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
/**
* Renders a progress bar.
* @param {HTMLElement} el The target element.
* @constructor
*/
fun... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-load-events.js", "license": "bsd-2-clause", "size": 1987} |
### File: examples/image-vector-layer.html
---
layout: example.html
title: Vector Image Layer
shortdesc: Example of rendering vector data as an image layer.
docs: >
<p>This example uses <code>ol/layer/VectorImage</code> for faster rendering during interaction and animations, at the cost of less accurate rendering.</p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-vector-layer.html", "license": "bsd-2-clause", "size": 366} |
### File: examples/image-vector-layer.js
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import VectorImageLayer from '../src/ol/layer/VectorImage.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/image-vector-layer.js", "license": "bsd-2-clause", "size": 2077} |
### File: examples/immediate-geographic.html
---
layout: example.html
title: Immediate Rendering (Geographic)
shortdesc: Using the immediate rendering API with geometries in geographic coordinates.
docs: >
This example uses the "immediate" rendering API with geometries in geographic coordinates.
The immediate rende... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/immediate-geographic.html", "license": "bsd-2-clause", "size": 786} |
### File: examples/immediate-geographic.js
import Stamen from '../src/ol/source/Stamen.js';
import TileLayer from '../src/ol/layer/Tile.js';
import {Circle, Fill, Style} from '../src/ol/style.js';
import {Map, View} from '../src/ol/index.js';
import {Point} from '../src/ol/geom.js';
import {getVectorContext} from '../s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/immediate-geographic.js", "license": "bsd-2-clause", "size": 1514} |
### File: examples/index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/boot... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/index.html", "license": "bsd-2-clause", "size": 7293} |
### File: examples/jsts.html
---
layout: example.html
title: JSTS Integration
shortdesc: Example on how to use JSTS with OpenLayers.
docs: >
Example showing the integration of <a href="https://github.com/bjornharrtell/jsts">JSTS</a>
with OpenLayers.
tags: "vector, jsts, buffer"
resources:
- https://unpkg.com/jsts... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/jsts.html", "license": "bsd-2-clause", "size": 352} |
### File: examples/jsts.js
import GeoJSON from '../src/ol/format/GeoJSON.js';
import LinearRing from '../src/ol/geom/LinearRing.js';
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {
Line... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/jsts.js", "license": "bsd-2-clause", "size": 1803} |
### File: examples/kml-earthquakes.css
#map {
position: relative;
}
#info {
position: absolute;
height: 1px;
width: 1px;
z-index: 100;
}
.tooltip.in {
opacity: 1;
}
.tooltip.top .tooltip-arrow {
border-top-color: white;
}
.tooltip-inner {
border: 2px solid white;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml-earthquakes.css", "license": "bsd-2-clause", "size": 243} |
### File: examples/kml-earthquakes.html
---
layout: example.html
title: Earthquakes in KML
shortdesc: Demonstrates the use of a Shape symbolizer to render earthquake locations.
docs: >
This example parses a KML file and renders the features as a vector layer. The layer is given a <code>style</code> that renders eart... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml-earthquakes.html", "license": "bsd-2-clause", "size": 637} |
### File: examples/kml-earthquakes.js
import KML from '../src/ol/format/KML.js';
import Map from '../src/ol/Map.js';
import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml-earthquakes.js", "license": "bsd-2-clause", "size": 2312} |
### File: examples/kml-timezones.css
#map {
position: relative;
}
#info {
position: absolute;
height: 1px;
width: 1px;
z-index: 100;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml-timezones.css", "license": "bsd-2-clause", "size": 108} |
### File: examples/kml-timezones.html
---
layout: example.html
title: Timezones in KML
shortdesc: Demonstrates rendering timezones from KML.
docs: >
This example parses a KML file and renders the features as a vector layer. The layer is given a <code>ol/style/Style</code> that fills timezones
yellow with an opacit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml-timezones.html", "license": "bsd-2-clause", "size": 628} |
### File: examples/kml-timezones.js
import KML from '../src/ol/format/KML.js';
import Map from '../src/ol/Map.js';
import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Fill, Stroke, Style} from '../src/ol/style.js';
import ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml-timezones.js", "license": "bsd-2-clause", "size": 2678} |
### File: examples/kml.html
---
layout: example.html
title: KML
shortdesc: Rendering KML with a vector source.
docs: >
This example uses the <code>ol/format/KML</code> to parse KML for rendering with a vector source.
tags: "KML, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API k... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml.html", "license": "bsd-2-clause", "size": 395} |
### File: examples/kml.js
import KML from '../src/ol/format/KML.js';
import Map from '../src/ol/Map.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/kml.js", "license": "bsd-2-clause", "size": 1904} |
### File: examples/layer-clipping-vector.css
#map {
background: transparent;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-clipping-vector.css", "license": "bsd-2-clause", "size": 36} |
### File: examples/layer-clipping-vector.html
---
layout: example.html
title: Vector Clipping Layer
shortdesc: Vector Clipping Layer example
docs: >
Example of a clipping layer based on a vector source
tags: "clipping, openstreetmap, vector"
---
<div id="map" class="map"></div>
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-clipping-vector.html", "license": "bsd-2-clause", "size": 235} |
### File: examples/layer-clipping-vector.js
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {Fill, Style} from '../src/ol/style.js';
import {OSM, Stamen, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vec... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-clipping-vector.js", "license": "bsd-2-clause", "size": 1601} |
### File: examples/layer-clipping.css
#map {
background: transparent;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-clipping.css", "license": "bsd-2-clause", "size": 36} |
### File: examples/layer-clipping.html
---
layout: example.html
title: Layer Clipping
shortdesc: Layer clipping example
docs: >
Layer clipping example
tags: "clipping, openstreetmap"
---
<div id="map" class="map"></div>
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-clipping.html", "license": "bsd-2-clause", "size": 183} |
### File: examples/layer-clipping.js
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const osm = new TileLayer({
source: new OSM(),
});
const map = new Map({
layers: [osm],
target: 'map',
view... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-clipping.js", "license": "bsd-2-clause", "size": 1586} |
### File: examples/layer-extent.html
---
layout: example.html
title: Limited Layer Extent
shortdesc: Restricting layer rendering to a limited extent.
docs: >
This example uses the <code>layer.setExtent()</code> method to
modify the extent of the overlay layer. Use the controls above
to limit rendering based on a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-extent.html", "license": "bsd-2-clause", "size": 855} |
### File: examples/layer-extent.js
import Map from '../src/ol/Map.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import {transformExtent} from '../src/ol/proj.js';
function transform(extent) {
return transformExtent(ext... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-extent.js", "license": "bsd-2-clause", "size": 1409} |
### File: examples/layer-group.css
#layertree li > span {
cursor: pointer;
} | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-group.css", "license": "bsd-2-clause", "size": 43} |
### File: examples/layer-group.html
---
layout: example.html
title: Layer Groups
shortdesc: Example of a map with layer group.
docs: >
Example of a map with layer group.
tags: "tilejson, input, bind, group, layergroup"
resources:
- https://code.jquery.com/jquery-2.2.3.min.js
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiL... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-group.html", "license": "bsd-2-clause", "size": 2020} |
### File: examples/layer-group.js
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import View from '../src/ol/View.js';
import {Group as LayerGroup, Tile as TileLayer} from '../src/ol/layer.js';
import {fromLonLat} from '../src/ol/proj.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-group.js", "license": "bsd-2-clause", "size": 1996} |
### File: examples/layer-spy.html
---
layout: example.html
title: Layer Spy
shortdesc: View a portion of one layer over another
docs: >
<p>Layer rendering can be manipulated in <code>prerender</code> and <code>postrender</code> event listeners.
These listeners get an event with a reference to the Canvas rendering c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-spy.html", "license": "bsd-2-clause", "size": 793} |
### File: examples/layer-spy.js
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {fromLonLat} from '../src/ol/proj.js';
import {getRenderPixel} from '../src/ol/render.js';
const key = 'get_your_o... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-spy.js", "license": "bsd-2-clause", "size": 2579} |
### File: examples/layer-swipe.html
---
layout: example.html
title: Layer Swipe
shortdesc: Example of a Layer swipe map.
docs: >
Example of a Layer swipe map.
tags: "swipe, openstreetmap, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-swipe.html", "license": "bsd-2-clause", "size": 370} |
### File: examples/layer-swipe.js
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {getRenderPixel} from '../src/ol/render.js';
const osm = new TileLaye... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-swipe.js", "license": "bsd-2-clause", "size": 1672} |
### File: examples/layer-z-index.html
---
layout: example.html
title: Layer Z-Index
shortdesc: Example of ordering layers using Z-index.
docs: >
There are are two managed layers (square and triangle) and one unmanaged layer (star).</br>
The Z-index determines the rendering order; with {square: 1, triangle: 0, star:... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-z-index.html", "license": "bsd-2-clause", "size": 654} |
### File: examples/layer-z-index.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Fill,... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/OpenLayers", "path": "examples/layer-z-index.js", "license": "bsd-2-clause", "size": 1998} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.