Skip to content

Instantly share code, notes, and snippets.

Avatar

Andreas Hocevar ahocevar

View GitHub Profile
@ahocevar
ahocevar / animate.js
Last active Mar 29, 2020
Animation sequence for measuring performance of OpenLayers maps
View animate.js
import {fromLonLat} from 'ol/proj.js';
/**
* @param {import("ol/Map").default} map OpenLayers map.
*/
export default function(map) {
const view = map.getView();
const london = fromLonLat([-0.12755, 51.507222]);
View README.md

Minimal example to reproduce https://github.com/microsoft/TypeScript/issues/34869

git clone https://gist.github.com/b3e58e7eac7750faa235ef66bdb559ab.git
cd b3e58e7eac7750faa235ef66bdb559ab
npm install
npm run build

The last command runs tsc and will output

TypeError: Cannot read property 'valueDeclaration' of undefined
@ahocevar
ahocevar / README.md
Last active Oct 30, 2019
ol-mapbox-style example
View README.md

ol-mapbox-style example

Prerequisites

You need node (version >= 8.0) installed. If you haven't already, download it from https://nodejs.org/.

Downloadind the example

Click the "Download ZIP" button above and unpack the contents. Open a terminal and change to the directory that contains the unpacked files (index.html, index.js and style.json).

@ahocevar
ahocevar / ol.css
Last active May 3, 2018
OpenLayers v5.0.0-beta.10
View ol.css
.ol-box {
box-sizing: border-box;
border-radius: 2px;
border: 2px solid blue;
}
.ol-mouse-position {
top: 8px;
right: 8px;
position: absolute;
@ahocevar
ahocevar / .gitignore
Last active Jun 26, 2018
OpenLayers with Webpack and Closure Compiler
View .gitignore
node_modules/
bundle.js
style.css
@ahocevar
ahocevar / .gitignore
Created May 25, 2017 — forked from tschaub/.gitignore
OpenLayers + Webpack
View .gitignore
/node_modules/
bundle.js
@ahocevar
ahocevar / map.geojson
Created Jun 7, 2016
gist from regional-monitoring app
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created Jul 10, 2015
gist from regional-monitoring app
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created Jul 10, 2015
gist from regional-monitoring app
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created Jul 9, 2015
gist from regional-monitoring app
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.