We want to rearrange markers so they draw episode lines in a graceful order. We count them off in a 2d field of dots.
let text = `45.4837805, -122.7912138 45.4836182, -122.7908421 45.4822472, -122.7922277 45.4834027, -122.7938305 45.4841416, -122.7950527`
let dots = text.split("\n").map((latlon,i)=> { const r = (v,k) => Math.round(+(v*k)) let [lat,lon] = latlon.split(", ") let x = r(+lat-45.482,10000) let y = r(+lon+122.796,3000) return {i,x,y} }) for (let j=0; j<=20; j++) { let s='..............................'.split("") for (let p of dots) { if (p.y == j) s[p.x] = p.i } output.innerText += s.join(" ")+"\n" } ''
I got my coordinates confused but it doesn't matter because I am only interested in the shape produced.
//wiki.ralfbarkow.ch/assets/pages/snippet-template/basicjs.html?snippet-template HEIGHT 400
I was heading out to the vicinity of the Nike HQ by my commute route from back when I worked there. I was surprised when I passed this park because I don't remember any water there. But then, that wasn't a thing for me back then.