text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: examples/reusable-source.html
---
layout: example.html
title: Reusable Source
shortdesc: Updating a tile source by changing the URL.
docs: >
You can call <code>source.setUrl()</code> to update the URL for a tile source. Note that when you change the URL for a tile source, existing tiles will not be replace... | {"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/reusable-source.html", "license": "bsd-2-clause", "size": 1002} |
### File: examples/reusable-source.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 key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
const b... | {"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/reusable-source.js", "license": "bsd-2-clause", "size": 1191} |
### File: examples/rotation.html
---
layout: example.html
title: View Rotation
shortdesc: Example of a rotated map.
docs: >
<p>Use <code>Alt+Shift+Drag</code> to rotate the map.</p>
tags: "rotation, 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/rotation.html", "license": "bsd-2-clause", "size": 220} |
### File: examples/rotation.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 map = new Map({
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new V... | {"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/rotation.js", "license": "bsd-2-clause", "size": 379} |
### File: examples/scale-line.html
---
layout: example.html
title: Scale Line
shortdesc: Example of a scale line.
docs: >
tags: "scale-line, openstreetmap"
---
<div id="map" class="map"></div>
<select id="units">
<option value="degrees">degrees</option>
<option value="imperial">imperial inch</option>
<option val... | {"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/scale-line.html", "license": "bsd-2-clause", "size": 868} |
### File: examples/scale-line.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 {ScaleLine, defaults as defaultControls} from '../src/ol/control.js';
const unitsSelect = document.getElementById... | {"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/scale-line.js", "license": "bsd-2-clause", "size": 2182} |
### File: examples/scaleline-indiana-east.html
---
layout: example.html
title: OpenStreetMap Reprojection with ScaleLine Control
shortdesc: Demonstrates client-side reprojection of OpenStreetMap to NAD83 Indiana East.
docs: >
This example shows client-side reprojection of OpenStreetMap to NAD83 Indiana East, includin... | {"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/scaleline-indiana-east.html", "license": "bsd-2-clause", "size": 419} |
### File: examples/scaleline-indiana-east.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 proj4 from 'proj4';
import {ScaleLine} from '../src/ol/control.js';
import {fromLonLat, transformExten... | {"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/scaleline-indiana-east.js", "license": "bsd-2-clause", "size": 1337} |
### File: examples/sea-level.css
#level {
display: inline-block;
width: 150px;
vertical-align: text-bottom;
}
a.location {
cursor: pointer;
}
#map {
background: #85ccf9;
}
| {"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/sea-level.css", "license": "bsd-2-clause", "size": 151} |
### File: examples/sea-level.html
---
layout: example.html
title: Sea Level
shortdesc: Render sea level at different elevations
docs: >
<p>
This example uses a <code>ol/source/Raster</code> with
<a href="https://www.mapbox.com/blog/terrain-rgb/">Mapbox Terrain-RGB tiles</a>
to "flood" areas below the elev... | {"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/sea-level.html", "license": "bsd-2-clause", "size": 1244} |
### File: examples/sea-level.js
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js';
import {Raster as RasterSource, XYZ} from '../src/ol/source.js';
import {fromLonLat} from '../src/ol/proj.js';
function flood(pixels, data... | {"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/sea-level.js", "license": "bsd-2-clause", "size": 2414} |
### File: examples/select-features.html
---
layout: example.html
title: Select Features
shortdesc: Example of using the Select interaction.
docs: >
Choose between <code>Single-click</code>, <code>Click</code>, <code>Hover</code> and <code>Alt+Click</code> as the event type for selection in the combobox below. When us... | {"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/select-features.html", "license": "bsd-2-clause", "size": 1444} |
### File: examples/select-features.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 Select from '../src/ol/interaction/Select.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.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/select-features.js", "license": "bsd-2-clause", "size": 2283} |
### File: examples/select-hover-features.html
---
layout: example.html
title: Select Features by Hover
shortdesc: Example of selecting features by hovering.
docs: >
In this example, a listener is registered on the map's <code>pointermove</code> to highlight the currently hovered feature.
tags: "select, vector"
---
<d... | {"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/select-hover-features.html", "license": "bsd-2-clause", "size": 331} |
### File: examples/select-hover-features.js
import Fill from '../src/ol/style/Fill.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 Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
import V... | {"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/select-hover-features.js", "license": "bsd-2-clause", "size": 1393} |
### File: examples/select-multiple-features.html
---
layout: example.html
title: Select multiple Features
shortdesc: Example of selecting multiple features.
docs: >
In this example, a listener is registered on the map's <code>singleclick</code> event to add and remove features from an array.
tags: "select, vector"
--... | {"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/select-multiple-features.html", "license": "bsd-2-clause", "size": 357} |
### File: examples/select-multiple-features.js
import Fill from '../src/ol/style/Fill.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 Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.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/select-multiple-features.js", "license": "bsd-2-clause", "size": 1410} |
### File: examples/semi-transparent-layer.css
.bw {
filter: grayscale(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/semi-transparent-layer.css", "license": "bsd-2-clause", "size": 35} |
### File: examples/semi-transparent-layer.html
---
layout: example.html
title: Semi-Transparent Layer
shortdesc: Example of a map with a semi-transparent layer.
docs: >
This example will display a tiled MaxBox layer semi-transparently over an OSM background. The OSM layer is changed to black and white by using a CSS ... | {"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/semi-transparent-layer.html", "license": "bsd-2-clause", "size": 531} |
### File: examples/semi-transparent-layer.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 TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import {fromLonLat} from '../src/ol/proj.js';
const key... | {"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/semi-transparent-layer.js", "license": "bsd-2-clause", "size": 901} |
### File: examples/shaded-relief.css
table.controls td {
text-align: center;
padding: 2px 5px;
}
| {"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/shaded-relief.css", "license": "bsd-2-clause", "size": 64} |
### File: examples/shaded-relief.html
---
layout: example.html
title: Shaded Relief
shortdesc: Calculate shaded relief from elevation data
docs: >
<p>
This example uses a <code>ol/source/Raster</code> to generate data
based on another source. The raster source accepts any number of
input sources (tile or... | {"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/shaded-relief.html", "license": "bsd-2-clause", "size": 1812} |
### File: examples/shaded-relief.js
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js';
import {OSM, Raster, XYZ} from '../src/ol/source.js';
/**
* Generates a shaded relief image given elevation data. Uses a 3x3
* neig... | {"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/shaded-relief.js", "license": "bsd-2-clause", "size": 4845} |
### File: examples/side-by-side.css
@media (min-width: 800px) {
.wrapper {
display: flex;
}
.half {
padding: 0 10px;
width: 50%;
float: left;
}
}
| {"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/side-by-side.css", "license": "bsd-2-clause", "size": 134} |
### File: examples/side-by-side.html
---
layout: example.html
title: Shared Views
shortdesc: Two maps share view properties
docs: >
Two maps (one Road, one Aerial) share the same center, resolution and rotation.
tags: "side-by-side, xyz, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your ... | {"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/side-by-side.html", "license": "bsd-2-clause", "size": 545} |
### File: examples/side-by-side.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 key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
'<a href="https://www.maptiler.com/copyright/"... | {"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/side-by-side.js", "license": "bsd-2-clause", "size": 1110} |
### File: examples/simple.html
---
layout: example.html
title: Simple Map
shortdesc: Example of a simple map.
docs: >
A simple map with an OSM source.
tags: "simple, 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/simple.html", "license": "bsd-2-clause", "size": 189} |
### File: examples/simple.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 map = new Map({
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new 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/simple.js", "license": "bsd-2-clause", "size": 338} |
### File: examples/snap.html
---
layout: example.html
title: Snap Interaction
shortdesc: Example of using the snap interaction together with draw and modify interactions.
docs: >
Example of using the snap interaction together with
draw and modify interactions. The snap interaction must be added
last, as it needs ... | {"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/snap.html", "license": "bsd-2-clause", "size": 1096} |
### File: examples/snap.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.js';
import {Draw, Modify, Select, Snap} from '../src/ol/interaction.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.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/snap.js", "license": "bsd-2-clause", "size": 3661} |
### File: examples/sphere-mollweide.html
---
layout: example.html
title: Sphere Mollweide
shortdesc: Example of a Sphere Mollweide map with a Graticule layer.
docs: >
Example of a Sphere Mollweide map with a Graticule layer.
tags: "graticule, Mollweide, projection, proj4js"
---
<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/sphere-mollweide.html", "license": "bsd-2-clause", "size": 273} |
### File: examples/sphere-mollweide.js
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Graticule from '../src/ol/layer/Graticule.js';
import Map from '../src/ol/Map.js';
import Projection from '../src/ol/proj/Projection.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource 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/sphere-mollweide.js", "license": "bsd-2-clause", "size": 1288} |
### File: examples/stamen.html
---
layout: example.html
title: Stamen Tiles
shortdesc: Example of a Stamen tile source.
docs: >
Two layers are composed: the watercolor base layer with the terrain labels.
tags: "stamen, watercolor, terrain-labels, two-layers"
---
<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/stamen.html", "license": "bsd-2-clause", "size": 267} |
### File: examples/stamen.js
import Map from '../src/ol/Map.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 {fromLonLat} from '../src/ol/proj.js';
const map = new Map({
layers: [
new TileLayer({
source: new ... | {"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/stamen.js", "license": "bsd-2-clause", "size": 560} |
### File: examples/static-image.html
---
layout: example.html
title: Static Image
shortdesc: Example of a static image layer.
docs: >
<p>
This example uses a <a href="http://xkcd.com/256/">static image</a>
as a layer source. The map view is configured with a custom
projection that translates image coordi... | {"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/static-image.html", "license": "bsd-2-clause", "size": 395} |
### File: examples/static-image.js
import ImageLayer from '../src/ol/layer/Image.js';
import Map from '../src/ol/Map.js';
import Projection from '../src/ol/proj/Projection.js';
import Static from '../src/ol/source/ImageStatic.js';
import View from '../src/ol/View.js';
import {getCenter} from '../src/ol/extent.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/static-image.js", "license": "bsd-2-clause", "size": 1042} |
### File: examples/street-labels.html
---
layout: example.html
title: Street Labels
shortdesc: Render street names.
docs: >
Example showing the use of a text style with `placement: 'line'` to render text along a path.
tags: "vector, label, streets, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value... | {"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/street-labels.html", "license": "bsd-2-clause", "size": 377} |
### File: examples/street-labels.js
import GeoJSON from '../src/ol/format/GeoJSON.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 {Fill, Style, Text} 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/street-labels.js", "license": "bsd-2-clause", "size": 1613} |
### File: examples/svg-layer.css
#map {
background: black;
}
.svg-layer path:hover {
opacity: 0.4;
}
| {"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/svg-layer.css", "license": "bsd-2-clause", "size": 73} |
### File: examples/svg-layer.html
---
layout: example.html
title: SVG Layer
shortdesc: Example of a map with an interactive svg layer.
docs: >
With a plain `ol/Layer` and a `render` function, we can use an interactive svg as layer. Hover over countries to see the interactivity that is defined purely with a css `:hove... | {"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/svg-layer.html", "license": "bsd-2-clause", "size": 378} |
### File: examples/svg-layer.js
import Layer from '../src/ol/layer/Layer.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {composeCssTransform} from '../src/ol/transform.js';
const map = new Map({
target: 'map',
view: new View({
center: [0, 0],
extent: [-180, -90, 180, ... | {"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/svg-layer.js", "license": "bsd-2-clause", "size": 1530} |
### File: examples/synthetic-lines.html
---
layout: example.html
title: Synthetic Lines
shortdesc: Synthetic lines example.
docs: >
tags: "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/synthetic-lines.html", "license": "bsd-2-clause", "size": 145} |
### File: examples/synthetic-lines.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';
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/synthetic-lines.js", "license": "bsd-2-clause", "size": 1233} |
### File: examples/synthetic-points.html
---
layout: example.html
title: Synthetic Points
shortdesc: Synthetic points example.
docs: >
tags: "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/synthetic-points.html", "license": "bsd-2-clause", "size": 147} |
### File: examples/synthetic-points.js
import Feature from '../src/ol/Feature.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 {Circle as CircleStyle, Fill, Stroke, Style} fro... | {"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/synthetic-points.js", "license": "bsd-2-clause", "size": 3094} |
### File: examples/teleport.html
---
layout: example.html
title: Teleporting Maps
shortdesc: Example of moving a map from one target to another.
docs: >
<p>Click on the teleport button the map to move the map from one target to another.</p>
tags: "teleport, openstreetmap"
---
<div id="map1" class="map"></div>
<div 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/teleport.html", "license": "bsd-2-clause", "size": 354} |
### File: examples/teleport.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 map = new Map({
layers: [
new TileLayer({
source: new OSM(),
}),
],
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/teleport.js", "license": "bsd-2-clause", "size": 575} |
### File: examples/templates/example-verbatim.html
{{{ contents }}}
| {"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/templates/example-verbatim.html", "license": "bsd-2-clause", "size": 17} |
### File: examples/templates/example.html
<!DOCTYPE html>
<html lang="en-US">
<head>
<script>
var gaProperty = 'UA-2577926-1';
// Disable tracking if the opt-out cookie exists.
var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disab... | {"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/templates/example.html", "license": "bsd-2-clause", "size": 9796} |
### File: examples/tile-load-events.css
.map {
background: #85ccf9;
}
.wrapper {
position: relative;
}
#progress {
position: absolute;
bottom: 0;
left: 0;
height: 0;
box-shadow: 0px 0px 1px 2px rgb(255,204,0);
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/tile-load-events.css", "license": "bsd-2-clause", "size": 225} |
### File: examples/tile-load-events.html
---
layout: example.html
title: Tile Load Events
shortdesc: Example using tile load events.
docs: >
Image tile sources fire events related to tile loading. You can
listen for <code>tileloadstart</code>, <code>tileloadend</code>,
and <code>tileloaderror</code> type events ... | {"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/tile-load-events.html", "license": "bsd-2-clause", "size": 737} |
### File: examples/tile-load-events.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';
/**
* Renders a progress bar.
* @param {HTMLElement} el The target element.
* @constructor
*/
function Progres... | {"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/tile-load-events.js", "license": "bsd-2-clause", "size": 2234} |
### File: examples/tile-transitions.html
---
layout: example.html
title: Tile Transitions
shortdesc: Custom configuration for opacity transitions on tiles.
docs: >
By default tiles are rendered with an opacity transition - fading in over
250 ms. To disable this behavior, set the <code>transition</code> option
of... | {"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/tile-transitions.html", "license": "bsd-2-clause", "size": 584} |
### File: examples/tile-transitions.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 key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
'<a href="https://www.maptiler.com/copyrig... | {"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/tile-transitions.js", "license": "bsd-2-clause", "size": 1207} |
### File: examples/tilejson.html
---
layout: example.html
title: TileJSON
shortdesc: Example of a TileJSON layer.
docs: >
Example of a TileJSON layer.
tags: "tilejson"
---
<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/tilejson.html", "license": "bsd-2-clause", "size": 174} |
### File: examples/tilejson.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';
const map = new Map({
layers: [
new TileLayer({
source: new TileJSON({
url: 'https://a.tiles... | {"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/tilejson.js", "license": "bsd-2-clause", "size": 462} |
### File: examples/tissot.html
---
layout: example.html
title: Tissot Indicatrix
shortdesc: Draw Tissot's indicatrices on maps.
docs: >
Example of [Tissot indicatrix](http://en.wikipedia.org/wiki/Tissot's_indicatrix) maps. The map on the top is an `EPSG:4326` map. The one on the bottom is `EPSG:3857`.
tags: "tissot, ... | {"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/tissot.html", "license": "bsd-2-clause", "size": 413} |
### File: examples/tissot.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import TileWMS from '../src/ol/source/TileWMS.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/l... | {"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/tissot.js", "license": "bsd-2-clause", "size": 1668} |
### File: examples/topojson.html
---
layout: example.html
title: TopoJSON
shortdesc: Demonstrates rendering of features from a TopoJSON topology.
docs: >
This example uses a vector layer with `ol/format/TopoJSON` for rendering features from [TopoJSON](https://github.com/mbostock/topojson/wiki).
tags: "topojson, vecto... | {"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/topojson.html", "license": "bsd-2-clause", "size": 451} |
### File: examples/topojson.js
import Map from '../src/ol/Map.js';
import TopoJSON from '../src/ol/format/TopoJSON.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 {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/topojson.js", "license": "bsd-2-clause", "size": 1442} |
### File: examples/topolis.html
---
layout: example.html
title: topolis integration
shortdesc: Example on how to use topolis with OpenLayers.
docs: >
Example showing the integration of <a href="https://github.com/bjornharrtell/topolis">topolis</a>
with OpenLayers, enabling creating and editing topological geometry.... | {"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/topolis.html", "license": "bsd-2-clause", "size": 757} |
### File: examples/topolis.js
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import MousePosition from '../src/ol/control/MousePosition.js';
import View from '../src/ol/View.js';
import {
Circle as CircleStyle,
Fill,
Stroke,
Style,
Text,
} from '../src/ol/style.js';
import {Dr... | {"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/topolis.js", "license": "bsd-2-clause", "size": 5289} |
### File: examples/tracing.html
---
layout: example.html
title: Tracing around a polygon
shortdesc: Example of setting up a draw interaction to easily snap to an existing feature.
docs: >
This example showcases how the draw interaction API can be set up to make snapping along
an existing geometry easier while prese... | {"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/tracing.html", "license": "bsd-2-clause", "size": 930} |
### File: examples/tracing.js
import Draw from '../src/ol/interaction/Draw.js';
import Feature from '../src/ol/Feature.js';
import Fill from '../src/ol/style/Fill.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import LineString from '../src/ol/geom/LineString.js';
import Map from '../src/ol/Map.js';
import Sna... | {"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/tracing.js", "license": "bsd-2-clause", "size": 7321} |
### File: examples/translate-features.html
---
layout: example.html
title: Translate Features
shortdesc: Example of a translate features interaction.
docs: >
This example demonstrates how the translate and select interactions can be used together. Zoom in to an area of interest and click to select a feature. Then d... | {"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/translate-features.html", "license": "bsd-2-clause", "size": 420} |
### File: examples/translate-features.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 VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {
Select,
Translate,
defaults as defaultInt... | {"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/translate-features.js", "license": "bsd-2-clause", "size": 902} |
### File: examples/turf.html
---
layout: example.html
title: turf.js
shortdesc: Example on how to use turf.js with OpenLayers.
docs: >
Example showing the integration of <a href="http://turfjs.org">turf.js</a>
with OpenLayers. The turf.js function <code>along</code> is used to
display a marker every 200 meters al... | {"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/turf.html", "license": "bsd-2-clause", "size": 468} |
### File: examples/turf.js
import GeoJSON from '../src/ol/format/GeoJSON.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 {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {fromLonLat} 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/turf.js", "license": "bsd-2-clause", "size": 1614} |
### File: examples/two-finger-pan-scroll.html
---
layout: example.html
title: Panning and page scrolling
shortdesc: Shows a map that allows page scrolling unless two fingers or Cmd/Ctrl are used to pan the map.
docs: >
This example shows a common behavior for page scrolling: on touch devices, when one finger
is pla... | {"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/two-finger-pan-scroll.html", "license": "bsd-2-clause", "size": 591} |
### File: examples/two-finger-pan-scroll.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 {DragPan, MouseWheelZoom, defaults} from '../src/ol/interaction.js';
import {platformModifierKeyOnly} f... | {"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/two-finger-pan-scroll.js", "license": "bsd-2-clause", "size": 791} |
### File: examples/utfgrid.css
#country-name {
color: black;
font-size: 12pt;
font-weight: bold;
text-shadow: white 0.1em 0.1em 0.2em;
}
| {"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/utfgrid.css", "license": "bsd-2-clause", "size": 114} |
### File: examples/utfgrid.html
---
layout: example.html
title: UTFGrid
shortdesc: This example shows how to read data from a UTFGrid source.
docs: >
<p>Point to a country to see its name and flag.</p>
Tiles made with <a href="http://tilemill.com">TileMill</a>. Hosting on <a href="mapbox.com">mapbox.com</a> or with... | {"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/utfgrid.html", "license": "bsd-2-clause", "size": 798} |
### File: examples/utfgrid.js
import Map from '../src/ol/Map.js';
import Overlay from '../src/ol/Overlay.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import TileLayer from '../src/ol/layer/Tile.js';
import UTFGrid from '../src/ol/source/UTFGrid.js';
import View from '../src/ol/View.js';
const key =
'pk.... | {"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/utfgrid.js", "license": "bsd-2-clause", "size": 2234} |
### File: examples/vector-esri-edit.html
---
layout: example.html
title: Editable ArcGIS REST Feature Service
shortdesc: Example of using an ArcGIS REST Feature Service in an editing application.
docs: >
This example loads features from ArcGIS REST Feature Service and allows to add new features or update existing fea... | {"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/vector-esri-edit.html", "license": "bsd-2-clause", "size": 674} |
### File: examples/vector-esri-edit.js
import EsriJSON from '../src/ol/format/EsriJSON.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 {
Draw,
Modify,
Select,
defaults as defau... | {"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/vector-esri-edit.js", "license": "bsd-2-clause", "size": 4854} |
### File: examples/vector-esri.html
---
layout: example.html
title: ArcGIS REST Feature Service
shortdesc: Example of using an ArcGIS REST Feature Service with a Tile strategy.
docs: >
This example loads new features from ArcGIS REST Feature Service when the view extent changes.
tags: "vector, esri, ArcGIS, REST, Fea... | {"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/vector-esri.html", "license": "bsd-2-clause", "size": 440} |
### File: examples/vector-esri.js
import EsriJSON from '../src/ol/format/EsriJSON.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 {Fill, Stroke, Style} from '../src/ol/style.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/vector-esri.js", "license": "bsd-2-clause", "size": 4213} |
### File: examples/vector-label-decluttering.html
---
layout: example.html
title: Vector Label Decluttering
shortdesc: Label decluttering with a custom renderer.
resources:
- https://cdn.polyfill.io/v2/polyfill.min.js?features=Set"
docs: >
Decluttering is used to avoid overlapping labels. The `overflow: true` setti... | {"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/vector-label-decluttering.html", "license": "bsd-2-clause", "size": 450} |
### File: examples/vector-label-decluttering.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... | {"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/vector-label-decluttering.js", "license": "bsd-2-clause", "size": 1146} |
### File: examples/vector-labels.css
h2 {
font-size: 1.5em;
line-height: 15px;
}
.scale-cnt {
margin: 5px;
}
.edit-form-ctn {
}
.edit-form {
float: left;
margin: 5px;
width: 230px;
padding: 4px;
border: 1px solid black;
}
.edit-form input[type="button"] {
float: right;
}
.edit-form-elem label {
... | {"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/vector-labels.css", "license": "bsd-2-clause", "size": 495} |
### File: examples/vector-labels.html
---
layout: example.html
title: Vector Labels
shortdesc: Example of GeoJSON features with labels.
docs: >
This example showcases a number of options that can be set on text styles.
When "Text/Wrap" is chosen (for example for the line features), the label is
wrapped by inserti... | {"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/vector-labels.html", "license": "bsd-2-clause", "size": 12340} |
### File: examples/vector-labels.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,
Text,
} from '../src/ol/style.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.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/vector-labels.js", "license": "bsd-2-clause", "size": 8052} |
### File: examples/vector-layer.html
---
layout: example.html
title: Vector Layer
shortdesc: Example of a countries vector layer with country information.
docs: >
The countries are loaded from a GeoJSON file. Information about countries is shown on hover and click.
tags: "vector, geojson"
---
<div id="map" class="map... | {"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/vector-layer.html", "license": "bsd-2-clause", "size": 320} |
### File: examples/vector-layer.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/ol/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/vector-layer.js", "license": "bsd-2-clause", "size": 2369} |
### File: examples/vector-osm.html
---
layout: example.html
title: OSM XML
shortdesc: Example of using the OSM XML source.
docs: >
OSM XML vector data is loaded dynamically from a the [Overpass API](http://overpass-api.de) using a bbox strategy. Note that panning and zooming will eventually lead to "Too many requests"... | {"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/vector-osm.html", "license": "bsd-2-clause", "size": 536} |
### File: examples/vector-osm.js
import Map from '../src/ol/Map.js';
import OSMXML from '../src/ol/format/OSMXML.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/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/vector-osm.js", "license": "bsd-2-clause", "size": 3641} |
### File: examples/vector-tile-info.css
#map {
position: relative;
}
#info {
z-index: 1;
opacity: 0;
position: absolute;
bottom: 0;
left: 0;
margin: 0;
background: rgba(0,60,136,0.7);
color: white;
border: 0;
transition: opacity 100ms ease-in;
}
| {"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/vector-tile-info.css", "license": "bsd-2-clause", "size": 229} |
### File: examples/vector-tile-info.html
---
layout: example.html
title: Vector Tile Info
shortdesc: Getting feature information from vector tiles.
docs: >
<p>Move your pointer over rendered features to display feature properties.</p>
tags: "vector tiles"
---
<div id="map" class="map">
<pre id="info"/>
</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/vector-tile-info.html", "license": "bsd-2-clause", "size": 274} |
### File: examples/vector-tile-info.js
import MVT from '../src/ol/format/MVT.js';
import Map from '../src/ol/Map.js';
import VectorTileLayer from '../src/ol/layer/VectorTile.js';
import VectorTileSource from '../src/ol/source/VectorTile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
... | {"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/vector-tile-info.js", "license": "bsd-2-clause", "size": 995} |
### File: examples/vector-tile-selection.html
---
layout: example.html
title: Vector Tile Selection
shortdesc: Select features from vector tiles.
docs: >
<p>
Click a rendered vector-tile feature to highlight it on the map. Click on an empty spot (ocean) to reset the selection.
By changing the action type to "... | {"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/vector-tile-selection.html", "license": "bsd-2-clause", "size": 990} |
### File: examples/vector-tile-selection.js
import MVT from '../src/ol/format/MVT.js';
import Map from '../src/ol/Map.js';
import VectorTileLayer from '../src/ol/layer/VectorTile.js';
import VectorTileSource from '../src/ol/source/VectorTile.js';
import View from '../src/ol/View.js';
import {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/vector-tile-selection.js", "license": "bsd-2-clause", "size": 2189} |
### File: examples/vector-tiles-4326.html
---
layout: example.html
title: Vector tiles in EPSG:4326
shortdesc: Example showing vector tiles in EPSG:4326 (styled using ol-mapbox-style)
docs: >
Example showing vector tiles in EPSG:4326 (styled using `ol-mapbox-style`) loaded from maptiler.com.
**Note**: Make sure to ... | {"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/vector-tiles-4326.html", "license": "bsd-2-clause", "size": 773} |
### File: examples/vector-tiles-4326.js
import MVT from '../src/ol/format/MVT.js';
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
import VectorTileSource from '../src/ol/source/VectorTile.js';
import View from '../src/ol/View.js';
import olms from 'ol-mapbox-style';
import {defaultResolutions} from 'ol-mapbox-... | {"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/vector-tiles-4326.js", "license": "bsd-2-clause", "size": 1601} |
### File: examples/vector-wfs-getfeature.html
---
layout: example.html
title: WFS - GetFeature
shortdesc: Example of making a WFS GetFeature request with a filter.
docs: >
This example generates a `GetFeature` request which uses a `PropertyIsEqualTo`
and a `PropertyIsLike` filter, and then posts the request to load... | {"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/vector-wfs-getfeature.html", "license": "bsd-2-clause", "size": 516} |
### File: examples/vector-wfs-getfeature.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 {GeoJSON, WFS} from '../src/ol/format.js';
import {Stroke, Style} from '../src/ol/style.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/vector-wfs-getfeature.js", "license": "bsd-2-clause", "size": 2138} |
### File: examples/vector-wfs.html
---
layout: example.html
title: WFS
shortdesc: Example of using WFS with a BBOX strategy.
docs: >
This example loads new features from GeoServer WFS when the view extent changes.
tags: "vector, WFS, bbox, loading, server, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
... | {"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/vector-wfs.html", "license": "bsd-2-clause", "size": 388} |
### File: examples/vector-wfs.js
import GeoJSON from '../src/ol/format/GeoJSON.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 {Stroke, Style} from '../src/ol/style.js';
import {Tile a... | {"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/vector-wfs.js", "license": "bsd-2-clause", "size": 1652} |
### File: examples/webgl-points-layer.html
---
layout: example.html
title: WebGL points layer
shortdesc: Using a WebGL-optimized layer to render a large quantities of points
docs: >
This example shows how to use a `WebGLPointsLayer` to show a large amount of points on the map.
The layer is given a style in JSON for... | {"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/webgl-points-layer.html", "license": "bsd-2-clause", "size": 5407} |
### File: examples/webgl-points-layer.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 TileLayer from '../src/ol/layer/Tile.js';
import Vector from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import WebGLP... | {"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/webgl-points-layer.js", "license": "bsd-2-clause", "size": 4756} |
### File: examples/webpack/config.js
const TerserPlugin = require('terser-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const ExampleBuilder = require('./example-builder');
const fs = require('fs');
const path = require('path');
const src = path.join(__dirname, '..');
const examples = fs
.rea... | {"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/webpack/config.js", "license": "bsd-2-clause", "size": 2213} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.