Skip to content

Instantly share code, notes, and snippets.

@eliotjordan
eliotjordan / degrees2meters.js
Created April 12, 2022 01:38 — forked from onderaltintas/degrees2meters.js
javascript coordinate conversions between 900913(3857) - 4326(lat lon)
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
}
//test
lon= -77.035974
lat = 38.898717
@eliotjordan
eliotjordan / info.json
Created August 24, 2022 15:53
TileJSON.io - India and Pakistan 1:250,000
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@eliotjordan
eliotjordan / info.json
Created August 26, 2022 18:46
TileJSON.io - Greece Raster
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
{
"@context": [
"http://www.w3.org/ns/anno.jsonld",
"http://iiif.io/api/presentation/3/context.json"
],
"type": "Manifest",
"id": "https://figgy.princeton.edu/concern/scanned_resources/480ef315-411f-4176-832b-956c3fa005a0/manifest",
"label": {
"eng": [
"[Concert, 2015, January 09-10] [sound recording]"