mapshaper 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/mapshaper.js +363 -62
- package/package.json +6 -2
- package/www/.nojekyll +0 -0
- package/www/assets/jetbrains-mono-regular.woff2 +0 -0
- package/www/assets/static-page.css +179 -0
- package/www/docs/_assets/cmd-search.js +213 -0
- package/www/docs/_assets/docs.css +722 -0
- package/www/docs/_assets/docs.js +75 -0
- package/www/docs/_assets/highlight.css +10 -0
- package/www/docs/essentials/command-line.html +127 -0
- package/www/docs/essentials/command-line.html.md +112 -0
- package/www/docs/essentials/web-app.html +138 -0
- package/www/docs/essentials/web-app.html.md +106 -0
- package/www/docs/examples/basics.html +275 -0
- package/www/docs/examples/basics.html.md +370 -0
- package/www/docs/examples/data/Makefile +31 -0
- package/www/docs/examples/data/globe.msx +0 -0
- package/www/docs/examples/data/globe.svg +616 -0
- package/www/docs/examples/data/globe.txt +21 -0
- package/www/docs/examples/data/globe.zip +0 -0
- package/www/docs/examples/data/ne_50m_admin_0_countries.geojson +1 -0
- package/www/docs/examples/data/ne_50m_admin_1_states_provinces_lakes.geojson +1 -0
- package/www/docs/examples/data/us-states.msx +0 -0
- package/www/docs/examples/data/us-states.svg +56 -0
- package/www/docs/examples/data/us-states.txt +6 -0
- package/www/docs/examples/data/us-states.zip +0 -0
- package/www/docs/examples/globe.html +108 -0
- package/www/docs/examples/globe.html.md +64 -0
- package/www/docs/examples/us-states.html +88 -0
- package/www/docs/examples/us-states.html.md +44 -0
- package/www/docs/formats/csv.html +127 -0
- package/www/docs/formats/csv.html.md +97 -0
- package/www/docs/formats/dbf.html +87 -0
- package/www/docs/formats/dbf.html.md +39 -0
- package/www/docs/formats/flatgeobuf.html +85 -0
- package/www/docs/formats/flatgeobuf.html.md +41 -0
- package/www/docs/formats/geojson.html +107 -0
- package/www/docs/formats/geojson.html.md +65 -0
- package/www/docs/formats/geopackage.html +87 -0
- package/www/docs/formats/geopackage.html.md +42 -0
- package/www/docs/formats/json.html +83 -0
- package/www/docs/formats/json.html.md +35 -0
- package/www/docs/formats/kml.html +82 -0
- package/www/docs/formats/kml.html.md +39 -0
- package/www/docs/formats/overview.html +191 -0
- package/www/docs/formats/overview.html.md +34 -0
- package/www/docs/formats/shapefile.html +123 -0
- package/www/docs/formats/shapefile.html.md +84 -0
- package/www/docs/formats/snapshot.html +87 -0
- package/www/docs/formats/snapshot.html.md +39 -0
- package/www/docs/formats/svg.html +99 -0
- package/www/docs/formats/svg.html.md +51 -0
- package/www/docs/formats/topojson.html +102 -0
- package/www/docs/formats/topojson.html.md +54 -0
- package/www/docs/gallery/index.html +80 -0
- package/www/docs/gallery/index.html.md +29 -0
- package/www/docs/guides/combining-layers.html +109 -0
- package/www/docs/guides/combining-layers.html.md +89 -0
- package/www/docs/guides/expressions.html +600 -0
- package/www/docs/guides/expressions.html.md +376 -0
- package/www/docs/guides/programmatic.html +117 -0
- package/www/docs/guides/programmatic.html.md +91 -0
- package/www/docs/guides/projections.html +158 -0
- package/www/docs/guides/projections.html.md +118 -0
- package/www/docs/guides/simplification.html +110 -0
- package/www/docs/guides/simplification.html.md +96 -0
- package/www/docs/guides/topology.html +90 -0
- package/www/docs/guides/topology.html.md +63 -0
- package/www/docs/images/cal-counties.png +0 -0
- package/www/docs/images/simplification-detail.png +0 -0
- package/www/docs/images/simplification-dp.png +0 -0
- package/www/docs/images/simplification-mod2.png +0 -0
- package/www/docs/images/tiger-counties.png +0 -0
- package/www/docs/index.html +101 -0
- package/www/docs/index.html.md +59 -0
- package/www/docs/reference.html +1302 -0
- package/www/docs/reference.html.md +1817 -0
- package/www/docs/whats-new.html +77 -0
- package/www/docs/whats-new.html.md +59 -0
- package/www/index.html +47 -4
- package/www/llms-full.txt +4053 -0
- package/www/llms.txt +55 -0
- package/www/mapshaper-gui.js +299 -5
- package/www/mapshaper.js +363 -62
- package/www/page.css +189 -11
- package/www/privacy.html +1 -112
- package/www/sponsor.html +4 -164
- package/www/terms.html +1 -112
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>What's new · mapshaper docs</title>
|
|
7
|
+
<meta name="description" content="A curated log of recently added user-visible features in Mapshaper, with links into the rest of the docs.">
|
|
8
|
+
<link rel="icon" type="image/png" href="/images/icon.png">
|
|
9
|
+
<link rel="stylesheet" href="/docs/_assets/highlight.css">
|
|
10
|
+
<link rel="stylesheet" href="/docs/_assets/docs.css">
|
|
11
|
+
</head>
|
|
12
|
+
<body class="">
|
|
13
|
+
|
|
14
|
+
<header class="page-header">
|
|
15
|
+
<a href="/" class="mapshaper-logo">map<span class="logo-highlight">shaper</span></a>
|
|
16
|
+
<span class="header-section-label">Docs</span>
|
|
17
|
+
<nav class="header-nav">
|
|
18
|
+
<a href="/">Web app</a>
|
|
19
|
+
<a href="https://github.com/mbloch/mapshaper">GitHub</a>
|
|
20
|
+
<a href="/sponsor.html" class="sponsor-link"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg> Become a sponsor</a>
|
|
21
|
+
</nav>
|
|
22
|
+
</header>
|
|
23
|
+
|
|
24
|
+
<div class="docs-layout">
|
|
25
|
+
|
|
26
|
+
<aside class="docs-sidebar">
|
|
27
|
+
<div class="sidebar-inner">
|
|
28
|
+
<nav class="docs-nav"><ul class="top-links"><li><a href="/docs/">Home</a></li><li><a href="/docs/whats-new.html" class="is-active">What's new</a></li><li><a href="/docs/reference.html">Command reference</a></li><li><a href="/docs/gallery/">Gallery</a></li></ul><h2>Getting started</h2><ul><li><a href="/docs/essentials/command-line.html">The command-line tool</a></li><li><a href="/docs/essentials/web-app.html">The web app</a></li></ul><h2>Guides</h2><ul><li><a href="/docs/guides/simplification.html">Simplification</a></li><li><a href="/docs/guides/expressions.html">JavaScript expressions</a></li><li><a href="/docs/guides/projections.html">Projections</a></li><li><a href="/docs/guides/topology.html">Topology and cleaning</a></li><li><a href="/docs/guides/combining-layers.html">Combining two layers</a></li><li><a href="/docs/guides/programmatic.html">Using Mapshaper from Node.js</a></li></ul><h2>Formats</h2><ul><li><a href="/docs/formats/overview.html">Overview</a></li><li><a href="/docs/formats/shapefile.html">Shapefile</a></li><li><a href="/docs/formats/geojson.html">GeoJSON</a></li><li><a href="/docs/formats/topojson.html">TopoJSON</a></li><li><a href="/docs/formats/geopackage.html">GeoPackage</a></li><li><a href="/docs/formats/flatgeobuf.html">FlatGeobuf</a></li><li><a href="/docs/formats/kml.html">KML / KMZ</a></li><li><a href="/docs/formats/csv.html">CSV / TSV</a></li><li><a href="/docs/formats/dbf.html">DBF</a></li><li><a href="/docs/formats/json.html">JSON records</a></li><li><a href="/docs/formats/svg.html">SVG</a></li><li><a href="/docs/formats/snapshot.html">Mapshaper snapshot</a></li></ul><h2>Examples</h2><ul><li><a href="/docs/examples/basics.html">Basics</a></li><li><a href="/docs/examples/globe.html">Globe</a></li><li><a href="/docs/examples/us-states.html">U.S. state map</a></li></ul></nav>
|
|
29
|
+
</div>
|
|
30
|
+
</aside>
|
|
31
|
+
|
|
32
|
+
<main class="docs-main">
|
|
33
|
+
<article class="docs-article">
|
|
34
|
+
|
|
35
|
+
<h1 id="whats-new">What's new</h1>
|
|
36
|
+
<p>This is a curated list of recently added features. For the full list of changes, including bug fixes and internal work, see the <a href="https://github.com/mbloch/mapshaper/blob/master/CHANGELOG.md">changelog</a> on GitHub.</p>
|
|
37
|
+
<h2 id="april-2026">April 2026</h2>
|
|
38
|
+
<div class="whats-new-entry"><p><strong>Undo/redo buttons.</strong> The web UI now has an undo/redo toolbar. Undo and redo were already supported in the geometry and attribute editing modes; the toolbar makes them more discoverable for users who didn't know the keyboard shortcuts (<strong>⌘Z</strong> / <strong>⌘⇧Z</strong>) existed.</p>
|
|
39
|
+
</div><div class="whats-new-entry"><p><strong>Command files.</strong> A sequence of Mapshaper commands can be written to a <code>.txt</code> file with <code>#</code> comments and no shell quoting, and run with <code>-run <file></code> (or just <code>mapshaper commands.txt</code>). Command files can also be written in a shell-compatible way, if you want to be able to paste the commands into the terminal or add them to a shell script. In a future release, these files will also be runnable in the browser.</p>
|
|
40
|
+
<pre><code class="hljs language-bash">mapshaper build.txt
|
|
41
|
+
</code></pre>
|
|
42
|
+
<p>→ See <a href="/docs/reference.html#command-files">Command files</a> in the reference.</p>
|
|
43
|
+
</div><div class="whats-new-entry"><p><strong>Variable interpolation in commands.</strong> Command files and command lines support <code>{{VAR}}</code> placeholders, resolved at run time against environment variables (<code>{{env.HOME}}</code>), values set with the new <code>-vars</code> and <code>-defaults</code> commands, and variables defined dynamically by <code>-calc</code>, <code>-define</code> and <code>-each</code> expressions.</p>
|
|
44
|
+
<pre><code class="hljs language-bash">mapshaper -vars YEAR=2030 PCT=5 -run build.txt
|
|
45
|
+
</code></pre>
|
|
46
|
+
<p>→ See <a href="/docs/reference.html#variable-interpolation">Variable interpolation</a>, <a href="/docs/reference.html#-vars"><code>-vars</code></a> and <a href="/docs/reference.html#-defaults"><code>-defaults</code></a>.</p>
|
|
47
|
+
</div><div class="whats-new-entry"><p><strong>Farewell to dissolve2.</strong> The <code>-dissolve</code> command now uses Mapshaper's most robust dissolve function, which can handle overlaps, gaps and other topology errors. The legacy faster algorithm is still available as <code>-dissolve no-repair</code>. (The old <code>-dissolve2</code> is just an alias for <code>-dissolve</code>.)</p>
|
|
48
|
+
<p>→ See <a href="/docs/reference.html#-dissolve"><code>-dissolve</code></a>.</p>
|
|
49
|
+
</div><div class="whats-new-entry"><p><strong>FlatGeobuf and GeoPackage support.</strong> Mapshaper reads and writes FlatGeobuf (<code>.fgb</code>) and GeoPackage (<code>.gpkg</code>) files.</p>
|
|
50
|
+
<p>→ See <a href="/docs/formats/flatgeobuf.html">FlatGeobuf</a>, <a href="/docs/formats/geopackage.html">GeoPackage</a> and <a href="/docs/reference.html#-i-input"><code>-i layers=</code></a>.</p>
|
|
51
|
+
</div><div class="whats-new-entry"><p><strong>SVG import.</strong> SVG files exported by Mapshaper can be re-imported — useful for making stylistic edits.</p>
|
|
52
|
+
<p>→ See <a href="/docs/formats/svg.html">SVG</a>.</p>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="edit-link">
|
|
56
|
+
<a href="https://github.com/mbloch/mapshaper/edit/master/docs/whats-new.md">Edit this page on GitHub</a>
|
|
57
|
+
</div>
|
|
58
|
+
</article>
|
|
59
|
+
</main>
|
|
60
|
+
|
|
61
|
+
<aside class="docs-toc">
|
|
62
|
+
<div class="docs-toc-title">On this page</div><ul><li class="lvl-2"><a href="#april-2026">April 2026</a></li></ul>
|
|
63
|
+
</aside>
|
|
64
|
+
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<script src="/docs/_assets/docs.js" defer></script>
|
|
68
|
+
|
|
69
|
+
<footer class="docs-footer">
|
|
70
|
+
<div class="docs-footer-inner">
|
|
71
|
+
<span>mapshaper is free software, licensed under <a href="https://www.mozilla.org/MPL/2.0/">MPL 2.0</a>.</span>
|
|
72
|
+
<span><a href="/privacy.html">Privacy</a> · <a href="/terms.html">Terms</a> · <a href="/sponsor.html">Support mapshaper</a></span>
|
|
73
|
+
</div>
|
|
74
|
+
</footer>
|
|
75
|
+
|
|
76
|
+
</body>
|
|
77
|
+
</html>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: What's new
|
|
3
|
+
description: A curated log of recently added user-visible features in Mapshaper, with links into the rest of the docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# What's new
|
|
7
|
+
|
|
8
|
+
This is a curated list of recently added features. For the full list of changes, including bug fixes and internal work, see the [changelog](https://github.com/mbloch/mapshaper/blob/master/CHANGELOG.md) on GitHub.
|
|
9
|
+
|
|
10
|
+
## April 2026
|
|
11
|
+
|
|
12
|
+
<div class="whats-new-entry">
|
|
13
|
+
|
|
14
|
+
**Undo/redo buttons.** The web UI now has an undo/redo toolbar. Undo and redo were already supported in the geometry and attribute editing modes; the toolbar makes them more discoverable for users who didn't know the keyboard shortcuts (**⌘Z** / **⌘⇧Z**) existed.
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="whats-new-entry">
|
|
19
|
+
|
|
20
|
+
**Command files.** A sequence of Mapshaper commands can be written to a `.txt` file with `#` comments and no shell quoting, and run with `-run <file>` (or just `mapshaper commands.txt`). Command files can also be written in a shell-compatible way, if you want to be able to paste the commands into the terminal or add them to a shell script. In a future release, these files will also be runnable in the browser.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
mapshaper build.txt
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
→ See [Command files](/docs/reference.html.md#command-files) in the reference.
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="whats-new-entry">
|
|
30
|
+
|
|
31
|
+
**Variable interpolation in commands.** Command files and command lines support `{{VAR}}` placeholders, resolved at run time against environment variables (`{{env.HOME}}`), values set with the new `-vars` and `-defaults` commands, and variables defined dynamically by `-calc`, `-define` and `-each` expressions.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
mapshaper -vars YEAR=2030 PCT=5 -run build.txt
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
→ See [Variable interpolation](/docs/reference.html.md#variable-interpolation), [`-vars`](/docs/reference.html.md#-vars) and [`-defaults`](/docs/reference.html.md#-defaults).
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="whats-new-entry">
|
|
41
|
+
|
|
42
|
+
**Farewell to dissolve2.** The `-dissolve` command now uses Mapshaper's most robust dissolve function, which can handle overlaps, gaps and other topology errors. The legacy faster algorithm is still available as `-dissolve no-repair`. (The old `-dissolve2` is just an alias for `-dissolve`.)
|
|
43
|
+
|
|
44
|
+
→ See [`-dissolve`](/docs/reference.html.md#-dissolve).
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="whats-new-entry">
|
|
48
|
+
|
|
49
|
+
**FlatGeobuf and GeoPackage support.** Mapshaper reads and writes FlatGeobuf (`.fgb`) and GeoPackage (`.gpkg`) files.
|
|
50
|
+
|
|
51
|
+
→ See [FlatGeobuf](/docs/formats/flatgeobuf.html.md), [GeoPackage](/docs/formats/geopackage.html.md) and [`-i layers=`](/docs/reference.html.md#-i-input).
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="whats-new-entry">
|
|
55
|
+
|
|
56
|
+
**SVG import.** SVG files exported by Mapshaper can be re-imported — useful for making stylistic edits.
|
|
57
|
+
|
|
58
|
+
→ See [SVG](/docs/formats/svg.html.md).
|
|
59
|
+
</div>
|
package/www/index.html
CHANGED
|
@@ -43,6 +43,14 @@
|
|
|
43
43
|
<polygon points="8 14.5 13 19 13 4 3 4 3 19 8 14.5" fill="#30d4ef"/>
|
|
44
44
|
</svg>
|
|
45
45
|
|
|
46
|
+
<svg id="undo-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
47
|
+
<path d="M1.5,8 L7,4.5 L7,7 C10,7 12,9 12,11 L12,13 L10,13 L10,11 C10,10 9,9 7,9 L7,11.5 Z"/>
|
|
48
|
+
</svg>
|
|
49
|
+
|
|
50
|
+
<svg id="redo-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
51
|
+
<path d="M14.5,8 L9,4.5 L9,7 C6,7 4,9 4,11 L4,13 L6,13 L6,11 C6,10 7,9 9,9 L9,11.5 Z"/>
|
|
52
|
+
</svg>
|
|
53
|
+
|
|
46
54
|
</div>
|
|
47
55
|
|
|
48
56
|
<div class="page-header">
|
|
@@ -60,10 +68,17 @@
|
|
|
60
68
|
</div></div>
|
|
61
69
|
<div id="mode-buttons" class="page-header-buttons">
|
|
62
70
|
<!-- <span class="project-btn header-btn btn">Project</span><span class="separator"> -->
|
|
63
|
-
<span class="console-btn header-btn btn">Console</span><span class="display-btn header-btn btn">Display</span><span class="separator"></span><span class="separator"></span></span><span class="simplify-btn header-btn btn">Simplify</span><span class="separator"></span><span class="export-btn header-btn btn">Export</span>
|
|
71
|
+
<span class="console-btn header-btn btn">Console</span><span class="display-btn header-btn btn">Display</span><span class="separator"></span><span class="separator"></span></span><span class="simplify-btn header-btn btn">Simplify</span><span class="separator"></span><span class="export-btn header-btn btn">Export</span><span class="separator"></span><span id="header-menu-btn" class="header-btn btn" role="button" aria-label="More links" aria-haspopup="true" aria-expanded="false" tabindex="0"><svg viewBox="0 0 16 16" aria-hidden="true" width="16" height="14"><rect x="1" y="3" width="14" height="2"/><rect x="1" y="7" width="14" height="2"/><rect x="1" y="11" width="14" height="2"/></svg></span>
|
|
72
|
+
<div id="header-menu-dropdown" class="hidden" role="menu" aria-labelledby="header-menu-btn">
|
|
73
|
+
<a class="header-menu-item" href="/docs/" target="_blank" rel="noopener" role="menuitem">Docs</a>
|
|
74
|
+
<a class="header-menu-item" href="https://github.com/mbloch/mapshaper" target="_blank" rel="noopener" role="menuitem">GitHub</a>
|
|
75
|
+
<a class="header-menu-item survey-en-link" href="https://tally.so/r/44Njok" target="_blank" rel="noopener" role="menuitem">1-minute survey</a>
|
|
76
|
+
<a class="header-menu-item survey-zh-link" href="https://tally.so/r/vGx7KQ" target="_blank" rel="noopener" lang="zh-CN" style="display:none" role="menuitem">意见反馈</a>
|
|
77
|
+
<a class="header-menu-item header-menu-sponsor" href="sponsor.html" target="_blank" rel="noopener" role="menuitem"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>Become a sponsor</a>
|
|
78
|
+
</div>
|
|
64
79
|
</div>
|
|
65
80
|
<div id="splash-buttons" class="page-header-buttons">
|
|
66
|
-
<a href="
|
|
81
|
+
<a href="/docs/"><span id="wiki-btn" class="header-btn btn">Docs</span></a><span class="separator"></span><a href="https://github.com/mbloch/mapshaper"><span id="github-btn" class="header-btn btn">GitHub</span></a><span class="separator"></span><a class="survey-en-link" href="https://tally.so/r/44Njok" target="_blank" rel="noopener"><span id="survey-en-btn" class="header-btn btn">1-minute survey</span></a><a class="survey-zh-link" href="https://tally.so/r/vGx7KQ" target="_blank" rel="noopener" style="display:none"><span id="survey-zh-btn" class="header-btn btn" lang="zh-CN">意见反馈</span></a><span class="separator"></span><a href="sponsor.html"><span id="sponsor-btn" class="header-btn btn"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg> Become a sponsor</span></a>
|
|
67
82
|
</div>
|
|
68
83
|
</div>
|
|
69
84
|
|
|
@@ -146,7 +161,7 @@
|
|
|
146
161
|
<div style="height:11px"></div>
|
|
147
162
|
|
|
148
163
|
<div class="option-menu"><input type="text" class="text-input advanced-options" placeholder="command line options">
|
|
149
|
-
<a href="
|
|
164
|
+
<a href="/docs/essentials/commands.html#-o-output" target="mapshaper_output_docs">
|
|
150
165
|
<div class="tip-button">?<div class="tip-anchor">
|
|
151
166
|
<div class="tip">Enter options from the command line interface for
|
|
152
167
|
the -o command. Examples: bbox no-quantization
|
|
@@ -293,7 +308,7 @@ a smoother appearance.</div></div></div></div>
|
|
|
293
308
|
</div>
|
|
294
309
|
</div>
|
|
295
310
|
<div style="margin-top: 10px"><input type="text" class="text-input advanced-options" placeholder="import options">
|
|
296
|
-
<a href="
|
|
311
|
+
<a href="/docs/essentials/commands.html#-i-input" target="mapshaper_import_docs">
|
|
297
312
|
<div class="tip-button">?<div class="tip-anchor">
|
|
298
313
|
<div class="tip">Enter options from the command line
|
|
299
314
|
interface. Examples: <span id="import-option-examples">snap no-topology
|
|
@@ -331,6 +346,34 @@ encoding=big5</span>. Click to see all options.</div></div></div>
|
|
|
331
346
|
<div class="drop-area"></div>
|
|
332
347
|
</div>
|
|
333
348
|
|
|
349
|
+
<script>
|
|
350
|
+
(function() {
|
|
351
|
+
// Show the Chinese-language survey link for users likely located in
|
|
352
|
+
// mainland China, based on browser timezone or preferred language.
|
|
353
|
+
// No geolocation or network lookup is performed.
|
|
354
|
+
var isChina = false;
|
|
355
|
+
try {
|
|
356
|
+
// Allow previewing via ?survey=zh (or &survey=zh) in the URL.
|
|
357
|
+
if (/[?&]survey=zh\b/i.test(location.search)) isChina = true;
|
|
358
|
+
} catch (e) {}
|
|
359
|
+
try {
|
|
360
|
+
var tz = (Intl.DateTimeFormat().resolvedOptions().timeZone || '').toLowerCase();
|
|
361
|
+
var chinaZones = ['asia/shanghai', 'asia/urumqi', 'asia/chongqing', 'asia/harbin', 'asia/kashgar'];
|
|
362
|
+
if (chinaZones.indexOf(tz) !== -1) isChina = true;
|
|
363
|
+
} catch (e) {}
|
|
364
|
+
var langs = navigator.languages || [navigator.language || ''];
|
|
365
|
+
for (var i = 0; i < langs.length && !isChina; i++) {
|
|
366
|
+
if (/^zh(-Hans)?-CN\b/i.test(langs[i])) isChina = true;
|
|
367
|
+
}
|
|
368
|
+
if (isChina) {
|
|
369
|
+
// Swap every copy of the survey link (splash bar + hamburger menu)
|
|
370
|
+
var zhLinks = document.querySelectorAll('.survey-zh-link');
|
|
371
|
+
var enLinks = document.querySelectorAll('.survey-en-link');
|
|
372
|
+
for (var j = 0; j < zhLinks.length; j++) zhLinks[j].style.display = '';
|
|
373
|
+
for (var k = 0; k < enLinks.length; k++) enLinks[k].style.display = 'none';
|
|
374
|
+
}
|
|
375
|
+
})();
|
|
376
|
+
</script>
|
|
334
377
|
<script src="basemap.js"></script>
|
|
335
378
|
<script src="modules.js"></script>
|
|
336
379
|
<script src="mapshaper.js"></script>
|