text
stringlengths
24
1.04M
metadata
stringlengths
233
497
### File: examples/layer-zoom-limits.html --- layout: example.html title: Layer Zoom Limits shortdesc: Using minZoom and maxZoom to control layer visibility. docs: > Layers support `minZoom` and `maxZoom` options for controlling visibility based on the view's zoom level. If min or max zoom are set, the layer will o...
{"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-zoom-limits.html", "license": "bsd-2-clause", "size": 650}
### File: examples/layer-zoom-limits.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 {fromLonLat, transformExtent} from '../src/ol/proj.js'; const m...
{"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-zoom-limits.js", "license": "bsd-2-clause", "size": 1040}
### File: examples/lazy-source.css button.code { font-family: Monaco,Menlo,Consolas,"Courier New",monospace; font-size: 12px; padding: 5px; margin: 0 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/lazy-source.css", "license": "bsd-2-clause", "size": 135}
### File: examples/lazy-source.html --- layout: example.html title: Lazy Source shortdesc: Example of setting a layer source after construction. docs: > <p>Typically, the source for a layer is provided to the layer constructor. If you need to set a layer source after construction, this can be done with the <code>...
{"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/lazy-source.html", "license": "bsd-2-clause", "size": 686}
### File: examples/lazy-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'; const source = new OSM(); const layer = new TileLayer(); const map = new Map({ layers: [layer], 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/lazy-source.js", "license": "bsd-2-clause", "size": 532}
### File: examples/line-arrows.html --- layout: example.html title: LineString Arrows shortdesc: Example of drawing arrows for each line string segment. docs: > Example of drawing arrows for each line string segment. tags: "draw, vector, arrow" --- <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/line-arrows.html", "license": "bsd-2-clause", "size": 248}
### File: examples/line-arrows.js import Draw from '../src/ol/interaction/Draw.js'; import Map from '../src/ol/Map.js'; import Point from '../src/ol/geom/Point.js'; import View from '../src/ol/View.js'; import {Icon, Stroke, Style} 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/line-arrows.js", "license": "bsd-2-clause", "size": 1453}
### File: examples/localized-openstreetmap.html --- layout: example.html title: Localized OpenStreetMap shortdesc: Example of a localized OpenStreetMap map with a custom tile server and a custom attribution. docs: > <p>The base layer is <a href="https://www.opencyclemap.org/">OpenCycleMap</a> with an overlay from <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/localized-openstreetmap.html", "license": "bsd-2-clause", "size": 545}
### File: examples/localized-openstreetmap.js import Map from '../src/ol/Map.js'; import OSM, {ATTRIBUTION} from '../src/ol/source/OSM.js'; import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; const openCycleMapLayer = new TileLayer({ source: new OSM({ attributions: [ 'All...
{"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/localized-openstreetmap.js", "license": "bsd-2-clause", "size": 982}
### File: examples/magnify.html --- layout: example.html title: Magnify shortdesc: Show a magnified version of imager under the pointer docs: > <p>This example makes use of the <code>postrender</code> event listener to oversample imagery in a circle around the pointer location. Listeners for this event have access...
{"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/magnify.html", "license": "bsd-2-clause", "size": 671}
### File: examples/magnify.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_own...
{"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/magnify.js", "license": "bsd-2-clause", "size": 3356}
### File: examples/mapbox-layer.html --- layout: example.html title: Mapbox-gl Layer shortdesc: Example of a Mapbox-gl-js layer integration. docs: > Show how to add a mapbox-gl-js layer in an openlayers map. **Note**: Make sure to get your own API key at https://www.maptiler.com/cloud/ when using this example. No 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/mapbox-layer.html", "license": "bsd-2-clause", "size": 677}
### File: examples/mapbox-layer.js import GeoJSON from '../src/ol/format/GeoJSON.js'; import Layer from '../src/ol/layer/Layer.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...
{"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/mapbox-layer.js", "license": "bsd-2-clause", "size": 2215}
### File: examples/mapbox-style.css .ol-rotate { left: .5em; bottom: .5em; top: unset; right: unset; }
{"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/mapbox-style.css", "license": "bsd-2-clause", "size": 74}
### File: examples/mapbox-style.html --- layout: example.html title: Vector tiles created from a Mapbox Style object shortdesc: Example of using ol-mapbox-style with tiles from maptiler.com. docs: > Example of using `ol-mapbox-style` with tiles from maptiler.com. **Note**: Make sure to get your own API key at https...
{"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/mapbox-style.html", "license": "bsd-2-clause", "size": 604}
### File: examples/mapbox-style.js import FullScreen from '../src/ol/control/FullScreen.js'; import apply from 'ol-mapbox-style'; apply( 'map', 'https://api.maptiler.com/maps/topo/style.json?key=get_your_own_D6rA4zTHduk6KOKTXzGB' ).then(function (map) { map.addControl(new FullScreen()); });
{"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/mapbox-style.js", "license": "bsd-2-clause", "size": 264}
### File: examples/mapbox-vector-layer.css .map { background: #f8f4f0; }
{"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/mapbox-vector-layer.css", "license": "bsd-2-clause", "size": 32}
### File: examples/mapbox-vector-layer.html --- layout: example.html title: Mapbox Vector Layer shortdesc: Rendering a layer with a Mapbox-hosted style. docs: > The MapboxVector layer allows you to create a layer based on a Mapbox-hosted style using a single vector source. If your style uses more than one 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/mapbox-vector-layer.html", "license": "bsd-2-clause", "size": 716}
### File: examples/mapbox-vector-layer.js import Map from '../src/ol/Map.js'; import MapboxVector from '../src/ol/layer/MapboxVector.js'; import View from '../src/ol/View.js'; const map = new Map({ target: 'map', layers: [ new MapboxVector({ styleUrl: 'mapbox://styles/mapbox/bright-v9', accessToken...
{"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/mapbox-vector-layer.js", "license": "bsd-2-clause", "size": 457}
### File: examples/mapbox-vector-tiles-advanced.css .map { background: #f8f4f0; }
{"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/mapbox-vector-tiles-advanced.css", "license": "bsd-2-clause", "size": 32}
### File: examples/mapbox-vector-tiles-advanced.html --- layout: example.html title: Advanced Mapbox Vector Tiles shortdesc: Example of a Mapbox vector tiles map with custom tile grid. docs: > A vector tiles map which reuses the same source tiles for subsequent zoom levels to save bandwidth on mobile devices. **Note*...
{"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/mapbox-vector-tiles-advanced.html", "license": "bsd-2-clause", "size": 628}
### File: examples/mapbox-vector-tiles-advanced.js import MVT from '../src/ol/format/MVT.js'; import Map from '../src/ol/Map.js'; import TileGrid from '../src/ol/tilegrid/TileGrid.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; import 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/mapbox-vector-tiles-advanced.js", "license": "bsd-2-clause", "size": 1954}
### File: examples/mapbox-vector-tiles.css .map { background: #f8f4f0; }
{"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/mapbox-vector-tiles.css", "license": "bsd-2-clause", "size": 32}
### File: examples/mapbox-vector-tiles.html --- layout: example.html title: Mapbox Vector Tiles shortdesc: Example of a Mapbox vector tiles map. docs: > A simple vector tiles map. **Note**: Make sure to get your own Mapbox API key when using this example. No map will be visible when the API key has expired. tags: "si...
{"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/mapbox-vector-tiles.html", "license": "bsd-2-clause", "size": 567}
### File: examples/mapbox-vector-tiles.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, Icon, Stroke, Style, Te...
{"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/mapbox-vector-tiles.js", "license": "bsd-2-clause", "size": 1105}
### File: examples/mapguide-untiled.html --- layout: example.html title: MapGuide Untiled shortdesc: Example of a untiled MapGuide map. docs: > Example of a untiled MapGuide map. tags: "mapguide" --- <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/mapguide-untiled.html", "license": "bsd-2-clause", "size": 194}
### File: examples/mapguide-untiled.js import ImageLayer from '../src/ol/layer/Image.js'; import ImageMapGuide from '../src/ol/source/ImageMapGuide.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; const mdf = 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition'; const agentUrl = 'ht...
{"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/mapguide-untiled.js", "license": "bsd-2-clause", "size": 1066}
### File: examples/measure.css .ol-tooltip { position: relative; background: rgba(0, 0, 0, 0.5); border-radius: 4px; color: white; padding: 4px 8px; opacity: 0.7; white-space: nowrap; font-size: 12px; } .ol-tooltip-measure { opacity: 1; font-weight: bold; } .ol-tooltip-static { background-color: #...
{"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/measure.css", "license": "bsd-2-clause", "size": 667}
### File: examples/measure.html --- layout: example.html title: Measure shortdesc: Using a draw interaction to measure lengths and areas. docs: > <p>The <code>getLength()</code> and <code>getArea()</code> functions calculate spherical lengths and areas for geometries. Lengths are calculated by assuming great cir...
{"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/measure.html", "license": "bsd-2-clause", "size": 1083}
### File: examples/measure.js import Draw from '../src/ol/interaction/Draw.js'; import Map from '../src/ol/Map.js'; import Overlay from '../src/ol/Overlay.js'; import View from '../src/ol/View.js'; import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; import {LineString, Polygon} 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/measure.js", "license": "bsd-2-clause", "size": 6306}
### File: examples/min-max-resolution.html --- layout: example.html title: Layer Min/Max Resolution shortdesc: Show/hide layers depending on current view resolution. docs: > <p>Zoom in twice: the MapBox layer should hide and the OSM layer should be shown.</p> <p>If you continue to zoom in, you'll see the OSM layer ...
{"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/min-max-resolution.html", "license": "bsd-2-clause", "size": 660}
### File: examples/min-max-resolution.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'; const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5M...
{"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/min-max-resolution.js", "license": "bsd-2-clause", "size": 880}
### File: examples/min-zoom.html --- layout: example.html title: View Min-Zoom shortdesc: Demonstrates how the view's minimum zoom level can be changed. docs: > The <code>minZoom</code> option for a view limits how far out you can zoom. This property can be updated by calling <code>view.setMinZoom(newMinZoom)</cod...
{"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/min-zoom.html", "license": "bsd-2-clause", "size": 492}
### File: examples/min-zoom.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 viewport = document.getElementById('map'); function getMinZoom() { const width = viewport.clientWidth; return M...
{"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/min-zoom.js", "license": "bsd-2-clause", "size": 750}
### File: examples/mobile-full-screen.html --- layout: example-verbatim.html title: Full-Screen Mobile shortdesc: Example of a full screen map. tags: "fullscreen, geolocation, mobile" cloak: - key: ApTJzdkyN1DdFKkRAE6QIDtzihNaf6IWJsT-nQ_2eMoO4PN__0Tzhl2-WgJtXFSp value: Your Bing Maps Key from http://www.bingmaps...
{"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/mobile-full-screen.html", "license": "bsd-2-clause", "size": 948}
### File: examples/mobile-full-screen.js import BingMaps from '../src/ol/source/BingMaps.js'; import Geolocation from '../src/ol/Geolocation.js'; import Map from '../src/ol/Map.js'; import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; const view = new View({ center: [0, 0], zoom: ...
{"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/mobile-full-screen.js", "license": "bsd-2-clause", "size": 793}
### File: examples/modify-features.html --- layout: example.html title: Modify Features shortdesc: Editing features with the modify interaction. docs: > <p>This example demonstrates how the modify and select interactions can be used together. Zoom in to an area of interest and select a feature for editing. Then dr...
{"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/modify-features.html", "license": "bsd-2-clause", "size": 519}
### File: examples/modify-features.js import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import { Modify, Select, defaults as defaultInteractions, } from '../src/ol/interaction.js'; import {OSM, Vector as VectorSource} from '../src/ol/sourc...
{"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/modify-features.js", "license": "bsd-2-clause", "size": 894}
### File: examples/modify-test.css .map { background: grey; }
{"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/modify-test.css", "license": "bsd-2-clause", "size": 29}
### File: examples/modify-test.html --- layout: example.html title: Modify Features Test shortdesc: Example for testing feature modification. docs: > Example for testing feature modification. tags: "modify, edit, 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/modify-test.html", "license": "bsd-2-clause", "size": 224}
### File: examples/modify-test.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 {Circle as CircleStyle, Fill, Stroke, Style} 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/modify-test.js", "license": "bsd-2-clause", "size": 6775}
### File: examples/mouse-position.html --- layout: example.html title: Mouse Position shortdesc: Example of a mouse position control, outside the map. docs: > Example of a mouse position control, outside the map. tags: "mouse-position, openstreetmap" --- <div id="map" class="map"></div> <div id="mouse-position"></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/mouse-position.html", "license": "bsd-2-clause", "size": 559}
### File: examples/mouse-position.js import Map from '../src/ol/Map.js'; import MousePosition from '../src/ol/control/MousePosition.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 {createStringXY} from '../src/ol/coordinate.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/mouse-position.js", "license": "bsd-2-clause", "size": 1349}
### File: examples/moveend.html --- layout: example.html title: Moveend Event shortdesc: Use of the moveend event. docs: > <p>In this example, a listener is registered for the map's <code>moveend</code> event. Whenever this listener is called, it updates the inputs below with the map extent in decimal degrees.</p> 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/moveend.html", "license": "bsd-2-clause", "size": 556}
### File: examples/moveend.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 {getBottomLeft, getTopRight} from '../src/ol/extent.js'; import {toLonLat} from '../src/ol/proj.js'; const map = 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/moveend.js", "license": "bsd-2-clause", "size": 1047}
### File: examples/navigation-controls.html --- layout: example.html title: Navigation Controls shortdesc: Shows how to add navigation controls. docs: > <p>This example shows how to use the <code>ol/control/ZoomToExtent</code> control.</p> <p>The following navigation controls are added to the map:</p> <ul> <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/navigation-controls.html", "license": "bsd-2-clause", "size": 462}
### File: examples/navigation-controls.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 {ZoomToExtent, defaults as defaultControls} from '../src/ol/control.js'; const map = new Map({ control...
{"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/navigation-controls.js", "license": "bsd-2-clause", "size": 627}
### File: examples/offscreen-canvas.css .map { background: rgba(232, 230, 223, 1); } .ol-rotate { left: .5em; bottom: .5em; top: unset; right: unset; }
{"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/offscreen-canvas.css", "license": "bsd-2-clause", "size": 121}
### File: examples/offscreen-canvas.html --- layout: example.html title: Vector tiles rendered in an offscreen canvas shortdesc: Example of a map that delegates rendering to a worker. docs: > The map in this example is rendered in a web worker, using `OffscreenCanvas`. **Note:** This is currently only supported in Ch...
{"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/offscreen-canvas.html", "license": "bsd-2-clause", "size": 396}
### File: examples/offscreen-canvas.js import Layer from '../src/ol/layer/Layer.js'; import Map from '../src/ol/Map.js'; import Source from '../src/ol/source/Source.js'; import View from '../src/ol/View.js'; import Worker from 'worker-loader!./offscreen-canvas.worker.js'; //eslint-disable-line import stringify from '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/offscreen-canvas.js", "license": "bsd-2-clause", "size": 4724}
### File: examples/offscreen-canvas.worker.js import MVT from '../src/ol/format/MVT.js'; import TileQueue from '../src/ol/TileQueue.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; import stringify from 'json-stringify-safe'; import styleFu...
{"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/offscreen-canvas.worker.js", "license": "bsd-2-clause", "size": 4917}
### File: examples/osm-vector-tiles.css .map { background: #f8f4f0; }
{"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/osm-vector-tiles.css", "license": "bsd-2-clause", "size": 32}
### File: examples/osm-vector-tiles.html --- layout: example.html title: OSM Vector Tiles shortdesc: Using OpenStreetMap vector tiles. docs: > A simple vector tiles map with Mapzen vector tiles. This example uses the TopoJSON format's `layerName` option to determine the layer ("water", "roads", "buildings") for styli...
{"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/osm-vector-tiles.html", "license": "bsd-2-clause", "size": 542}
### File: examples/osm-vector-tiles.js import Map from '../src/ol/Map.js'; import TopoJSON from '../src/ol/format/TopoJSON.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} 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/osm-vector-tiles.js", "license": "bsd-2-clause", "size": 2407}
### File: examples/overlay.css #marker { width: 20px; height: 20px; border: 1px solid #088; border-radius: 10px; background-color: #0FF; opacity: 0.5; } #vienna { text-decoration: none; color: white; font-size: 11pt; font-weight: bold; text-shadow: black 0.1em 0.1em 0.2em; } .popover-content { m...
{"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/overlay.css", "license": "bsd-2-clause", "size": 308}
### File: examples/overlay.html --- layout: example.html title: Overlay shortdesc: Demonstrates overlays. docs: > <p>The popups are created using <a href="http://getbootstrap.com/javascript/#popovers">Popovers</a> from Bootstrap.</p> tags: "overlay, popup, bootstrap, popover" resources: - https://code.jquery.com/jq...
{"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/overlay.html", "license": "bsd-2-clause", "size": 779}
### File: examples/overlay.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.js'; import View from '../src/ol/View.js'; import {fromLonLat, toLonLat} from '../src/ol/proj.js'; import {toStringHDMS} fr...
{"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/overlay.js", "license": "bsd-2-clause", "size": 1447}
### File: examples/overviewmap-custom.css .mapcontainer { position: relative; } div.ol-custom-overviewmap, div.ol-custom-overviewmap.ol-uncollapsible { bottom: auto; left: auto; right: 0; top: 0; } div.ol-custom-overviewmap:not(.ol-collapsed) { border: 1px solid black; } div.ol-custom-overviewmap div.ol...
{"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/overviewmap-custom.css", "license": "bsd-2-clause", "size": 567}
### File: examples/overviewmap-custom.html --- layout: example.html title: Custom Overview Map shortdesc: Example of OverviewMap control with advanced customization. docs: > <p>This example demonstrates how you can customize the overviewmap control using its supported options as well as defining custom CSS. You can ...
{"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/overviewmap-custom.html", "license": "bsd-2-clause", "size": 658}
### File: examples/overviewmap-custom.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 { DragRotateAndZoom, defaults as defaultInteractions, } from '../src/ol/interaction.js'; import {Overv...
{"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/overviewmap-custom.js", "license": "bsd-2-clause", "size": 1296}
### File: examples/overviewmap.html --- layout: example.html title: Overview Map Control shortdesc: Example of OverviewMap control. docs: > This example demonstrates the use of the OverviewMap control. Both the main map and the overview map are configured with layers using the same source. Please note that explicit...
{"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/overviewmap.html", "license": "bsd-2-clause", "size": 408}
### File: examples/overviewmap.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 {OverviewMap, defaults as defaultControls} from '../src/ol/control.js'; const source = new OSM(); const overview...
{"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/overviewmap.js", "license": "bsd-2-clause", "size": 628}
### File: examples/page-scroll.html --- layout: example.html title: Page Scrolling shortdesc: Shows a map that does not interrupt page scrolling. docs: > To perform wheel/trackpad zoom and drag-pan actions only when the map has the focus, configure your map div with a `tabindex` attribute. tags: "trackpad, mousewhe...
{"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/page-scroll.html", "license": "bsd-2-clause", "size": 358}
### File: examples/page-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'; const map = new Map({ layers: [ new TileLayer({ source: new OSM(), }), ], target: 'map', view: ne...
{"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/page-scroll.js", "license": "bsd-2-clause", "size": 338}
### File: examples/permalink.html --- layout: example.html title: Permalink shortdesc: Example on how to create permalinks. docs: > In this example the <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history" target="_blank">HTML 5 History API</a> is used to update the b...
{"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/permalink.html", "license": "bsd-2-clause", "size": 775}
### File: examples/permalink.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'; // default zoom, center and rotation let zoom = 2; let center = [0, 0]; let rotation = 0; if (window.location.hash !== '...
{"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/permalink.js", "license": "bsd-2-clause", "size": 1892}
### File: examples/pinch-zoom.html --- layout: example.html title: Pinch Zoom shortdesc: Restrict pinch zooming to integer zoom levels. docs: > By default, the `ol/interaction/PinchZoom` can leave the map at fractional zoom levels. If instead you want to constrain pinch zooming to integer zoom levels, set <code>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/pinch-zoom.html", "license": "bsd-2-clause", "size": 415}
### File: examples/pinch-zoom.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 { PinchZoom, defaults as defaultInteractions, } from '../src/ol/interaction.js'; const map = new Map({ inte...
{"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/pinch-zoom.js", "license": "bsd-2-clause", "size": 526}
### File: examples/polygon-styles.html --- layout: example.html title: Custom Polygon Styles shortdesc: Showing the vertices of a polygon with a custom style geometry. docs: > In this example two different styles are created for the polygons: * The first style is for the polygons themselves. * The second style ...
{"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/polygon-styles.html", "license": "bsd-2-clause", "size": 408}
### File: examples/polygon-styles.js import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import MultiPoint from '../src/ol/geom/MultiPoint.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; import View from '../src/ol/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/polygon-styles.js", "license": "bsd-2-clause", "size": 2787}
### File: examples/popup.css .ol-popup { position: absolute; background-color: white; box-shadow: 0 1px 4px rgba(0,0,0,0.2); padding: 15px; border-radius: 10px; border: 1px solid #cccccc; bottom: 12px; left: -50px; min-width: 280px; } .ol-popup:after, .ol-popup:before { top: 100%; border: solid tr...
{"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/popup.css", "license": "bsd-2-clause", "size": 743}
### File: examples/popup.html --- layout: example.html title: Popup shortdesc: Uses an overlay to create a popup. docs: > <p> Click on the map to get a popup. The popup is composed of a few basic elements: a container, a close button, and a place for the content. To anchor the popup to the map, an <code>ol/Over...
{"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/popup.html", "license": "bsd-2-clause", "size": 846}
### File: examples/popup.js import Map from '../src/ol/Map.js'; import Overlay from '../src/ol/Overlay.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 {toLonLat} from '../src/ol/proj.js'; import {toStringHDMS} from '../src/ol/...
{"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/popup.js", "license": "bsd-2-clause", "size": 1842}
### File: examples/preload.html --- layout: example.html title: Preload Tiles shortdesc: Example of tile preloading. docs: > <p>The map on the top preloads low resolution tiles. The map on the bottom does not use any preloading. Try zooming out and panning to see the difference.</p> tags: "preload, bing" cloak: -...
{"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/preload.html", "license": "bsd-2-clause", "size": 503}
### File: examples/preload.js import BingMaps from '../src/ol/source/BingMaps.js'; import Map from '../src/ol/Map.js'; import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; const view = new View({ center: [-4808600, -2620936], zoom: 8, }); const map1 = new Map({ layers: [ ne...
{"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/preload.js", "license": "bsd-2-clause", "size": 858}
### File: examples/print-to-scale.css .wrapper { max-width: 566px; width: 100%; height: 400px; overflow: hidden; }
{"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/print-to-scale.css", "license": "bsd-2-clause", "size": 85}
### File: examples/print-to-scale.html --- layout: example.html title: Print to scale example shortdesc: Example of printing a map to a specified scale. docs: > Example of printing a map to a specified scale. The print is exported as a PDF using the <a href="https://github.com/MrRio/jsPDF" target="_blank">jsPDF</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/print-to-scale.html", "license": "bsd-2-clause", "size": 1952}
### File: examples/print-to-scale.js import Map from '../src/ol/Map.js'; import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js'; import proj4 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/print-to-scale.js", "license": "bsd-2-clause", "size": 4145}
### File: examples/raster.css .rel { position: relative } #plot { pointer-events: none; position: absolute; bottom: 10px; left: 10px; } .bar { pointer-events: auto; fill: #AFAFB9; } .bar.selected { fill: green; } .tip { position: absolute; background: black; color: white; padding: 6px; fon...
{"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/raster.css", "license": "bsd-2-clause", "size": 382}
### File: examples/raster.html --- layout: example.html title: Raster Source shortdesc: Demonstrates pixelwise operations with a raster source. 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 (ti...
{"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/raster.html", "license": "bsd-2-clause", "size": 1169}
### File: examples/raster.js import Map from '../src/ol/Map.js'; import RasterSource from '../src/ol/source/Raster.js'; import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; const minVgi = 0; const maxVgi = 0.25; cons...
{"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/raster.js", "license": "bsd-2-clause", "size": 5569}
### File: examples/region-growing.css table.controls td { min-width: 110px; 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/region-growing.css", "license": "bsd-2-clause", "size": 62}
### File: examples/region-growing.html --- layout: example.html title: Region Growing shortdesc: Grow a region from a seed pixel docs: > <p>Click a region on the map. The computed region will be red.</p> <p> This example uses a <code>ol/source/Raster</code> to generate data based on another source. The ras...
{"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/region-growing.html", "license": "bsd-2-clause", "size": 1440}
### File: examples/region-growing.js import Map from '../src/ol/Map.js'; import RasterSource from '../src/ol/source/Raster.js'; import View from '../src/ol/View.js'; import XYZ from '../src/ol/source/XYZ.js'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; import {fromLonLat} from '../src/ol/...
{"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/region-growing.js", "license": "bsd-2-clause", "size": 3961}
### File: examples/regularshape.html --- layout: example.html title: Regular Shapes shortdesc: Example of some Regular Shape styles. docs: > This example shows how several regular shapes or symbols (representing `x`, `cross`, `star`, `triangle`, `square` and `stacked`) can be created. Style `stacked` represent...
{"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/regularshape.html", "license": "bsd-2-clause", "size": 447}
### File: examples/regularshape.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/regularshape.js", "license": "bsd-2-clause", "size": 2392}
### File: examples/render-geometry.html --- layout: example.html title: Render geometries to a canvas shortdesc: Example of rendering geometries to an arbitrary canvas. docs: > This example shows how to render geometries to an arbitrary canvas. tags: "render, geometry, canvas" --- <canvas id="canvas"></canvas>
{"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/render-geometry.html", "license": "bsd-2-clause", "size": 274}
### File: examples/render-geometry.js import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js'; import {LineString, Point, Polygon} from '../src/ol/geom.js'; import {toContext} from '../src/ol/render.js'; const canvas = document.getElementById('canvas'); const vectorContext = toContext(canvas.getC...
{"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/render-geometry.js", "license": "bsd-2-clause", "size": 837}
### File: examples/reprojection-by-code.html --- layout: example.html title: Reprojection with EPSG.io Search shortdesc: Demonstrates client-side raster reprojection of OSM to arbitrary projection docs: > This example shows client-side raster reprojection capabilities from OSM (EPSG:3857) to arbitrary projection by...
{"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/reprojection-by-code.html", "license": "bsd-2-clause", "size": 1035}
### File: examples/reprojection-by-code.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 TileImage from '../src/ol/source/TileImage.js'; import TileLayer from '../src/ol/layer/Ti...
{"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/reprojection-by-code.js", "license": "bsd-2-clause", "size": 4035}
### File: examples/reprojection-image.html --- layout: example.html title: Image Reprojection shortdesc: Demonstrates client-side reprojection of single image source. docs: > This example shows client-side reprojection of single image source. tags: "reprojection, projection, proj4js, image, imagestatic" --- <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/reprojection-image.html", "license": "bsd-2-clause", "size": 381}
### File: examples/reprojection-image.js import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; import Static from '../src/ol/source/ImageStatic.js'; import View from '../src/ol/View.js'; import proj4 from 'proj4'; import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.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/reprojection-image.js", "license": "bsd-2-clause", "size": 1485}
### File: examples/reprojection-wgs84.html --- layout: example.html title: OpenStreetMap Reprojection shortdesc: Demonstrates client-side reprojection of OpenStreetMap in WGS84. docs: > This example shows client-side reprojection of OpenStreetMap in WGS84. tags: "reprojection, projection, openstreetmap, wgs84, tile" ...
{"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/reprojection-wgs84.html", "license": "bsd-2-clause", "size": 314}
### File: examples/reprojection-wgs84.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', 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/reprojection-wgs84.js", "license": "bsd-2-clause", "size": 367}
### File: examples/reprojection.html --- layout: example.html title: Raster Reprojection shortdesc: Demonstrates client-side raster reprojection between various projections. docs: > This example shows client-side raster reprojection between various projections. tags: "reprojection, projection, proj4js, osm, wms, wmts...
{"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/reprojection.html", "license": "bsd-2-clause", "size": 1837}
### File: examples/reprojection.js import Map from '../src/ol/Map.js'; import TileGrid from '../src/ol/tilegrid/TileGrid.js'; import TileLayer from '../src/ol/layer/Tile.js'; import View from '../src/ol/View.js'; import WMTS, {optionsFromCapabilities} from '../src/ol/source/WMTS.js'; import WMTSCapabilities 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/reprojection.js", "license": "bsd-2-clause", "size": 7557}
### File: examples/resources/common.js (function() { function compress(json) { return LZString.compressToBase64(JSON.stringify(json)) .replace(/\+/g, `-`) .replace(/\//g, `_`) .replace(/=+$/, ``); } var htmlClipboard = new Clipboard('#copy-html-button'); htmlClipboard.on('success', funct...
{"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/resources/common.js", "license": "bsd-2-clause", "size": 3071}
### File: examples/resources/layout.css @import url(https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700); body { font-family: 'Quattrocento Sans', sans-serif; font-size: 16px; } .navbar { background-color: #1F6B75; color: white; border: 0; border-radius: 0; } .navbar-brand { color...
{"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/resources/layout.css", "license": "bsd-2-clause", "size": 1908}
### File: examples/resources/mapbox-streets-v6-style.js // Styles for the mapbox-streets-v6 vector tile data set. Loosely based on // http://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6.json function createMapboxStreetsV6Style(Style, Fill, Stroke, Icon, Text) { var fill = new Fill({color: ''}); var stroke = 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/resources/mapbox-streets-v6-style.js", "license": "bsd-2-clause", "size": 12455}
### File: examples/resources/prism/prism.css /* PrismJS 1.10.0 http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ /** * prism.js default theme for JavaScript, CSS and HTML * Based on dabblet (http://dabblet.com) * @author Lea Verou */ code[class*="language-"], pre[class*="langua...
{"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/resources/prism/prism.css", "license": "bsd-2-clause", "size": 2328}