This file contains hidden or 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
// @ts-check | |
import { useState, useEffect } from 'react' | |
function getCurrentLocation () { | |
return { | |
pathname: window.location.pathname, | |
search: window.location.search | |
} | |
} |
This file contains hidden or 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
/** | |
* Swap the elements in an array at indexes x and y. | |
* | |
* @param (a) The array. | |
* @param (x) The index of the first element to swap. | |
* @param (y) The index of the second element to swap. | |
* @return {Array} The input array with the elements swapped. | |
*/ | |
var swapArrayElements = function (a, x, y) { | |
if (a.length === 1) return a; |
This file contains hidden or 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 marker; | |
var circle; | |
var map = new L.Map('leaflet', { | |
dragging: true | |
}); | |
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/396d41ac26d14f84a7ef6176c59f4720/997/256/{z}/{x}/{y}.png', | |
cloudmadeAttrib = '', | |
cloudmade = new L.TileLayer(cloudmadeUrl, { | |
maxZoom: 18, | |
attribution: cloudmadeAttrib |
This file contains hidden or 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
/* | |
L.EditableCircleMarker is a marker with a radius | |
The marker can be moved and the radius can be changed | |
*/ | |
L.EditableCircleMarker = L.Class.extend({ | |
includes: L.Mixin.Events, | |
options: { | |
weight: 1, |