Skip to content

Instantly share code, notes, and snippets.

@uprel
uprel / demo.html
Last active April 18, 2017 22:52
Leaflet multi map with sync plugin for showing MapQuest and MapBox tiles
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo</title>
<link rel="stylesheet" href="../leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet/plugins/zoomdisplay/dist/leaflet.zoomdisplay.css" />
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
@uprel
uprel / maptip.html
Created May 8, 2017 08:28
QGIS Layer Display Maptip
<a target='_blank' href='http://www.google.com#q=[% country %]'>
<img src='http://test.level2.si/files/public-docs/EQWC/demo/country_flags/png250px/[% lower(iso_cc) %].png' width='150'>
</a>
@uprel
uprel / .gitignore
Created March 28, 2018 17:35 — forked from tschaub/.gitignore
OpenLayers + Webpack
/node_modules/
bundle.js
@uprel
uprel / WMTS.md
Created July 10, 2018 04:01 — forked from atlefren/WMTS.md

How to calculate MaxResolution for WMTS given info in GetCapabilities

For using an arbitrary WMTS-server in OpenLayers you need two values:

  • The MaxResolution
  • A bounds object

Given a WMTS response with a TileMatrixSet defined as:

@uprel
uprel / eu_demo.json
Last active November 19, 2018 08:02
Example of project settings for Extended QGIS Web Client. Features: search with project data with WMS standard using search panels and external services (MapBox) for geocoding, reverse geocoding and getting elevation data.
{
"search": [{
"title": "Places",
"useWmsRequest": true,
"queryLayer": "pop_places",
"formItems": [{
"xtype": "textfield",
"name": "name",
"fieldLabel": "Name",
"allowBlank": true,
@uprel
uprel / search_views.sql
Last active February 24, 2021 12:46
Postgis example to enable WSGI search in EQWC
CREATE OR REPLACE VIEW public.search_pop_places AS
SELECT pop_places.name AS searchstring,
(pop_places.type::text || ' '::text) || pop_places.name::text AS displaytext,
'01_pop_places'::text AS search_category,
pop_places.geom AS the_geom,
'pop_places'::text AS showlayer
FROM pop_places;
CREATE OR REPLACE VIEW public.search_airports AS
SELECT (airports.name || ' ' || airports.iata) AS searchstring,