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:
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, |
{ | |
"search": [{ | |
"title": "Places", | |
"useWmsRequest": true, | |
"queryLayer": "pop_places", | |
"formItems": [{ | |
"xtype": "textfield", | |
"name": "name", | |
"fieldLabel": "Name", | |
"allowBlank": true, |
/node_modules/ | |
bundle.js |
<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> |
<!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; } |