Published
Edited
Jun 4, 2019
Insert cell
md`# MapScript UI`
Insert cell
import {svelte, render, readable, derived, observe, Stores} from '@ajbouh/svelte-experiments'
Insert cell
import {Results} from '8a16453ac64d7b1a' // '38ee701f49402801'
Insert cell
import {compile, grammar, semantics} from '@ajbouh/mapscript'
Insert cell
import {
viewof positions,
xAnchorUpdate,
viewof xAnchor,
yAnchorUpdate,
viewof yAnchor,
xRangeExtent,
yRangeExtent,
updatePositions,
drag,
update,
} with {
} from '@ajbouh/mapscript-layout'
Insert cell
import {World, editor} from '6e557ad8d4923730'
Insert cell
import {query} from 'bd26bdcad5cbe1c8'
Insert cell
Insert cell
// x = html`<style>
// .toolbar {
// display: grid;
// width: 100%;
// background: green;
// grid-template-columns: 1fr min-content min-content;
// }
// .viewer .toolbar .input,
// .viewer .toolbar button {
// display: inline-block;
// }
// .toolbar .CodeMirror-empty.CodeMirror-focused { outline: none; }
// .toolbar .CodeMirror pre.CodeMirror-placeholder { color: #999; }
// </style>
// <div class="toolbar"><span class="input">${search.element}</span><button>graph</button><button>inspector</button>`
Insert cell
// rt = render(Results, {
// results: derived(
// [observe(search.element), Stores.resolvePromises(world.generator)],
// ([$q, $c], set) => {
// const x = Array.from(query($q, $c))
// console.log("x", x, $q, $c)
// set(x)
// }),
// height: '40em',
// attrHighlightFilter: attr => attr.meta.selected,
// })
Insert cell
Insert cell
Insert cell
update
Insert cell
xAnchor
Insert cell
yAnchor
Insert cell
updatePositions
Insert cell
positions
Insert cell
viewof positions
Insert cell
xAnchorUpdate
Insert cell
yAnchorUpdate
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3@^5.8")
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more