This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geojson_format = new OpenLayers.Format.GeoJSON({ | |
'internalProjection': new OpenLayers.Projection("EPSG:900913"), | |
'externalProjection': new OpenLayers.Projection("EPSG:4326") | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<script> | |
function loolister () { | |
// Make a lovely button | |
var button = document.createElement('button'); | |
// label it | |
button.innerText = 'Find nearby loos'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
import PropTypes from "prop-types"; | |
import Tab from "./Tab"; | |
const Tabs = (props) => { | |
const [ activeTab, setActiveTab ] = useState(props.children[0].props.label); | |
return ( | |
<div className="tabs"> | |
<ol className="tab-list"> | |
{props.children.map((child) => ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cors from 'cors' | |
import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next' | |
const cors = Cors({ | |
methods: ['POST'], | |
}) | |
function runMiddleware(req, res, fn) { | |
return new Promise((resolve, reject) => { | |
fn(req, res, result => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextApiRequest, NextApiResponse } from "next"; | |
import httpProxyMiddleware from "next-http-proxy-middleware"; | |
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | |
export default (req: NextApiRequest, res: NextApiResponse) => | |
httpProxyMiddleware(req, res, { | |
target: process.env.API_HOST, | |
changeOrigin: true, | |
headers: { | |
Authorization: `Bearer ${process.env.API_TOKEN}`, |