Skip to content

🎥 Make videos programmatically with React

Internal testbed: Add map animation compositions (#9586)

Jonny Burger094389e9c371
diff --git a/bun.lock b/bun.lock
index 5dda5bc8ec..7d44fe7fcc 100644
--- a/bun.lock
+++ b/bun.lock
@@ -735,6 +735,7 @@
"name": "@remotion/example",
"version": "4.0.499",
"dependencies": {
+ "@maptiler/sdk": "4.0.2",
"@mdx-js/loader": "2.3.0",
"@mdx-js/react": "2.3.0",
"@mediabunny/ac3": "catalog:",
@@ -789,6 +790,7 @@
"@remotion/zod-types": "workspace:*",
"@remotion/zod-types-v3": "workspace:*",
"@shopify/react-native-skia": "2.0.0",
+ "@turf/turf": "7.3.2",
"@types/express": "4.17.23",
"@types/hls.js": "0.13.3",
"@types/opentype.js": "1.3.4",
@@ -3647,6 +3649,12 @@
"@maplibre/vt-pbf": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/point-geometry": "^1.1.0", "@mapbox/vector-tile": "^2.0.4", "@maplibre/geojson-vt": "^5.0.4", "@types/geojson": "^7946.0.16", "@types/supercluster": "^7.1.3", "pbf": "^4.0.1", "supercluster": "^8.0.1" } }, "sha512-jIvp8F5hQCcreqOOpEt42TJMUlsrEcpf/kI1T2v85YrQRV6PPXUcEXUg5karKtH6oh47XJZ4kHu56pUkOuqA7w=="],
+ "@maptiler/client": ["@maptiler/[email protected]", "", { "dependencies": { "quick-lru": "^7.0.0" } }, "sha512-zSM5kC/CX02kgpRHQxxKOzjaQjNBs8hqQueIJqwT9pzB2vsP9FTFHfnVrGCfUwM+s1n2bdGla+2hibPkVUf0fw=="],
+
+ "@maptiler/sdk": ["@maptiler/[email protected]", "", { "dependencies": { "@maplibre/maplibre-gl-style-spec": "^24.7.0", "@maptiler/client": "^3.0.2", "eslint-plugin-compat": "^6.1.0", "events": "^3.3.0", "gl-matrix": "^3.4.4", "js-base64": "^3.7.7", "maplibre-gl": "~5.21.1", "uuid": "^14.0.0" } }, "sha512-nQH0ubkT0E4YSGWEHfcNoteOmjhXHNYLmmIenPE7EKw18zsexrhPEaHHxpDayTQz04qcY1mu2Kjvmag1eN/5Mw=="],
+
+ "@mdn/browser-compat-data": ["@mdn/[email protected]", "", {}, "sha512-PzdZZzRhcXvKB0begee28n5lvwAcinGKYuLZOVxHAZm+n7y01ddEGfdS1ZXRuVcV+ndG6mSEAE8vgudom5UjYg=="],
+
"@mdx-js/loader": ["@mdx-js/[email protected]", "", { "dependencies": { "@mdx-js/mdx": "2.3.0", "source-map": "0.7.3" }, "peerDependencies": { "webpack": "5.96.1" } }, "sha512-IqsscXh7Q3Rzb+f5DXYk0HU71PK+WuFsEhf+mSV3fOhpLcEpgsHvTQ2h0T6TlZ5gHOaBeFjkXwB52by7ypMyNg=="],
"@mdx-js/mdx": ["@mdx-js/[email protected]", "", { "dependencies": { "@types/estree-jsx": "1.0.0", "@types/mdx": "2.0.5", "estree-util-build-jsx": "2.2.2", "estree-util-is-identifier-name": "2.1.0", "estree-util-to-js": "1.2.0", "estree-walker": "3.0.3", "hast-util-to-estree": "2.3.3", "markdown-extensions": "1.1.1", "periscopic": "3.1.0", "remark-mdx": "2.3.0", "remark-parse": "10.0.1", "remark-rehype": "10.1.0", "unified": "10.1.2", "unist-util-position-from-estree": "1.1.2", "unist-util-stringify-position": "3.0.3", "unist-util-visit": "4.1.2", "vfile": "5.3.7" } }, "sha512-jLuwRlz8DQfQNiUCJR50Y09CGPq3fLtmtUQfVrj79E0JWu3dvsVcxVIcfhR5h0iXu+/z++zDrYeiJqifRynJkA=="],
@@ -5309,6 +5317,8 @@
"asn1js": ["[email protected]", "", { "dependencies": { "pvtsutils": "^1.3.6", "pvutils": "^1.1.5", "tslib": "^2.8.1" } }, "sha512-S2s3aOytiKdFRdulw2qPE51MzjzVOisppcVv7jVFR+Kw0kxwvFrDcYA0h7Ndqbmj0HkMIXYWaoj7fli8kgx1eg=="],
+ "ast-metadata-inferer": ["[email protected]", "", { "dependencies": { "@mdn/browser-compat-data": "^5.6.19" } }, "sha512-ht3Dm6Zr7SXv6t1Ra6gFo0+kLDglHGrEbYihTkcycrbHw7WCcuhBzPlJYHEsIpycaUwzsJHje+vUcxXUX4ztTA=="],
+
"ast-types": ["[email protected]", "", { "dependencies": { "tslib": "2.8.1" } }, "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg=="],
"ast-types-flow": ["[email protected]", "", {}, "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ=="],
@@ -5901,6 +5911,8 @@
"eslint-plugin-10x": ["[email protected]", "", { "dependencies": { "jsx-ast-utils": "2.4.1" }, "peerDependencies": { "eslint": "9.19.0" } }, "sha512-SKVKlSJXJSU34Gw1m0Hp+PBO5az4zPIRU3+nC3Ya6x+nQ3Bq3kIfQUBH6dN811CawO6sacpc538IJAqTDSMSWQ=="],
+ "eslint-plugin-compat": ["[email protected]", "", { "dependencies": { "@mdn/browser-compat-data": "^6.1.1", "ast-metadata-inferer": "^0.8.1", "browserslist": "^4.25.2", "find-up": "^5.0.0", "globals": "^15.7.0", "lodash.memoize": "^4.1.2", "semver": "^7.6.2" }, "peerDependencies": { "eslint": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" } }, "sha512-gLKqUH+lQcCL+HzsROUjBDvakc5Zaga51Y4ZAkPCXc41pzKBfyluqTr2j8zOx8QQQb7zyglu1LVoL5aSNWf2SQ=="],
+
"eslint-plugin-import": ["[email protected]", "", { "dependencies": { "@rtsao/scc": "1.1.0", "array-includes": "3.1.8", "array.prototype.findlastindex": "1.2.5", "array.prototype.flat": "1.3.2", "array.prototype.flatmap": "1.3.3", "debug": "3.2.7", "doctrine": "2.1.0", "eslint-import-resolver-node": "0.3.9", "eslint-module-utils": "2.12.0", "hasown": "2.0.2", "is-core-module": "2.15.1", "is-glob": "4.0.3", "minimatch": "3.1.2", "object.fromentries": "2.0.8", "object.groupby": "1.0.3", "object.values": "1.2.1", "semver": "6.3.1", "string.prototype.trimend": "1.0.9", "tsconfig-paths": "3.15.0" }, "peerDependencies": { "@typescript-eslint/parser": "8.12.2", "eslint": "9.19.0" }, "optionalPeers": ["@typescript-eslint/parser"] }, "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A=="],
"eslint-plugin-jsx-a11y": ["[email protected]", "", { "dependencies": { "aria-query": "5.1.3", "array-includes": "3.1.8", "array.prototype.flatmap": "1.3.3", "ast-types-flow": "0.0.8", "axe-core": "4.10.0", "axobject-query": "4.1.0", "damerau-levenshtein": "1.0.8", "emoji-regex": "9.2.2", "es-iterator-helpers": "1.2.1", "hasown": "2.0.2", "jsx-ast-utils": "3.3.5", "language-tags": "1.0.9", "minimatch": "3.1.2", "object.fromentries": "2.0.8", "safe-regex-test": "1.1.0", "string.prototype.includes": "2.0.0" }, "peerDependencies": { "eslint": "9.19.0" } }, "sha512-ySOHvXX8eSN6zz8Bywacm7CvGNhUtdjvqfQDVe6020TUK34Cywkw7m0KsCCk1Qtm9G1FayfTN1/7mMYnYO2Bhg=="],
@@ -6503,6 +6515,8 @@
"jpeg-js": ["[email protected]", "", {}, "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="],
+ "js-base64": ["[email protected]", "", {}, "sha512-U73qptcvf/HIOauFOmqT3a0mDUp0MYlfd15oqoe9kqZt5XhiXVb+HG09sLvI9PQ9tZIBFS4nlErai8zbWazP0g=="],
+
"js-tokens": ["[email protected]", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
"js-yaml": ["[email protected]", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="],
@@ -7397,7 +7411,7 @@
"queue-tick": ["[email protected]", "", {}, "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag=="],
- "quick-lru": ["[email protected]", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="],
+ "quick-lru": ["[email protected]", "", {}, "sha512-k9lSsjl36EJdK7I06v7APZCbyGT2vMTsYSRX1Q2nbYmnkBqgUhRkAuzH08Ciotteu/PLJmIF2+tti7o3C/ts2g=="],
"quickselect": ["[email protected]", "", {}, "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g=="],
@@ -9355,6 +9369,8 @@
"@maplibre/vt-pbf/@maplibre/geojson-vt": ["@maplibre/[email protected]", "", {}, "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ=="],
+ "@maptiler/sdk/maplibre-gl": ["[email protected]", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/point-geometry": "^1.1.0", "@mapbox/tiny-sdf": "^2.0.7", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^2.0.4", "@mapbox/whoots-js": "^3.1.0", "@maplibre/geojson-vt": "^6.0.4", "@maplibre/maplibre-gl-style-spec": "^24.7.0", "@maplibre/mlt": "^1.1.8", "@maplibre/vt-pbf": "^4.3.0", "@types/geojson": "^7946.0.16", "earcut": "^3.0.2", "gl-matrix": "^3.4.4", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^4.0.1", "potpack": "^2.1.0", "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" } }, "sha512-zto1RTnFkOpOO1bm93ElCXF1huey2N4LvXaGLMFcYAu9txh0OhGIdX1q3LZLkrMKgMxMeYduaQo+DVNzg098fg=="],
+
"@mdx-js/loader/source-map": ["[email protected]", "", {}, "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ=="],
"@mdx-js/loader/webpack": ["[email protected]", "", { "dependencies": { "@types/eslint-scope": "3.7.7", "@types/estree": "1.0.7", "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/wasm-edit": "1.12.1", "@webassemblyjs/wasm-parser": "1.12.1", "acorn": "8.14.0", "browserslist": "4.25.0", "chrome-trace-event": "1.0.3", "enhanced-resolve": "5.18.1", "es-module-lexer": "1.5.4", "eslint-scope": "5.1.1", "events": "3.3.0", "glob-to-regexp": "0.4.1", "graceful-fs": "4.2.11", "json-parse-even-better-errors": "2.3.1", "loader-runner": "4.2.0", "mime-types": "2.1.34", "neo-async": "2.6.2", "schema-utils": "3.3.0", "tapable": "2.2.1", "terser-webpack-plugin": "5.3.10", "watchpack": "2.4.1", "webpack-sources": "3.2.3" }, "bin": { "webpack": "bin/webpack.js" } }, "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA=="],
@@ -10413,6 +10429,8 @@
"asn1js/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+ "ast-metadata-inferer/@mdn/browser-compat-data": ["@mdn/[email protected]", "", {}, "sha512-7xdrMX0Wk7grrTZQwAoy1GkvPMFoizStUoL+VmtUkAxegbCCec+3FKwOM6yc/uGU5+BEczQHXAlWiqvM8JeENg=="],
+
"ast-types/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
"astro/esbuild": ["[email protected]", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.7", "@esbuild/android-arm": "0.27.7", "@esbuild/android-arm64": "0.27.7", "@esbuild/android-x64": "0.27.7", "@esbuild/darwin-arm64": "0.27.7", "@esbuild/darwin-x64": "0.27.7", "@esbuild/freebsd-arm64": "0.27.7", "@esbuild/freebsd-x64": "0.27.7", "@esbuild/linux-arm": "0.27.7", "@esbuild/linux-arm64": "0.27.7", "@esbuild/linux-ia32": "0.27.7", "@esbuild/linux-loong64": "0.27.7", "@esbuild/linux-mips64el": "0.27.7", "@esbuild/linux-ppc64": "0.27.7", "@esbuild/linux-riscv64": "0.27.7", "@esbuild/linux-s390x": "0.27.7", "@esbuild/linux-x64": "0.27.7", "@esbuild/netbsd-arm64": "0.27.7", "@esbuild/netbsd-x64": "0.27.7", "@esbuild/openbsd-arm64": "0.27.7", "@esbuild/openbsd-x64": "0.27.7", "@esbuild/openharmony-arm64": "0.27.7", "@esbuild/sunos-x64": "0.27.7", "@esbuild/win32-arm64": "0.27.7", "@esbuild/win32-ia32": "0.27.7", "@esbuild/win32-x64": "0.27.7" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w=="],
@@ -10647,6 +10665,10 @@
"eslint-plugin-10x/jsx-ast-utils": ["[email protected]", "", { "dependencies": { "array-includes": "3.1.8", "object.assign": "4.1.7" } }, "sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w=="],
+ "eslint-plugin-compat/globals": ["[email protected]", "", {}, "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg=="],
+
+ "eslint-plugin-compat/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
+
"eslint-plugin-import/@typescript-eslint/parser": ["@typescript-eslint/[email protected]", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.12.2", "@typescript-eslint/types": "8.12.2", "@typescript-eslint/typescript-estree": "8.12.2", "@typescript-eslint/visitor-keys": "8.12.2", "debug": "4.4.0" }, "peerDependencies": { "eslint": "9.19.0", "typescript": "5.8.2" }, "optionalPeers": ["typescript"] }, "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw=="],
"eslint-plugin-import/debug": ["[email protected]", "", { "dependencies": { "ms": "2.1.3" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="],
@@ -10811,6 +10833,8 @@
"http-proxy-middleware/is-plain-obj": ["[email protected]", "", {}, "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA=="],
+ "http2-wrapper/quick-lru": ["[email protected]", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="],
+
"https-proxy-agent/debug": ["[email protected]", "", { "dependencies": { "ms": "2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="],
"icss-utils/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "3.3.11", "picocolors": "1.1.1", "source-map-js": "1.2.1" } }, "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ=="],
@@ -22523,6 +22547,8 @@
"package-json/got/cacheable-request/normalize-url": ["[email protected]", "", {}, "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w=="],
+ "package-json/got/http2-wrapper/quick-lru": ["[email protected]", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="],
+
"peek-stream/duplexify/readable-stream/isarray": ["[email protected]", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="],
"peek-stream/duplexify/readable-stream/safe-buffer": ["[email protected]", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
diff --git a/packages/example/.env.example b/packages/example/.env.example
new file mode 100644
index 0000000000..d31d0aa51c
--- /dev/null
+++ b/packages/example/.env.example
@@ -0,0 +1 @@
+REMOTION_MAPTILER_KEY=replace-with-your-maptiler-api-key
diff --git a/packages/example/package.json b/packages/example/package.json
index 2f6e8132b2..b48cfe5614 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -31,6 +31,7 @@
"render-transparent": "remotion render --image-format=png --pixel-format=yuva420p --codec=vp8 react-svg out/video.webm"
},
"dependencies": {
+ "@maptiler/sdk": "4.0.2",
"@remotion/drag-and-drop": "workspace:*",
"@mdx-js/loader": "2.3.0",
"@mdx-js/react": "2.3.0",
@@ -85,6 +86,7 @@
"@remotion/zod-types": "workspace:*",
"@remotion/zod-types-v3": "workspace:*",
"@shopify/react-native-skia": "2.0.0",
+ "@turf/turf": "7.3.2",
"@types/express": "4.17.23",
"@types/hls.js": "0.13.3",
"@types/opentype.js": "1.3.4",
diff --git a/packages/example/public/stuttgart-pin.png b/packages/example/public/stuttgart-pin.png
new file mode 100644
index 0000000000..d36aab99ed
Binary files /dev/null and b/packages/example/public/stuttgart-pin.png differ
diff --git a/packages/example/public/zurich-pin.png b/packages/example/public/zurich-pin.png
new file mode 100644
index 0000000000..d5c88150f1
Binary files /dev/null and b/packages/example/public/zurich-pin.png differ
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsx
index 41bd341f6a..56d36545ae 100644
--- a/packages/example/src/Root.tsx
+++ b/packages/example/src/Root.tsx
@@ -414,6 +414,22 @@ export const Index: React.FC = () => {
return (
<>
+ <Composition
+ id="switzerland-map"
+ lazyComponent={() => import('./SwitzerlandMap/SwitzerlandMap')}
+ durationInFrames={240}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="zurich-to-stuttgart-map"
+ lazyComponent={() => import('./SwitzerlandMap/ZurichToStuttgartMap')}
+ durationInFrames={270}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
<Composition
id="captions-tester"
component={AnimatedCaptions}
diff --git a/packages/example/src/SwitzerlandMap/MapOverlay.tsx b/packages/example/src/SwitzerlandMap/MapOverlay.tsx
new file mode 100644
index 0000000000..f5a7ba0aa4
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/MapOverlay.tsx
@@ -0,0 +1,118 @@
+import {
+ forwardRef,
+ useContext,
+ useImperativeHandle,
+ useRef,
+ type ReactNode,
+} from 'react';
+import {
+ Interactive,
+ Sequence,
+ type InteractiveBaseProps,
+ type InteractiveTransformProps,
+ type InteractivitySchema,
+ type SequenceControls,
+} from 'remotion';
+import {MapTilerContext} from './MapTilerContext';
+
+type MapOverlayProps = InteractiveBaseProps &
+ InteractiveTransformProps & {
+ readonly children?: ReactNode;
+ readonly controls?: SequenceControls;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly stack?: string;
+ };
+
+const mapOverlaySchema = {
+ ...Interactive.baseSchema,
+ longitude: {
+ type: 'number',
+ min: -180,
+ max: 180,
+ step: 0.0001,
+ default: 0,
+ description: 'Longitude',
+ hiddenFromList: false,
+ },
+ latitude: {
+ type: 'number',
+ min: -90,
+ max: 90,
+ step: 0.0001,
+ default: 0,
+ description: 'Latitude',
+ hiddenFromList: false,
+ },
+ ...Interactive.transformSchema,
+} as const satisfies InteractivitySchema;
+
+const MapOverlayInner = forwardRef<
+ HTMLDivElement,
+ MapOverlayProps & {
+ readonly stack?: undefined;
+ }
+>(
+ (
+ {
+ children,
+ latitude,
+ longitude,
+ style,
+ durationInFrames,
+ from,
+ trimBefore,
+ freeze,
+ hidden,
+ name,
+ showInTimeline,
+ controls,
+ stack,
+ },
+ ref,
+ ) => {
+ const {map} = useContext(MapTilerContext);
+ const refForOutline = useRef<HTMLDivElement>(null);
+ const point = map?.project([longitude, latitude]);
+
+ useImperativeHandle(ref, () => refForOutline.current as HTMLDivElement, []);
+
+ return (
+ <Sequence
+ layout="none"
+ from={from ?? 0}
+ trimBefore={trimBefore}
+ durationInFrames={durationInFrames ?? Infinity}
+ freeze={freeze}
+ hidden={hidden}
+ name={name ?? '<MapOverlay>'}
+ showInTimeline={showInTimeline ?? true}
+ controls={controls}
+ outlineRef={refForOutline}
+ _remotionInternalStack={stack}
+ >
+ <div
+ ref={refForOutline}
+ style={{
+ left: point?.x ?? 0,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top: point?.y ?? 0,
+ zIndex: 1,
+ ...style,
+ }}
+ >
+ {children}
+ </div>
+ </Sequence>
+ );
+ },
+);
+
+export const MapOverlay = Interactive.withSchema({
+ Component: MapOverlayInner,
+ componentName: '<MapOverlay>',
+ componentIdentity: null,
+ schema: mapOverlaySchema,
+ supportsEffects: false,
+});
diff --git a/packages/example/src/SwitzerlandMap/MapPin.tsx b/packages/example/src/SwitzerlandMap/MapPin.tsx
new file mode 100644
index 0000000000..f98dba24aa
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/MapPin.tsx
@@ -0,0 +1,108 @@
+import type {FC} from 'react';
+import {
+ CanvasImage,
+ Easing,
+ Interactive,
+ Sequence,
+ interpolate,
+ useCurrentFrame,
+} from 'remotion';
+
+type MapPinProps = {
+ readonly imageSrc: string;
+ readonly name: string;
+};
+
+export const MapPin: FC<MapPinProps> = ({imageSrc, name}) => {
+ const frame = useCurrentFrame();
+
+ return (
+ <div
+ style={{
+ height: 700,
+ left: 0,
+ position: 'absolute',
+ top: 0,
+ translate: '-50% -100%',
+ width: 1080,
+ }}
+ >
+ <Sequence
+ name={name}
+ style={{
+ transformOrigin: '50% 100%',
+ scale: interpolate(
+ frame,
+ [0, 9, 50, 73],
+ [0, 1, 1.0000000000280422, 0.57],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ output: 'perceptual-scale',
+ easing: [
+ Easing.spring({
+ damping: 6,
+ mass: 1,
+ stiffness: 37,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ Easing.linear,
+ Easing.linear,
+ ],
+ },
+ ),
+ rotate: interpolate(frame, [0, 21], ['-116deg', '0deg'], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.spring({
+ damping: 6,
+ mass: 1,
+ stiffness: 37,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ }),
+ translate: '-0.4px -4.5px',
+ }}
+ >
+ <Interactive.Svg
+ name={`${name} shape`}
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 384 512"
+ style={{
+ position: 'absolute',
+ translate: '349.8px 89.5px',
+ scale: 1.306,
+ width: 384,
+ height: 512,
+ overflow: 'visible',
+ }}
+ >
+ <path
+ fill="#0B84F2"
+ d="M192 0C86 0 0 84.4 0 188.6 0 307.9 120.2 450.9 170.4 505.4 182.2 518.2 201.8 518.2 213.6 505.4 263.8 450.9 384 307.9 384 188.6 384 84.4 298 0 192 0z"
+ />
+ </Interactive.Svg>
+ <CanvasImage
+ name={`${name} image`}
+ src={imageSrc}
+ style={{
+ position: 'absolute',
+ width: 1080,
+ height: 1080,
+ scale: 0.371,
+ borderRadius: '50%',
+ translate: '1.8px -275.4px',
+ borderWidth: 34,
+ borderColor: '#ffffff',
+ }}
+ />
+ </Sequence>
+ </div>
+ );
+};
diff --git a/packages/example/src/SwitzerlandMap/MapRegion.tsx b/packages/example/src/SwitzerlandMap/MapRegion.tsx
new file mode 100644
index 0000000000..ea4577d100
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/MapRegion.tsx
@@ -0,0 +1,393 @@
+import {GeoJSONSource} from '@maptiler/sdk';
+import {length as getLineLength, lineSliceAlong, lineString} from '@turf/turf';
+import {
+ forwardRef,
+ useContext,
+ useEffect,
+ useImperativeHandle,
+ useMemo,
+ useRef,
+ useState,
+ type RefObject,
+} from 'react';
+import {
+ Interactive,
+ Sequence,
+ type InteractiveBaseProps,
+ type InteractivitySchema,
+ type SequenceControls,
+ useDelayRender,
+} from 'remotion';
+import {MapTilerContext} from './MapTilerContext';
+
+export type MapRegionFeature = {
+ type: 'Feature';
+ properties: {name: string; source: string};
+ geometry: {type: 'Polygon'; coordinates: number[][][]};
+};
+
+type MapRegionProps = InteractiveBaseProps & {
+ readonly controls?: SequenceControls;
+ readonly feature: MapRegionFeature;
+ readonly fill?: number;
+ readonly fillColor: string;
+ readonly glow?: number;
+ readonly id: string;
+ readonly progress?: number;
+ readonly stack?: string;
+ readonly strokeColor?: string;
+ readonly strokeWidth?: number;
+};
+
+const mapRegionSchema = {
+ ...Interactive.baseSchema,
+ fill: {
+ type: 'number',
+ min: 0,
+ max: 1,
+ step: 0.01,
+ default: 0,
+ description: 'Fill opacity',
+ hiddenFromList: false,
+ },
+ fillColor: {
+ type: 'color',
+ default: '#d52b1e',
+ description: 'Fill color',
+ keyframable: true,
+ },
+ glow: {
+ type: 'number',
+ min: 0,
+ max: 1,
+ step: 0.01,
+ default: 0.72,
+ description: 'Glow intensity',
+ hiddenFromList: false,
+ keyframable: true,
+ },
+ progress: {
+ type: 'number',
+ min: 0,
+ max: 1,
+ step: 0.01,
+ default: 1,
+ description: 'Outline drawing progress',
+ hiddenFromList: false,
+ },
+ strokeColor: {
+ type: 'color',
+ default: '#8f1712',
+ description: 'Stroke color',
+ },
+ strokeWidth: {
+ type: 'number',
+ min: 0,
+ max: 50,
+ step: 1,
+ default: 9,
+ description: 'Stroke width',
+ hiddenFromList: false,
+ },
+} as const satisfies InteractivitySchema;
+
+type MapRegionDrawingProps = Pick<
+ MapRegionProps,
+ | 'feature'
+ | 'fill'
+ | 'fillColor'
+ | 'glow'
+ | 'id'
+ | 'progress'
+ | 'strokeColor'
+ | 'strokeWidth'
+>;
+
+const MapRegionDrawing = ({
+ feature,
+ fill = 0,
+ fillColor,
+ glow = 0.72,
+ id,
+ progress = 1,
+ strokeColor = '#8f1712',
+ strokeWidth = 9,
+}: MapRegionDrawingProps) => {
+ const {map} = useContext(MapTilerContext);
+ const {continueRender, delayRender} = useDelayRender();
+ const [isReady, setIsReady] = useState(false);
+ const [loadingHandle] = useState(() =>
+ delayRender(`Loading ${feature.properties.name} geometry`),
+ );
+ const outline = useMemo(
+ () => lineString(feature.geometry.coordinates[0]),
+ [feature],
+ );
+ const outlineLength = useMemo(() => getLineLength(outline), [outline]);
+ const fillSourceId = `${id}-fill`;
+ const outlineSourceId = `${id}-outline`;
+ const outlineGlowLayerId = `${id}-outline-glow`;
+
+ useEffect(() => {
+ if (!map) {
+ return;
+ }
+
+ if (!map.getSource(fillSourceId)) {
+ map.addSource(fillSourceId, {
+ data: feature,
+ type: 'geojson',
+ });
+ }
+
+ if (!map.getLayer(fillSourceId)) {
+ map.addLayer({
+ id: fillSourceId,
+ paint: {
+ 'fill-color': fillColor,
+ 'fill-opacity': 0,
+ },
+ source: fillSourceId,
+ type: 'fill',
+ });
+ }
+ map.setPaintProperty(fillSourceId, 'fill-color', fillColor);
+
+ if (!map.getSource(outlineSourceId)) {
+ map.addSource(outlineSourceId, {
+ data: lineSliceAlong(outline, 0, 0.001),
+ type: 'geojson',
+ });
+ }
+
+ if (!map.getLayer(outlineGlowLayerId)) {
+ map.addLayer({
+ id: outlineGlowLayerId,
+ layout: {'line-cap': 'round', 'line-join': 'round'},
+ paint: {
+ 'line-blur': 8,
+ 'line-color': '#ffffff',
+ 'line-opacity': glow,
+ 'line-width': 22,
+ },
+ source: outlineSourceId,
+ type: 'line',
+ });
+ }
+ map.setPaintProperty(
+ outlineGlowLayerId,
+ 'line-opacity',
+ Math.min(1, Math.max(0, glow)),
+ );
+
+ if (!map.getLayer(outlineSourceId)) {
+ map.addLayer({
+ id: outlineSourceId,
+ layout: {'line-cap': 'round', 'line-join': 'round'},
+ paint: {
+ 'line-color': strokeColor,
+ 'line-opacity': 1,
+ 'line-width': strokeWidth,
+ },
+ source: outlineSourceId,
+ type: 'line',
+ });
+ }
+ map.setPaintProperty(outlineSourceId, 'line-color', strokeColor);
+ map.setPaintProperty(outlineSourceId, 'line-width', strokeWidth);
+
+ map.once('idle', () => {
+ setIsReady(true);
+ continueRender(loadingHandle);
+ });
+ map.triggerRepaint();
+ }, [
+ continueRender,
+ feature,
+ fillColor,
+ fillSourceId,
+ glow,
+ loadingHandle,
+ map,
+ outline,
+ outlineGlowLayerId,
+ outlineSourceId,
+ strokeColor,
+ strokeWidth,
+ ]);
+
+ useEffect(() => {
+ if (!isReady || !map) {
+ return;
+ }
+
+ const frameHandle = delayRender(`Drawing ${feature.properties.name}`);
+
+ (map.getSource(outlineSourceId) as GeoJSONSource).setData(
+ lineSliceAlong(
+ outline,
+ 0,
+ Math.max(0.001, outlineLength * Math.min(1, Math.max(0, progress))),
+ ),
+ );
+ map.setPaintProperty(
+ fillSourceId,
+ 'fill-opacity',
+ Math.min(1, Math.max(0, fill)),
+ );
+ map.once('idle', () => continueRender(frameHandle));
+ map.triggerRepaint();
+ }, [
+ continueRender,
+ delayRender,
+ feature.properties.name,
+ fill,
+ fillSourceId,
+ isReady,
+ map,
+ outline,
+ outlineLength,
+ outlineSourceId,
+ progress,
+ ]);
+
+ useEffect(() => {
+ if (!map) {
+ return;
+ }
+
+ return () => {
+ if (map.getLayer(outlineSourceId)) {
+ map.removeLayer(outlineSourceId);
+ }
+
+ if (map.getLayer(outlineGlowLayerId)) {
+ map.removeLayer(outlineGlowLayerId);
+ }
+
+ if (map.getLayer(fillSourceId)) {
+ map.removeLayer(fillSourceId);
+ }
+
+ if (map.getSource(outlineSourceId)) {
+ map.removeSource(outlineSourceId);
+ }
+
+ if (map.getSource(fillSourceId)) {
+ map.removeSource(fillSourceId);
+ }
+
+ map.triggerRepaint();
+ };
+ }, [fillSourceId, map, outlineGlowLayerId, outlineSourceId]);
+
+ return null;
+};
+
+const MapRegionBounds = ({
+ feature,
+ refForOutline,
+}: {
+ readonly feature: MapRegionFeature;
+ readonly refForOutline: RefObject<HTMLDivElement | null>;
+}) => {
+ const {map} = useContext(MapTilerContext);
+
+ if (!map) {
+ return <div ref={refForOutline} />;
+ }
+
+ const points = feature.geometry.coordinates
+ .flat()
+ .map(([longitude, latitude]) => map.project([longitude, latitude]));
+ const left = Math.min(...points.map((point) => point.x));
+ const right = Math.max(...points.map((point) => point.x));
+ const top = Math.min(...points.map((point) => point.y));
+ const bottom = Math.max(...points.map((point) => point.y));
+
+ return (
+ <div
+ ref={refForOutline}
+ style={{
+ height: bottom - top,
+ left,
+ opacity: 0,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top,
+ width: right - left,
+ zIndex: 1,
+ }}
+ />
+ );
+};
+
+const MapRegionInner = forwardRef<
+ HTMLDivElement,
+ MapRegionProps & {
+ readonly stack?: undefined;
+ }
+>(
+ (
+ {
+ feature,
+ fill = 0,
+ fillColor,
+ glow = 0.72,
+ id,
+ progress = 1,
+ strokeColor = '#8f1712',
+ strokeWidth = 9,
+ durationInFrames,
+ from,
+ trimBefore,
+ freeze,
+ hidden,
+ name,
+ showInTimeline,
+ controls,
+ stack,
+ },
+ ref,
+ ) => {
+ const refForOutline = useRef<HTMLDivElement>(null);
+
+ useImperativeHandle(ref, () => refForOutline.current as HTMLDivElement, []);
+
+ return (
+ <Sequence
+ layout="none"
+ from={from ?? 0}
+ trimBefore={trimBefore}
+ durationInFrames={durationInFrames ?? Infinity}
+ freeze={freeze}
+ hidden={hidden}
+ name={name ?? `<${feature.properties.name}>`}
+ showInTimeline={showInTimeline ?? true}
+ controls={controls}
+ outlineRef={refForOutline}
+ _remotionInternalStack={stack}
+ >
+ <MapRegionDrawing
+ feature={feature}
+ fill={fill}
+ fillColor={fillColor}
+ glow={glow}
+ id={id}
+ progress={progress}
+ strokeColor={strokeColor}
+ strokeWidth={strokeWidth}
+ />
+ <MapRegionBounds feature={feature} refForOutline={refForOutline} />
+ </Sequence>
+ );
+ },
+);
+
+export const MapRegion = Interactive.withSchema({
+ Component: MapRegionInner,
+ componentName: '<MapRegion>',
+ componentIdentity: null,
+ schema: mapRegionSchema,
+ supportsEffects: false,
+});
diff --git a/packages/example/src/SwitzerlandMap/MapRoute.tsx b/packages/example/src/SwitzerlandMap/MapRoute.tsx
new file mode 100644
index 0000000000..0944595073
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/MapRoute.tsx
@@ -0,0 +1,324 @@
+import {GeoJSONSource} from '@maptiler/sdk';
+import {length as getLineLength, lineSliceAlong, lineString} from '@turf/turf';
+import {
+ forwardRef,
+ useContext,
+ useEffect,
+ useImperativeHandle,
+ useMemo,
+ useRef,
+ useState,
+ type RefObject,
+} from 'react';
+import {
+ Interactive,
+ Sequence,
+ type InteractiveBaseProps,
+ type InteractivitySchema,
+ type SequenceControls,
+ useDelayRender,
+} from 'remotion';
+import {MapTilerContext} from './MapTilerContext';
+
+export type MapRouteFeature = {
+ type: 'Feature';
+ properties: {name: string; source: string};
+ geometry: {type: 'LineString'; coordinates: number[][]};
+};
+
+type MapRouteProps = InteractiveBaseProps & {
+ readonly controls?: SequenceControls;
+ readonly feature: MapRouteFeature;
+ readonly glow?: number;
+ readonly id: string;
+ readonly progress?: number;
+ readonly stack?: string;
+ readonly strokeColor?: string;
+ readonly strokeWidth?: number;
+};
+
+const mapRouteSchema = {
+ ...Interactive.baseSchema,
+ glow: {
+ type: 'number',
+ min: 0,
+ max: 1,
+ step: 0.01,
+ default: 0.72,
+ description: 'Glow intensity',
+ hiddenFromList: false,
+ keyframable: true,
+ },
+ progress: {
+ type: 'number',
+ min: 0,
+ max: 1,
+ step: 0.01,
+ default: 1,
+ description: 'Route drawing progress',
+ hiddenFromList: false,
+ },
+ strokeColor: {
+ type: 'color',
+ default: '#006cff',
+ description: 'Stroke color',
+ },
+ strokeWidth: {
+ type: 'number',
+ min: 0,
+ max: 50,
+ step: 1,
+ default: 9,
+ description: 'Stroke width',
+ hiddenFromList: false,
+ },
+} as const satisfies InteractivitySchema;
+
+type MapRouteDrawingProps = Pick<
+ MapRouteProps,
+ 'feature' | 'glow' | 'id' | 'progress' | 'strokeColor' | 'strokeWidth'
+>;
+
+const MapRouteDrawing = ({
+ feature,
+ glow = 0.72,
+ id,
+ progress = 1,
+ strokeColor = '#006cff',
+ strokeWidth = 9,
+}: MapRouteDrawingProps) => {
+ const {map} = useContext(MapTilerContext);
+ const {continueRender, delayRender} = useDelayRender();
+ const [isReady, setIsReady] = useState(false);
+ const [loadingHandle] = useState(() =>
+ delayRender(`Loading ${feature.properties.name} route`),
+ );
+ const route = useMemo(
+ () => lineString(feature.geometry.coordinates),
+ [feature],
+ );
+ const routeLength = useMemo(() => getLineLength(route), [route]);
+ const sourceId = `${id}-route`;
+ const glowLayerId = `${id}-route-glow`;
+
+ useEffect(() => {
+ if (!map) {
+ return;
+ }
+
+ if (!map.getSource(sourceId)) {
+ map.addSource(sourceId, {
+ data: lineSliceAlong(route, 0, 0.001),
+ type: 'geojson',
+ });
+ }
+
+ if (!map.getLayer(glowLayerId)) {
+ map.addLayer({
+ id: glowLayerId,
+ layout: {'line-cap': 'round', 'line-join': 'round'},
+ paint: {
+ 'line-blur': 8,
+ 'line-color': '#ffffff',
+ 'line-opacity': glow,
+ 'line-width': 22,
+ },
+ source: sourceId,
+ type: 'line',
+ });
+ }
+ map.setPaintProperty(
+ glowLayerId,
+ 'line-opacity',
+ Math.min(1, Math.max(0, glow)),
+ );
+
+ if (!map.getLayer(sourceId)) {
+ map.addLayer({
+ id: sourceId,
+ layout: {'line-cap': 'round', 'line-join': 'round'},
+ paint: {
+ 'line-color': strokeColor,
+ 'line-opacity': 1,
+ 'line-width': strokeWidth,
+ },
+ source: sourceId,
+ type: 'line',
+ });
+ }
+ map.setPaintProperty(sourceId, 'line-color', strokeColor);
+ map.setPaintProperty(sourceId, 'line-width', strokeWidth);
+
+ map.once('idle', () => {
+ setIsReady(true);
+ continueRender(loadingHandle);
+ });
+ map.triggerRepaint();
+ }, [
+ continueRender,
+ glow,
+ glowLayerId,
+ loadingHandle,
+ map,
+ route,
+ sourceId,
+ strokeColor,
+ strokeWidth,
+ ]);
+
+ useEffect(() => {
+ if (!isReady || !map) {
+ return;
+ }
+
+ const frameHandle = delayRender(`Drawing ${feature.properties.name} route`);
+
+ (map.getSource(sourceId) as GeoJSONSource).setData(
+ lineSliceAlong(
+ route,
+ 0,
+ Math.max(0.001, routeLength * Math.min(1, Math.max(0, progress))),
+ ),
+ );
+ map.once('idle', () => continueRender(frameHandle));
+ map.triggerRepaint();
+ }, [
+ continueRender,
+ delayRender,
+ feature.properties.name,
+ isReady,
+ map,
+ progress,
+ route,
+ routeLength,
+ sourceId,
+ ]);
+
+ useEffect(() => {
+ if (!map) {
+ return;
+ }
+
+ return () => {
+ if (map.getLayer(sourceId)) {
+ map.removeLayer(sourceId);
+ }
+
+ if (map.getLayer(glowLayerId)) {
+ map.removeLayer(glowLayerId);
+ }
+
+ if (map.getSource(sourceId)) {
+ map.removeSource(sourceId);
+ }
+
+ map.triggerRepaint();
+ };
+ }, [glowLayerId, map, sourceId]);
+
+ return null;
+};
+
+const MapRouteBounds = ({
+ feature,
+ refForOutline,
+}: {
+ readonly feature: MapRouteFeature;
+ readonly refForOutline: RefObject<HTMLDivElement | null>;
+}) => {
+ const {map} = useContext(MapTilerContext);
+
+ if (!map) {
+ return <div ref={refForOutline} />;
+ }
+
+ const points = feature.geometry.coordinates.map(([longitude, latitude]) =>
+ map.project([longitude, latitude]),
+ );
+ const left = Math.min(...points.map((point) => point.x));
+ const right = Math.max(...points.map((point) => point.x));
+ const top = Math.min(...points.map((point) => point.y));
+ const bottom = Math.max(...points.map((point) => point.y));
+
+ return (
+ <div
+ ref={refForOutline}
+ style={{
+ height: bottom - top,
+ left,
+ opacity: 0,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top,
+ width: right - left,
+ zIndex: 1,
+ }}
+ />
+ );
+};
+
+const MapRouteInner = forwardRef<
+ HTMLDivElement,
+ MapRouteProps & {
+ readonly stack?: undefined;
+ }
+>(
+ (
+ {
+ feature,
+ glow = 0.72,
+ id,
+ progress = 1,
+ strokeColor = '#006cff',
+ strokeWidth = 9,
+ durationInFrames,
+ from,
+ trimBefore,
+ freeze,
+ hidden,
+ name,
+ showInTimeline,
+ controls,
+ stack,
+ },
+ ref,
+ ) => {
+ const refForOutline = useRef<HTMLDivElement>(null);
+
+ useImperativeHandle(ref, () => refForOutline.current as HTMLDivElement, []);
+
+ return (
+ <Sequence
+ layout="none"
+ from={from ?? 0}
+ trimBefore={trimBefore}
+ durationInFrames={durationInFrames ?? Infinity}
+ freeze={freeze}
+ hidden={hidden}
+ name={name ?? `<${feature.properties.name}>`}
+ showInTimeline={showInTimeline ?? true}
+ controls={controls}
+ outlineRef={refForOutline}
+ _remotionInternalStack={stack}
+ >
+ <MapRouteDrawing
+ feature={feature}
+ glow={glow}
+ id={id}
+ progress={progress}
+ strokeColor={strokeColor}
+ strokeWidth={strokeWidth}
+ />
+ <MapRouteBounds feature={feature} refForOutline={refForOutline} />
+ </Sequence>
+ );
+ },
+);
+
+export const MapRoute = Interactive.withSchema({
+ Component: MapRouteInner,
+ componentName: '<MapRoute>',
+ componentIdentity: null,
+ schema: mapRouteSchema,
+ supportsEffects: false,
+});
diff --git a/packages/example/src/SwitzerlandMap/MapTilerContext.ts b/packages/example/src/SwitzerlandMap/MapTilerContext.ts
new file mode 100644
index 0000000000..0d09c45546
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/MapTilerContext.ts
@@ -0,0 +1,12 @@
+import type {Map as MapTilerMap} from '@maptiler/sdk';
+import {createContext} from 'react';
+
+export type MapTilerContextValue = {
+ readonly cameraRevision: number;
+ readonly map: MapTilerMap | null;
+};
+
+export const MapTilerContext = createContext<MapTilerContextValue>({
+ cameraRevision: 0,
+ map: null,
+});
diff --git a/packages/example/src/SwitzerlandMap/MapViewport.tsx b/packages/example/src/SwitzerlandMap/MapViewport.tsx
new file mode 100644
index 0000000000..19fbba2268
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/MapViewport.tsx
@@ -0,0 +1,309 @@
+import {
+ config as mapTilerConfig,
+ Map as MapTilerMap,
+ MapStyle,
+} from '@maptiler/sdk';
+import '@maptiler/sdk/dist/maptiler-sdk.css';
+import {
+ forwardRef,
+ useEffect,
+ useImperativeHandle,
+ useMemo,
+ useRef,
+ useState,
+ type ReactNode,
+} from 'react';
+import {
+ Interactive,
+ Sequence,
+ type InteractiveBaseProps,
+ type InteractivitySchema,
+ type SequenceControls,
+ useDelayRender,
+} from 'remotion';
+import {MapTilerContext} from './MapTilerContext';
+
+type MapViewportProps = InteractiveBaseProps & {
+ readonly backgroundColor?: string;
+ readonly bearing?: number;
+ readonly centerLatitude?: number;
+ readonly centerLongitude?: number;
+ readonly children?: ReactNode;
+ readonly controls?: SequenceControls;
+ readonly stack?: string;
+ readonly zoom?: number;
+};
+
+const mapViewportSchema = {
+ ...Interactive.baseSchema,
+ centerLongitude: {
+ type: 'number',
+ min: -180,
+ max: 180,
+ step: 0.0001,
+ default: 0,
+ description: 'Center longitude',
+ hiddenFromList: false,
+ keyframable: true,
+ },
+ centerLatitude: {
+ type: 'number',
+ min: -90,
+ max: 90,
+ step: 0.0001,
+ default: 0,
+ description: 'Center latitude',
+ hiddenFromList: false,
+ keyframable: true,
+ },
+ zoom: {
+ type: 'number',
+ min: 0,
+ max: 22,
+ step: 0.01,
+ default: 4,
+ description: 'Zoom',
+ hiddenFromList: false,
+ keyframable: true,
+ },
+ bearing: {
+ type: 'number',
+ min: -360,
+ max: 360,
+ step: 1,
+ default: 0,
+ description: 'Bearing',
+ hiddenFromList: false,
+ keyframable: true,
+ },
+ backgroundColor: {
+ type: 'color',
+ default: '#dfe7e2',
+ description: 'Background color',
+ },
+} as const satisfies InteractivitySchema;
+
+const MissingApiKey = () => {
+ return (
+ <div
+ style={{
+ alignItems: 'center',
+ color: '#171a1f',
+ display: 'flex',
+ flexDirection: 'column',
+ fontFamily: 'Arial, sans-serif',
+ inset: 0,
+ justifyContent: 'center',
+ padding: 100,
+ position: 'absolute',
+ textAlign: 'center',
+ }}
+ >
+ <div style={{fontSize: 64, fontWeight: 700}}>MapTiler key needed</div>
+ <div style={{fontSize: 32, lineHeight: 1.4, marginTop: 24}}>
+ Add REMOTION_MAPTILER_KEY to a .env file in packages/example.
+ </div>
+ </div>
+ );
+};
+
+const MapViewportInner = forwardRef<
+ HTMLDivElement,
+ MapViewportProps & {
+ readonly stack?: undefined;
+ }
+>(
+ (
+ {
+ backgroundColor = '#dfe7e2',
+ bearing = 0,
+ centerLatitude = 0,
+ centerLongitude = 0,
+ children,
+ durationInFrames,
+ from,
+ trimBefore,
+ freeze,
+ hidden,
+ name,
+ showInTimeline,
+ zoom = 4,
+ controls,
+ stack,
+ },
+ ref,
+ ) => {
+ const mapContainerRef = useRef<HTMLDivElement>(null);
+ const mapRef = useRef<MapTilerMap | null>(null);
+ const viewportRef = useRef<HTMLDivElement>(null);
+ const initialCameraRef = useRef({
+ bearing,
+ centerLatitude,
+ centerLongitude,
+ zoom,
+ });
+ const {continueRender, delayRender} = useDelayRender();
+ const [map, setMap] = useState<MapTilerMap | null>(null);
+ const [cameraRevision, setCameraRevision] = useState(0);
+ const [loadingHandle] = useState(() => delayRender('Loading MapTiler map'));
+ const apiKey = process.env.REMOTION_MAPTILER_KEY;
+ const contextValue = useMemo(
+ () => ({cameraRevision, map}),
+ [cameraRevision, map],
+ );
+
+ useImperativeHandle(ref, () => viewportRef.current as HTMLDivElement, []);
+
+ useEffect(() => {
+ if (!apiKey) {
+ continueRender(loadingHandle);
+ return;
+ }
+
+ if (!mapContainerRef.current || mapRef.current) {
+ return;
+ }
+
+ const initialCamera = initialCameraRef.current;
+ mapTilerConfig.apiKey = apiKey;
+ // Keep MapTiler's logo and attribution visible:
+ // https://docs.maptiler.com/guides/map-design/attribution/remove-attribution/
+ const mapInstance = new MapTilerMap({
+ bearing: initialCamera.bearing,
+ canvasContextAttributes: {preserveDrawingBuffer: true},
+ center: [initialCamera.centerLongitude, initialCamera.centerLatitude],
+ container: mapContainerRef.current,
+ fadeDuration: 0,
+ fullscreenControl: false,
+ geolocateControl: false,
+ interactive: false,
+ navigationControl: false,
+ scaleControl: false,
+ style: MapStyle.BASIC,
+ terrainControl: false,
+ zoom: initialCamera.zoom,
+ });
+ mapRef.current = mapInstance;
+
+ mapInstance.on('load', () => {
+ for (const layer of [...(mapInstance.getStyle().layers ?? [])]) {
+ if (layer.type === 'symbol' || /other border/i.test(layer.id)) {
+ mapInstance.removeLayer(layer.id);
+ }
+ }
+
+ mapInstance.once('idle', () => {
+ setMap(mapInstance);
+ continueRender(loadingHandle);
+ });
+ mapInstance.triggerRepaint();
+ });
+
+ return () => {
+ mapInstance.remove();
+ mapRef.current = null;
+ };
+ }, [apiKey, continueRender, loadingHandle]);
+
+ useEffect(() => {
+ if (!map) {
+ return;
+ }
+
+ const currentCenter = map.getCenter();
+ const cameraIsCurrent =
+ Math.abs(currentCenter.lng - centerLongitude) < 0.0000001 &&
+ Math.abs(currentCenter.lat - centerLatitude) < 0.0000001 &&
+ Math.abs(map.getZoom() - zoom) < 0.0000001 &&
+ Math.abs(map.getBearing() - bearing) < 0.0000001;
+
+ if (cameraIsCurrent) {
+ return;
+ }
+
+ const cameraHandle = delayRender('Updating MapTiler camera');
+ let hasFinished = false;
+ const finish = () => {
+ if (hasFinished) {
+ return;
+ }
+
+ hasFinished = true;
+ continueRender(cameraHandle);
+ };
+ const onIdle = () => finish();
+
+ map.once('idle', onIdle);
+ map.jumpTo({
+ bearing,
+ center: [centerLongitude, centerLatitude],
+ zoom,
+ });
+ setCameraRevision((revision) => revision + 1);
+ map.triggerRepaint();
+
+ return () => {
+ map.off('idle', onIdle);
+ finish();
+ };
+ }, [
+ bearing,
+ centerLatitude,
+ centerLongitude,
+ continueRender,
+ delayRender,
+ map,
+ zoom,
+ ]);
+
+ return (
+ <Sequence
+ layout="none"
+ from={from ?? 0}
+ trimBefore={trimBefore}
+ durationInFrames={durationInFrames ?? Infinity}
+ freeze={freeze}
+ hidden={hidden}
+ name={name ?? '<MapViewport>'}
+ showInTimeline={showInTimeline ?? true}
+ controls={controls}
+ _remotionInternalStack={stack}
+ >
+ <div
+ ref={viewportRef}
+ style={{
+ backgroundColor,
+ inset: 0,
+ overflow: 'hidden',
+ position: 'absolute',
+ }}
+ >
+ {apiKey ? (
+ <>
+ <div
+ ref={mapContainerRef}
+ style={{
+ inset: 0,
+ position: 'absolute',
+ }}
+ />
+ <MapTilerContext.Provider value={contextValue}>
+ {children}
+ </MapTilerContext.Provider>
+ </>
+ ) : (
+ <MissingApiKey />
+ )}
+ </div>
+ </Sequence>
+ );
+ },
+);
+
+export const MapViewport = Interactive.withSchema({
+ Component: MapViewportInner,
+ componentName: '<MapViewport>',
+ componentIdentity: null,
+ schema: mapViewportSchema,
+ supportsEffects: false,
+});
diff --git a/packages/example/src/SwitzerlandMap/SwitzerlandMap.tsx b/packages/example/src/SwitzerlandMap/SwitzerlandMap.tsx
new file mode 100644
index 0000000000..4b238161d8
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/SwitzerlandMap.tsx
@@ -0,0 +1,100 @@
+import {Easing, interpolate, useCurrentFrame} from 'remotion';
+import austriaData from './austria-10m.json';
+import {MapRegion, type MapRegionFeature} from './MapRegion';
+import {MapViewport} from './MapViewport';
+import switzerlandData from './switzerland-10m.json';
+
+const switzerland = switzerlandData as MapRegionFeature;
+const austria = austriaData as MapRegionFeature;
+
+export const SwitzerlandMap = () => {
+ const frame = useCurrentFrame();
+
+ return (
+ <MapViewport
+ name="Map camera"
+ from={0}
+ centerLongitude={interpolate(frame, [124, 164], [8.2275, 13.3347], {
+ easing: [Easing.bezier(0.65, 0, 0.35, 1)],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ centerLatitude={interpolate(frame, [124, 164], [46.8182, 47.6942], {
+ easing: [Easing.bezier(0.65, 0, 0.35, 1)],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ zoom={interpolate(frame, [0, 72, 124, 164], [4.5, 6.2, 6.65, 5.8], {
+ easing: [
+ Easing.bezier(0.65, 0, 0.35, 1),
+ Easing.bezier(0.65, 0, 0.35, 1),
+ Easing.bezier(0.65, 0, 0.35, 1),
+ ],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ bearing={0}
+ >
+ <MapRegion
+ name="Switzerland outline"
+ from={76}
+ id="switzerland"
+ feature={switzerland}
+ fill={interpolate(frame, [122, 144, 154], [0, 0.3, 0.24], {
+ easing: Easing.out(Easing.cubic),
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ fillColor={'#1e46d5'}
+ strokeColor="#8f1712"
+ strokeWidth={4}
+ progress={interpolate(frame, [76, 126], [0, 1], {
+ easing: Easing.out(Easing.cubic),
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ glow={interpolate(frame, [142, 154], [0, 1], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+
+ easing: [
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ })}
+ />
+ <MapRegion
+ name="Austria outline"
+ from={140}
+ id="austria"
+ feature={austria}
+ fill={interpolate(frame, [186, 208, 218], [0, 0.3, 0.24], {
+ easing: [
+ Easing.bezier(0.33333333333333337, 1, 0.6666666666666667, 1),
+ Easing.bezier(0.33333333333333337, 1, 0.6666666666666667, 1),
+ ],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ fillColor="#ed2939"
+ strokeColor="#981b27"
+ strokeWidth={4}
+ progress={interpolate(frame, [162, 212], [0, 1], {
+ easing: [
+ Easing.bezier(0.33333333333333337, 1, 0.6666666666666667, 1),
+ ],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ />
+ </MapViewport>
+ );
+};
+
+export default SwitzerlandMap;
diff --git a/packages/example/src/SwitzerlandMap/ZurichToStuttgartMap.tsx b/packages/example/src/SwitzerlandMap/ZurichToStuttgartMap.tsx
new file mode 100644
index 0000000000..5f875709b8
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/ZurichToStuttgartMap.tsx
@@ -0,0 +1,133 @@
+import {Easing, interpolate, staticFile, useCurrentFrame} from 'remotion';
+import {MapOverlay} from './MapOverlay';
+import {MapPin} from './MapPin';
+import {MapRoute, type MapRouteFeature} from './MapRoute';
+import {MapViewport} from './MapViewport';
+
+const zurichToStuttgart = {
+ type: 'Feature',
+ properties: {
+ name: 'Zurich to Stuttgart',
+ source: 'Direct city-to-city route',
+ },
+ geometry: {
+ type: 'LineString',
+ coordinates: [
+ [8.541071693747302, 47.41728197584036],
+ [8.622, 47.66],
+ [8.811, 47.94],
+ [8.951, 48.24],
+ [9.059, 48.49],
+ [9.1829, 48.7758],
+ ],
+ },
+} as const satisfies MapRouteFeature;
+
+export const ZurichToStuttgartMap = () => {
+ const frame = useCurrentFrame();
+
+ return (
+ <MapViewport
+ name="Map camera"
+ from={0}
+ centerLongitude={interpolate(
+ frame,
+ [106, 179],
+ [8.541071693747302, 9.1829],
+ {
+ easing: [
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ )}
+ centerLatitude={interpolate(
+ frame,
+ [106, 179],
+ [47.41728197584036, 48.7758],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ )}
+ zoom={interpolate(frame, [78, 101, 204, 216], [17.97, 7.4, 7.4, 12], {
+ easing: [
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.04,
+ overshootClamping: false,
+ }),
+ Easing.bezier(0.65, 0, 0.35, 1),
+ Easing.bezier(0.65, 0, 0.35, 1),
+ ],
+
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ bearing={111}
+ >
+ <MapOverlay
+ name="Zurich marker"
+ from={28}
+ longitude={8.541071693747302}
+ latitude={47.41728197584036}
+ style={{
+ scale: 0.4,
+ }}
+ >
+ <MapPin name="Zurich pin" imageSrc={staticFile('zurich-pin.png')} />
+ </MapOverlay>
+ <MapRoute
+ name="Zurich to Stuttgart route"
+ from={106}
+ id="zurich-to-stuttgart"
+ feature={zurichToStuttgart}
+ glow={0.7}
+ progress={interpolate(frame, [128, 179], [0, 1], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+
+ easing: [
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ })}
+ strokeColor={'#ff6700'}
+ strokeWidth={8}
+ />
+ <MapOverlay
+ name="Stuttgart marker"
+ from={225}
+ longitude={9.1829}
+ latitude={48.7758}
+ style={{
+ scale: 0.3,
+ }}
+ >
+ <MapPin
+ name="Stuttgart pin"
+ imageSrc={staticFile('stuttgart-pin.png')}
+ />
+ </MapOverlay>
+ </MapViewport>
+ );
+};
+
+export default ZurichToStuttgartMap;
diff --git a/packages/example/src/SwitzerlandMap/austria-10m.json b/packages/example/src/SwitzerlandMap/austria-10m.json
new file mode 100644
index 0000000000..75a243ece6
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/austria-10m.json
@@ -0,0 +1,1105 @@
+{
+ "type": "Feature",
+ "properties": {"name": "Austria", "source": "Natural Earth 1:10m"},
+ "geometry": {
+ "type": "Polygon",
+ "coordinates": [
+ [
+ [16.945043, 48.604166],
+ [16.954345, 48.557399],
+ [16.949055, 48.544836],
+ [16.946903, 48.539726],
+ [16.93047, 48.528202],
+ [16.913934, 48.519339],
+ [16.906492, 48.509908],
+ [16.901221, 48.496602],
+ [16.875073, 48.471539],
+ [16.864944, 48.458077],
+ [16.86081, 48.443788],
+ [16.851922, 48.390407],
+ [16.849338, 48.384102],
+ [16.846858, 48.381131],
+ [16.845101, 48.376583],
+ [16.84448, 48.365602],
+ [16.847581, 48.359582],
+ [16.855332, 48.356455],
+ [16.875486, 48.355034],
+ [16.881171, 48.352812],
+ [16.891713, 48.347024],
+ [16.901945, 48.339402],
+ [16.906492, 48.33147],
+ [16.904218, 48.327025],
+ [16.900291, 48.321238],
+ [16.898431, 48.316173],
+ [16.902771, 48.314106],
+ [16.905459, 48.311988],
+ [16.908869, 48.306975],
+ [16.912073, 48.301239],
+ [16.913313, 48.296691],
+ [16.916621, 48.2908],
+ [16.924269, 48.287519],
+ [16.933364, 48.284728],
+ [16.944423, 48.27801],
+ [16.950624, 48.276589],
+ [16.954345, 48.273127],
+ [16.955275, 48.268786],
+ [16.953931, 48.25734],
+ [16.954345, 48.25256],
+ [16.969951, 48.216645],
+ [16.974705, 48.198558],
+ [16.974808, 48.17688],
+ [16.98194, 48.161299],
+ [17.007158, 48.142799],
+ [17.020904, 48.137166],
+ [17.036923, 48.135513],
+ [17.047465, 48.130991],
+ [17.062455, 48.112724],
+ [17.067206, 48.106936],
+ [17.080228, 48.097608],
+ [17.069996, 48.089159],
+ [17.064829, 48.07903],
+ [17.059144, 48.060427],
+ [17.063072, 48.058773],
+ [17.075061, 48.052081],
+ [17.069686, 48.035674],
+ [17.092631, 48.02725],
+ [17.12498, 48.019525],
+ [17.148338, 48.005443],
+ [17.085603, 47.970148],
+ [17.096145, 47.961931],
+ [17.095731, 47.95573],
+ [17.090874, 47.949477],
+ [17.088083, 47.940899],
+ [17.086119, 47.93922],
+ [17.076818, 47.934956],
+ [17.07413, 47.932114],
+ [17.075164, 47.927773],
+ [17.080125, 47.925758],
+ [17.085396, 47.924621],
+ [17.087463, 47.922632],
+ [17.083329, 47.904829],
+ [17.077541, 47.891729],
+ [17.067619, 47.881626],
+ [17.051186, 47.872893],
+ [17.016563, 47.867699],
+ [17.004057, 47.863281],
+ [17.004367, 47.852377],
+ [17.010672, 47.847882],
+ [17.031652, 47.841345],
+ [17.039507, 47.837365],
+ [17.049119, 47.818684],
+ [17.05563, 47.812354],
+ [17.040644, 47.801114],
+ [17.041988, 47.783906],
+ [17.048706, 47.763649],
+ [17.050566, 47.730989],
+ [17.055527, 47.720913],
+ [17.064002, 47.71329],
+ [17.075371, 47.708484],
+ [17.054804, 47.702025],
+ [16.98194, 47.695436],
+ [16.902668, 47.682026],
+ [16.864738, 47.686729],
+ [16.850165, 47.712929],
+ [16.836936, 47.705358],
+ [16.817299, 47.684248],
+ [16.80624, 47.676884],
+ [16.797455, 47.675463],
+ [16.741128, 47.681458],
+ [16.730379, 47.685902],
+ [16.719217, 47.693731],
+ [16.711569, 47.704066],
+ [16.707848, 47.714608],
+ [16.702474, 47.7236],
+ [16.689865, 47.729568],
+ [16.609766, 47.750627],
+ [16.567805, 47.754192],
+ [16.531115, 47.742978],
+ [16.52512, 47.733315],
+ [16.526877, 47.720137],
+ [16.521399, 47.711533],
+ [16.512924, 47.706004],
+ [16.47303, 47.691767],
+ [16.461145, 47.684532],
+ [16.45453, 47.681768],
+ [16.449879, 47.682414],
+ [16.444918, 47.68554],
+ [16.43913, 47.690475],
+ [16.431792, 47.685463],
+ [16.4166, 47.668823],
+ [16.407815, 47.66133],
+ [16.425901, 47.654276],
+ [16.481919, 47.638954],
+ [16.509617, 47.64314],
+ [16.575453, 47.624949],
+ [16.608422, 47.628773],
+ [16.63023, 47.622004],
+ [16.647697, 47.606139],
+ [16.656172, 47.585934],
+ [16.65059, 47.566555],
+ [16.66754, 47.560096],
+ [16.68139, 47.550561],
+ [16.689141, 47.53803],
+ [16.688004, 47.52263],
+ [16.677359, 47.509866],
+ [16.648213, 47.501546],
+ [16.636845, 47.4932],
+ [16.640875, 47.452919],
+ [16.626973, 47.445549],
+ [16.589406, 47.425633],
+ [16.481919, 47.392302],
+ [16.46993, 47.405531],
+ [16.456597, 47.411836],
+ [16.444091, 47.40951],
+ [16.433963, 47.39685],
+ [16.436443, 47.358506],
+ [16.434273, 47.35556],
+ [16.429312, 47.353803],
+ [16.424971, 47.351116],
+ [16.424351, 47.345199],
+ [16.427142, 47.341375],
+ [16.431689, 47.339721],
+ [16.436133, 47.338559],
+ [16.43882, 47.336569],
+ [16.469206, 47.293238],
+ [16.473237, 47.276805],
+ [16.466622, 47.263421],
+ [16.452463, 47.254584],
+ [16.421354, 47.243138],
+ [16.421354, 47.243035],
+ [16.424661, 47.225594],
+ [16.409262, 47.203683],
+ [16.412776, 47.187173],
+ [16.41877, 47.183659],
+ [16.426728, 47.184124],
+ [16.4351, 47.183581],
+ [16.441818, 47.177121],
+ [16.442128, 47.168336],
+ [16.433963, 47.151283],
+ [16.433653, 47.145754],
+ [16.447089, 47.139708],
+ [16.480885, 47.150767],
+ [16.497318, 47.149681],
+ [16.509514, 47.137537],
+ [16.50476, 47.125833],
+ [16.481919, 47.10524],
+ [16.460835, 47.0963],
+ [16.454323, 47.081701],
+ [16.461765, 47.068498],
+ [16.481919, 47.063898],
+ [16.493701, 47.059816],
+ [16.497215, 47.054622],
+ [16.493184, 47.049145],
+ [16.481919, 47.04421],
+ [16.437167, 47.031782],
+ [16.424661, 47.024082],
+ [16.45329, 47.021679],
+ [16.467553, 47.018423],
+ [16.481919, 47.00938],
+ [16.486363, 46.998554],
+ [16.467449, 46.995427],
+ [16.441404, 46.99522],
+ [16.424764, 46.993102],
+ [16.424764, 46.992998],
+ [16.420424, 46.99026],
+ [16.415566, 46.989433],
+ [16.410398, 46.990415],
+ [16.405024, 46.993153],
+ [16.387764, 47.002042],
+ [16.366577, 47.003825],
+ [16.325856, 47.00044],
+ [16.288545, 47.005582],
+ [16.274903, 47.004315],
+ [16.265394, 46.993257],
+ [16.261054, 46.97809],
+ [16.252992, 46.973516],
+ [16.24307, 46.972018],
+ [16.232942, 46.966075],
+ [16.230358, 46.959977],
+ [16.231185, 46.954422],
+ [16.230668, 46.94835],
+ [16.22395, 46.941064],
+ [16.217025, 46.937395],
+ [16.196148, 46.931297],
+ [16.170723, 46.918533],
+ [16.159148, 46.910316],
+ [16.122871, 46.876365],
+ [16.110055, 46.867916],
+ [16.094035, 46.862774],
+ [16.052936, 46.84606],
+ [16.032024, 46.837556],
+ [16.028441, 46.836947],
+ [15.987582, 46.830011],
+ [15.981691, 46.827685],
+ [15.971976, 46.820632],
+ [15.972906, 46.818435],
+ [15.97735, 46.816213],
+ [15.978177, 46.809134],
+ [15.971252, 46.778076],
+ [15.970985, 46.77505],
+ [15.969702, 46.760532],
+ [15.970529, 46.743014],
+ [15.982001, 46.718545],
+ [16.003291, 46.709191],
+ [16.014557, 46.693714],
+ [16.016723, 46.670691],
+ [16.016593, 46.670757],
+ [15.997917, 46.686919],
+ [15.986962, 46.69219],
+ [15.946344, 46.697151],
+ [15.878545, 46.720715],
+ [15.850743, 46.724488],
+ [15.822941, 46.722834],
+ [15.78461, 46.7122],
+ [15.755141, 46.704024],
+ [15.728683, 46.70299],
+ [15.652098, 46.710819],
+ [15.635975, 46.717563],
+ [15.632875, 46.702473],
+ [15.632978, 46.689632],
+ [15.626984, 46.680873],
+ [15.621745, 46.678175],
+ [15.616648, 46.67555],
+ [15.603729, 46.673018],
+ [15.58864, 46.675963],
+ [15.567349, 46.675757],
+ [15.545955, 46.671881],
+ [15.530659, 46.663845],
+ [15.52084, 46.649608],
+ [15.520308, 46.64772],
+ [15.517636, 46.63824],
+ [15.513939, 46.632545],
+ [15.511228, 46.628369],
+ [15.492625, 46.618293],
+ [15.462653, 46.614649],
+ [15.440018, 46.62439],
+ [15.435381, 46.627195],
+ [15.417591, 46.637955],
+ [15.388135, 46.645578],
+ [15.332784, 46.64358],
+ [15.204891, 46.638963],
+ [15.172557, 46.64136],
+ [15.105591, 46.646323],
+ [15.085723, 46.647795],
+ [15.061954, 46.649557],
+ [15.004386, 46.636844],
+ [14.967179, 46.600257],
+ [14.947955, 46.619274],
+ [14.933589, 46.621135],
+ [14.919507, 46.615017],
+ [14.897726, 46.605554],
+ [14.894063, 46.605215],
+ [14.877055, 46.603642],
+ [14.862999, 46.604831],
+ [14.85039, 46.601136],
+ [14.833647, 46.584393],
+ [14.822278, 46.567546],
+ [14.814519, 46.551337],
+ [14.807189, 46.536024],
+ [14.796663, 46.519401],
+ [14.788585, 46.506646],
+ [14.783004, 46.503261],
+ [14.760887, 46.496284],
+ [14.735255, 46.493339],
+ [14.726367, 46.497706],
+ [14.709727, 46.492512],
+ [14.703733, 46.487758],
+ [14.698772, 46.480962],
+ [14.687093, 46.471221],
+ [14.679961, 46.458871],
+ [14.672546, 46.459791],
+ [14.666629, 46.460524],
+ [14.662081, 46.459698],
+ [14.642031, 46.445228],
+ [14.631696, 46.440577],
+ [14.621567, 46.43851],
+ [14.599863, 46.437167],
+ [14.590148, 46.434428],
+ [14.575368, 46.419726],
+ [14.566997, 46.400373],
+ [14.562108, 46.391737],
+ [14.557695, 46.38394],
+ [14.540332, 46.378643],
+ [14.527102, 46.388229],
+ [14.515837, 46.40536],
+ [14.502194, 46.418356],
+ [14.467675, 46.412672],
+ [14.450931, 46.414481],
+ [14.437145, 46.418884],
+ [14.420029, 46.424351],
+ [14.414448, 46.429002],
+ [14.411244, 46.434635],
+ [14.40649, 46.439337],
+ [14.395844, 46.440991],
+ [14.362151, 46.435875],
+ [14.242323, 46.438237],
+ [14.149865, 46.440061],
+ [14.147933, 46.440425],
+ [14.137255, 46.442438],
+ [14.081032, 46.47595],
+ [14.066355, 46.48104],
+ [14.050026, 46.484399],
+ [14.032456, 46.484709],
+ [14.014922, 46.482531],
+ [13.998763, 46.480523],
+ [13.98233, 46.481918],
+ [13.890862, 46.511787],
+ [13.860683, 46.51525],
+ [13.795778, 46.507886],
+ [13.782135, 46.507782],
+ [13.716093, 46.518867],
+ [13.700951, 46.519746],
+ [13.685345, 46.517627],
+ [13.670256, 46.518712],
+ [13.549229, 46.545842],
+ [13.506751, 46.546927],
+ [13.499103, 46.550622],
+ [13.484944, 46.561733],
+ [13.478019, 46.563567],
+ [13.417041, 46.560492],
+ [13.373323, 46.565789],
+ [13.271417, 46.550777],
+ [13.231109, 46.552173],
+ [13.210025, 46.558012],
+ [13.146463, 46.584961],
+ [13.064504, 46.598035],
+ [12.83041, 46.609637],
+ [12.773566, 46.635191],
+ [12.7485, 46.640996],
+ [12.739873, 46.642994],
+ [12.732018, 46.64227],
+ [12.715999, 46.637955],
+ [12.706593, 46.637749],
+ [12.697395, 46.640539],
+ [12.679205, 46.650022],
+ [12.671368, 46.652466],
+ [12.669593, 46.653019],
+ [12.62019, 46.656481],
+ [12.562003, 46.65121],
+ [12.547327, 46.652192],
+ [12.53079, 46.65767],
+ [12.499888, 46.672139],
+ [12.469632, 46.675799],
+ [12.445627, 46.678702],
+ [12.40501, 46.690123],
+ [12.370387, 46.711155],
+ [12.351473, 46.743246],
+ [12.342688, 46.765131],
+ [12.326048, 46.772495],
+ [12.305274, 46.774459],
+ [12.284397, 46.779988],
+ [12.274785, 46.784639],
+ [12.269101, 46.788566],
+ [12.266724, 46.795336],
+ [12.26693, 46.808255],
+ [12.269618, 46.819831],
+ [12.273338, 46.826755],
+ [12.276129, 46.83399],
+ [12.275819, 46.846289],
+ [12.26662, 46.868148],
+ [12.250807, 46.875615],
+ [12.208743, 46.876623],
+ [12.1951, 46.880085],
+ [12.189002, 46.884943],
+ [12.183525, 46.891222],
+ [12.172156, 46.89918],
+ [12.160994, 46.90303],
+ [12.137429, 46.905924],
+ [12.126887, 46.908869],
+ [12.141563, 46.918843],
+ [12.141667, 46.927989],
+ [12.134742, 46.937446],
+ [12.128231, 46.948582],
+ [12.122133, 46.971656],
+ [12.117792, 46.983076],
+ [12.111178, 46.992998],
+ [12.12172, 47.010517],
+ [12.182284, 47.033616],
+ [12.203575, 47.053331],
+ [12.203897, 47.067012],
+ [12.204195, 47.079686],
+ [12.180631, 47.085215],
+ [12.133146, 47.078832],
+ [12.116242, 47.076559],
+ [12.014956, 47.040489],
+ [11.943643, 47.038164],
+ [11.899511, 47.027725],
+ [11.857033, 47.012015],
+ [11.822513, 46.993257],
+ [11.777141, 46.988296],
+ [11.766082, 46.983438],
+ [11.746445, 46.972457],
+ [11.73487, 46.970622],
+ [11.716163, 46.97548],
+ [11.683814, 46.991913],
+ [11.664797, 46.993257],
+ [11.657252, 46.992533],
+ [11.649707, 46.992998],
+ [11.648467, 46.993257],
+ [11.64795, 46.993257],
+ [11.59648, 47.00044],
+ [11.572709, 46.998915],
+ [11.543667, 46.993102],
+ [11.543564, 46.993102],
+ [11.543357, 46.992998],
+ [11.543254, 46.992998],
+ [11.533849, 46.989536],
+ [11.524443, 46.988347],
+ [11.515348, 46.989484],
+ [11.506977, 46.992998],
+ [11.501706, 46.997856],
+ [11.495918, 47.001602],
+ [11.489407, 47.004212],
+ [11.471837, 47.00708],
+ [11.461812, 47.005504],
+ [11.452923, 47.000879],
+ [11.445275, 46.993102],
+ [11.445172, 46.992998],
+ [11.411169, 46.970493],
+ [11.380576, 46.971553],
+ [11.349467, 46.98194],
+ [11.31381, 46.987262],
+ [11.243737, 46.979252],
+ [11.174491, 46.963853],
+ [11.156611, 46.956515],
+ [11.091912, 46.912435],
+ [11.083643, 46.900136],
+ [11.073101, 46.86497],
+ [11.054291, 46.834145],
+ [11.053464, 46.830321],
+ [11.054601, 46.819934],
+ [11.052844, 46.814921],
+ [11.048503, 46.811692],
+ [11.037445, 46.808255],
+ [11.033311, 46.805568],
+ [11.010883, 46.779213],
+ [10.99693, 46.76911],
+ [10.982668, 46.767741],
+ [10.965718, 46.771642],
+ [10.930888, 46.773994],
+ [10.913731, 46.77234],
+ [10.880348, 46.764589],
+ [10.870426, 46.764072],
+ [10.860195, 46.766991],
+ [10.843141, 46.777043],
+ [10.83415, 46.780246],
+ [10.823918, 46.78035],
+ [10.804901, 46.776629],
+ [10.795082, 46.776888],
+ [10.76635, 46.788101],
+ [10.754775, 46.790763],
+ [10.733691, 46.786189],
+ [10.722942, 46.786448],
+ [10.716947, 46.795207],
+ [10.721598, 46.800142],
+ [10.743819, 46.812518],
+ [10.748677, 46.819443],
+ [10.738962, 46.829546],
+ [10.662481, 46.860965],
+ [10.647081, 46.863756],
+ [10.629408, 46.862412],
+ [10.527708, 46.843214],
+ [10.486264, 46.846366],
+ [10.453811, 46.864427],
+ [10.451434, 46.88577],
+ [10.463836, 46.919747],
+ [10.458462, 46.936619],
+ [10.449574, 46.943906],
+ [10.415571, 46.962406],
+ [10.394693, 46.985402],
+ [10.384358, 46.992998],
+ [10.384358, 46.993153],
+ [10.384255, 46.993153],
+ [10.378984, 46.995505],
+ [10.373403, 46.996254],
+ [10.367925, 46.995505],
+ [10.338883, 46.98411],
+ [10.313665, 46.964318],
+ [10.296198, 46.941374],
+ [10.295681, 46.922693],
+ [10.270773, 46.921892],
+ [10.251343, 46.92538],
+ [10.235116, 46.923313],
+ [10.219924, 46.905769],
+ [10.215169, 46.893108],
+ [10.214342, 46.884685],
+ [10.211655, 46.877036],
+ [10.201423, 46.86683],
+ [10.157808, 46.851612],
+ [10.13197, 46.846573],
+ [10.125188, 46.846751],
+ [10.1113, 46.847116],
+ [10.068098, 46.856624],
+ [10.045567, 46.865564],
+ [10.006913, 46.890757],
+ [9.899943, 46.914398],
+ [9.875138, 46.927421],
+ [9.862426, 46.939772],
+ [9.860772, 46.949151],
+ [9.863976, 46.959925],
+ [9.866457, 46.983387],
+ [9.870591, 46.992947],
+ [9.870591, 46.998838],
+ [9.866767, 47.001938],
+ [9.860566, 47.001602],
+ [9.856328, 47.004083],
+ [9.857982, 47.015478],
+ [9.669053, 47.056199],
+ [9.65231, 47.05793],
+ [9.59991, 47.053486],
+ [9.581203, 47.05687],
+ [9.608798, 47.080771],
+ [9.615723, 47.106764],
+ [9.605594, 47.132266],
+ [9.581823, 47.154901],
+ [9.552057, 47.16689],
+ [9.551954, 47.175571],
+ [9.561876, 47.190609],
+ [9.562909, 47.19774],
+ [9.554331, 47.211615],
+ [9.544823, 47.220323],
+ [9.540378, 47.229108],
+ [9.547096, 47.243035],
+ [9.53025, 47.253654],
+ [9.521155, 47.262801],
+ [9.553298, 47.299853],
+ [9.587404, 47.32781],
+ [9.591228, 47.334683],
+ [9.596396, 47.352305],
+ [9.601047, 47.36127],
+ [9.639804, 47.394524],
+ [9.649519, 47.409717],
+ [9.650346, 47.452092],
+ [9.621717, 47.469197],
+ [9.58451, 47.480721],
+ [9.554951, 47.5109],
+ [9.553059, 47.516891],
+ [9.547482, 47.534547],
+ [9.549887, 47.533534],
+ [9.554144, 47.532743],
+ [9.612622, 47.521881],
+ [9.676701, 47.52263],
+ [9.703986, 47.531415],
+ [9.718455, 47.546711],
+ [9.730858, 47.564901],
+ [9.752665, 47.582058],
+ [9.767135, 47.587277],
+ [9.782121, 47.588414],
+ [9.79628, 47.584952],
+ [9.807959, 47.576322],
+ [9.811266, 47.564488],
+ [9.809303, 47.552318],
+ [9.813127, 47.54175],
+ [9.833487, 47.534619],
+ [9.841549, 47.535032],
+ [9.853848, 47.540407],
+ [9.858912, 47.541337],
+ [9.888988, 47.533792],
+ [9.918753, 47.53219],
+ [9.933843, 47.534206],
+ [9.945935, 47.540769],
+ [9.948726, 47.524232],
+ [9.959164, 47.514879],
+ [9.97167, 47.506404],
+ [9.980765, 47.492942],
+ [9.980765, 47.489919],
+ [9.981075, 47.48687],
+ [9.982625, 47.481031],
+ [9.993581, 47.476586],
+ [10.002366, 47.47917],
+ [10.011254, 47.484441],
+ [10.022623, 47.487955],
+ [10.071819, 47.439121],
+ [10.080604, 47.42739],
+ [10.075953, 47.416874],
+ [10.053215, 47.40486],
+ [10.064171, 47.396178],
+ [10.066858, 47.385791],
+ [10.067788, 47.375042],
+ [10.073162, 47.365482],
+ [10.082878, 47.359074],
+ [10.089596, 47.359281],
+ [10.097244, 47.363131],
+ [10.11037, 47.367394],
+ [10.11533, 47.366955],
+ [10.125666, 47.362692],
+ [10.130833, 47.362666],
+ [10.135071, 47.364888],
+ [10.146956, 47.373802],
+ [10.190881, 47.379228],
+ [10.209278, 47.372484],
+ [10.208555, 47.354475],
+ [10.190468, 47.317475],
+ [10.192742, 47.310912],
+ [10.193259, 47.304917],
+ [10.190778, 47.298251],
+ [10.18592, 47.294995],
+ [10.172691, 47.292308],
+ [10.168661, 47.290422],
+ [10.159462, 47.279131],
+ [10.155431, 47.272878],
+ [10.159876, 47.271121],
+ [10.174951, 47.272376],
+ [10.239354, 47.277735],
+ [10.261161, 47.283497],
+ [10.305913, 47.302178],
+ [10.325447, 47.314322],
+ [10.34343, 47.330756],
+ [10.365651, 47.361115],
+ [10.371646, 47.367394],
+ [10.381981, 47.372122],
+ [10.403065, 47.377109],
+ [10.411643, 47.381037],
+ [10.428283, 47.396049],
+ [10.442856, 47.41628],
+ [10.451951, 47.438759],
+ [10.451744, 47.460205],
+ [10.44761, 47.472581],
+ [10.442236, 47.481392],
+ [10.433657, 47.487852],
+ [10.419601, 47.493045],
+ [10.42973, 47.532914],
+ [10.43097, 47.542164],
+ [10.424356, 47.553352],
+ [10.415674, 47.564385],
+ [10.414227, 47.573015],
+ [10.429213, 47.57702],
+ [10.445956, 47.579061],
+ [10.453604, 47.581102],
+ [10.457118, 47.579242],
+ [10.461563, 47.569914],
+ [10.460322, 47.565987],
+ [10.455465, 47.561181],
+ [10.451744, 47.554825],
+ [10.453501, 47.546246],
+ [10.458772, 47.541647],
+ [10.466937, 47.53772],
+ [10.482543, 47.532862],
+ [10.525125, 47.52847],
+ [10.536907, 47.529865],
+ [10.549619, 47.536789],
+ [10.569876, 47.555936],
+ [10.583726, 47.562473],
+ [10.60791, 47.562266],
+ [10.739892, 47.52847],
+ [10.743923, 47.525317],
+ [10.74723, 47.52015],
+ [10.752191, 47.515395],
+ [10.760769, 47.513638],
+ [10.790328, 47.516067],
+ [10.830636, 47.528573],
+ [10.844795, 47.531312],
+ [10.858644, 47.530666],
+ [10.86929, 47.526583],
+ [10.892234, 47.514879],
+ [10.883862, 47.508006],
+ [10.851616, 47.493097],
+ [10.858438, 47.485165],
+ [10.909907, 47.46899],
+ [10.959827, 47.432506],
+ [10.962824, 47.427959],
+ [10.963134, 47.421241],
+ [10.96086, 47.414316],
+ [10.957656, 47.409717],
+ [10.955279, 47.409614],
+ [10.965511, 47.396075],
+ [10.979464, 47.390545],
+ [11.083747, 47.389512],
+ [11.10328, 47.393568],
+ [11.168599, 47.424264],
+ [11.193818, 47.428941],
+ [11.215212, 47.422998],
+ [11.213041, 47.395816],
+ [11.237019, 47.393956],
+ [11.258827, 47.400725],
+ [11.273089, 47.411112],
+ [11.286318, 47.423205],
+ [11.305645, 47.4354],
+ [11.324249, 47.439431],
+ [11.367657, 47.440129],
+ [11.383884, 47.444857],
+ [11.392462, 47.454779],
+ [11.388638, 47.46222],
+ [11.377786, 47.467052],
+ [11.365487, 47.469326],
+ [11.412616, 47.506094],
+ [11.435353, 47.509711],
+ [11.459951, 47.507437],
+ [11.482585, 47.50258],
+ [11.529508, 47.507851],
+ [11.551212, 47.51369],
+ [11.569402, 47.527384],
+ [11.574466, 47.536634],
+ [11.582321, 47.559785],
+ [11.589142, 47.570379],
+ [11.617048, 47.586761],
+ [11.620458, 47.589654],
+ [11.638958, 47.589241],
+ [11.682573, 47.58335],
+ [11.764015, 47.583117],
+ [11.820343, 47.575288],
+ [11.830678, 47.577614],
+ [11.840703, 47.594615],
+ [11.851969, 47.599163],
+ [11.935891, 47.610738],
+ [12.165645, 47.603969],
+ [12.173603, 47.60508],
+ [12.202128, 47.629833],
+ [12.205745, 47.636215],
+ [12.206779, 47.645568],
+ [12.205125, 47.672285],
+ [12.202335, 47.677789],
+ [12.197271, 47.680088],
+ [12.189106, 47.685566],
+ [12.181768, 47.692129],
+ [12.178564, 47.697658],
+ [12.1766, 47.705823],
+ [12.192413, 47.710164],
+ [12.216494, 47.723703],
+ [12.225176, 47.727372],
+ [12.239749, 47.731687],
+ [12.242229, 47.732023],
+ [12.239128, 47.72745],
+ [12.236545, 47.716778],
+ [12.233031, 47.708872],
+ [12.226623, 47.702878],
+ [12.223315, 47.695901],
+ [12.228793, 47.684868],
+ [12.238715, 47.6789],
+ [12.249567, 47.680011],
+ [12.271891, 47.687891],
+ [12.293699, 47.69001],
+ [12.351473, 47.68169],
+ [12.368423, 47.683551],
+ [12.407697, 47.693731],
+ [12.42413, 47.69156],
+ [12.428781, 47.685798],
+ [12.43922, 47.664482],
+ [12.444697, 47.656291],
+ [12.452759, 47.649754],
+ [12.482524, 47.633579],
+ [12.49658, 47.628903],
+ [12.517148, 47.628541],
+ [12.538232, 47.631331],
+ [12.553838, 47.636008],
+ [12.563375, 47.641761],
+ [12.598383, 47.66288],
+ [12.6174, 47.669339],
+ [12.653057, 47.675127],
+ [12.688713, 47.675127],
+ [12.744834, 47.66536],
+ [12.761991, 47.666859],
+ [12.751655, 47.649392],
+ [12.767365, 47.63637],
+ [12.793307, 47.624794],
+ [12.81315, 47.611824],
+ [12.785865, 47.602677],
+ [12.773669, 47.5795],
+ [12.77894, 47.554825],
+ [12.803642, 47.541337],
+ [12.819041, 47.539528],
+ [12.828446, 47.537255],
+ [12.836921, 47.532655],
+ [12.882603, 47.498575],
+ [12.931593, 47.473512],
+ [12.942548, 47.470489],
+ [12.951023, 47.472478],
+ [12.959291, 47.475527],
+ [12.96973, 47.475734],
+ [12.979342, 47.472246],
+ [12.984923, 47.468267],
+ [12.991124, 47.465683],
+ [13.001873, 47.466019],
+ [13.008797, 47.470101],
+ [13.037323, 47.493045],
+ [13.037013, 47.501365],
+ [13.034429, 47.507437],
+ [13.031225, 47.512553],
+ [13.028951, 47.518031],
+ [13.028124, 47.524232],
+ [13.028124, 47.541647],
+ [13.030605, 47.544257],
+ [13.040113, 47.560457],
+ [13.04125, 47.561904],
+ [13.03908, 47.561336],
+ [13.038253, 47.584022],
+ [13.04094, 47.58335],
+ [13.057063, 47.597664],
+ [13.057683, 47.600429],
+ [13.069569, 47.620247],
+ [13.072049, 47.622417],
+ [13.07422, 47.63451],
+ [13.07484, 47.646654],
+ [13.072049, 47.659469],
+ [13.064091, 47.67399],
+ [13.044557, 47.696573],
+ [13.032258, 47.706624],
+ [13.019856, 47.712929],
+ [13.004353, 47.714608],
+ [12.979032, 47.707089],
+ [12.964045, 47.705358],
+ [12.908338, 47.71236],
+ [12.892009, 47.723548],
+ [12.910612, 47.742927],
+ [12.910819, 47.743082],
+ [12.917227, 47.750161],
+ [12.918984, 47.756776],
+ [12.919294, 47.763184],
+ [12.921257, 47.76954],
+ [12.926735, 47.777395],
+ [12.991227, 47.847106],
+ [12.986576, 47.850259],
+ [12.964976, 47.871963],
+ [12.931076, 47.924879],
+ [12.914229, 47.93599],
+ [12.906168, 47.93891],
+ [12.886014, 47.952888],
+ [12.862036, 47.962552],
+ [12.853975, 47.970484],
+ [12.8486, 47.980948],
+ [12.848246, 47.982389],
+ [12.845603, 47.993144],
+ [12.830617, 48.015468],
+ [12.760234, 48.064871],
+ [12.750932, 48.074741],
+ [12.742043, 48.086782],
+ [12.736979, 48.099959],
+ [12.738943, 48.113447],
+ [12.745041, 48.12063],
+ [12.751449, 48.122103],
+ [12.75796, 48.121896],
+ [12.764058, 48.123756],
+ [12.77832, 48.138717],
+ [12.782351, 48.142024],
+ [12.822142, 48.160679],
+ [12.835164, 48.170704],
+ [12.853458, 48.18998],
+ [12.862553, 48.196646],
+ [12.877642, 48.202046],
+ [12.93304, 48.209255],
+ [12.931696, 48.211632],
+ [12.947199, 48.220004],
+ [12.979445, 48.232018],
+ [13.016652, 48.255893],
+ [13.032775, 48.263567],
+ [13.136438, 48.291059],
+ [13.274207, 48.307104],
+ [13.307797, 48.319636],
+ [13.405569, 48.376583],
+ [13.419522, 48.392164],
+ [13.425206, 48.413377],
+ [13.42717, 48.418544],
+ [13.431717, 48.423712],
+ [13.436161, 48.430585],
+ [13.438228, 48.440998],
+ [13.436368, 48.469239],
+ [13.438228, 48.478541],
+ [13.442983, 48.487713],
+ [13.456418, 48.506653],
+ [13.459209, 48.516394],
+ [13.457039, 48.525179],
+ [13.447737, 48.534816],
+ [13.443706, 48.552851],
+ [13.440709, 48.557347],
+ [13.440089, 48.560965],
+ [13.445566, 48.567915],
+ [13.454558, 48.573445],
+ [13.487218, 48.581584],
+ [13.520704, 48.584581],
+ [13.624367, 48.565357],
+ [13.641834, 48.559104],
+ [13.65806, 48.551094],
+ [13.673356, 48.535488],
+ [13.714336, 48.523215],
+ [13.716506, 48.521691],
+ [13.725394, 48.548381],
+ [13.733869, 48.559776],
+ [13.73728, 48.559259],
+ [13.758054, 48.561481],
+ [13.766012, 48.563755],
+ [13.77428, 48.569207],
+ [13.779034, 48.573935],
+ [13.796191, 48.598585],
+ [13.802392, 48.611711],
+ [13.805493, 48.626129],
+ [13.806216, 48.642923],
+ [13.800945, 48.675221],
+ [13.803529, 48.687159],
+ [13.816862, 48.695582],
+ [13.804356, 48.699561],
+ [13.799395, 48.70261],
+ [13.78875, 48.716511],
+ [13.783582, 48.71527],
+ [13.785856, 48.724779],
+ [13.815725, 48.76643],
+ [13.855929, 48.759299],
+ [13.874946, 48.752426],
+ [13.893136, 48.743021],
+ [13.915047, 48.73098],
+ [13.98233, 48.706485],
+ [13.991115, 48.700181],
+ [14.007754, 48.683283],
+ [14.014162, 48.675066],
+ [14.019227, 48.671914],
+ [14.026151, 48.670054],
+ [14.032146, 48.667263],
+ [14.034729, 48.661165],
+ [14.032869, 48.654912],
+ [14.028322, 48.653982],
+ [14.023464, 48.654602],
+ [14.020467, 48.653155],
+ [14.013749, 48.643802],
+ [14.008064, 48.642407],
+ [14.006204, 48.639513],
+ [14.010855, 48.62587],
+ [14.015196, 48.620393],
+ [14.032456, 48.60613],
+ [14.040827, 48.601169],
+ [14.07483, 48.591712],
+ [14.216527, 48.58117],
+ [14.315746, 48.557916],
+ [14.325358, 48.558639],
+ [14.333213, 48.560706],
+ [14.353366, 48.571429],
+ [14.405353, 48.586286],
+ [14.421166, 48.597061],
+ [14.443593, 48.636516],
+ [14.458166, 48.643182],
+ [14.482144, 48.624475],
+ [14.522038, 48.610626],
+ [14.53382, 48.608714],
+ [14.548807, 48.610936],
+ [14.578779, 48.620496],
+ [14.594179, 48.621323],
+ [14.600586, 48.617576],
+ [14.601827, 48.611194],
+ [14.60193, 48.604528],
+ [14.605134, 48.600316],
+ [14.612885, 48.599748],
+ [14.628182, 48.603288],
+ [14.634693, 48.602332],
+ [14.645442, 48.592901],
+ [14.651333, 48.583496],
+ [14.659187, 48.576959],
+ [14.675621, 48.576235],
+ [14.69114, 48.586535],
+ [14.695671, 48.589542],
+ [14.700735, 48.615535],
+ [14.700219, 48.646102],
+ [14.703836, 48.673103],
+ [14.722749, 48.693411],
+ [14.775356, 48.724004],
+ [14.78042, 48.743124],
+ [14.790446, 48.754855],
+ [14.794476, 48.766999],
+ [14.800367, 48.776507],
+ [14.815457, 48.780331],
+ [14.86765, 48.775577],
+ [14.919327, 48.761573],
+ [14.939584, 48.762813],
+ [14.951056, 48.780331],
+ [14.948886, 48.78214],
+ [14.944441, 48.788599],
+ [14.940101, 48.796506],
+ [14.938137, 48.80281],
+ [14.93979, 48.809787],
+ [14.947025, 48.822396],
+ [14.968213, 48.885028],
+ [14.968316, 48.912674],
+ [14.964182, 48.943267],
+ [14.964595, 48.971741],
+ [14.978238, 48.992825],
+ [14.977308, 48.998251],
+ [14.977308, 49.002902],
+ [14.978858, 49.00626],
+ [14.982062, 49.007914],
+ [15.003973, 49.009774],
+ [15.059576, 48.997217],
+ [15.137401, 48.993031],
+ [15.144739, 48.978924],
+ [15.148977, 48.965333],
+ [15.148563, 48.951742],
+ [15.141949, 48.937479],
+ [15.161792, 48.937221],
+ [15.238067, 48.95076],
+ [15.243234, 48.95293],
+ [15.257084, 48.963886],
+ [15.260391, 48.969157],
+ [15.262872, 48.982593],
+ [15.266902, 48.986675],
+ [15.27455, 48.986727],
+ [15.279615, 48.982593],
+ [15.283749, 48.977632],
+ [15.28871, 48.975358],
+ [15.335529, 48.974996],
+ [15.357853, 48.97081],
+ [15.405912, 48.954687],
+ [15.450354, 48.944817],
+ [15.471851, 48.936704],
+ [15.521254, 48.908489],
+ [15.544187, 48.902612],
+ [15.603729, 48.887353],
+ [15.681347, 48.858466],
+ [15.703775, 48.854952],
+ [15.726823, 48.854952],
+ [15.743669, 48.858466],
+ [15.779222, 48.870868],
+ [15.787904, 48.872263],
+ [15.818497, 48.872315],
+ [15.824284, 48.869421],
+ [15.828315, 48.857122],
+ [15.833276, 48.852006],
+ [15.840097, 48.850094],
+ [15.859218, 48.849164],
+ [15.870173, 48.843893],
+ [15.877614, 48.841671],
+ [15.885986, 48.842033],
+ [15.875754, 48.833093],
+ [15.888363, 48.835056],
+ [15.899629, 48.834746],
+ [15.90707, 48.830251],
+ [15.908103, 48.819709],
+ [15.925053, 48.822602],
+ [15.930324, 48.818313],
+ [15.930324, 48.811389],
+ [15.931771, 48.806428],
+ [16.032334, 48.758059],
+ [16.085354, 48.742866],
+ [16.177751, 48.746535],
+ [16.317588, 48.73284],
+ [16.318724, 48.733512],
+ [16.339498, 48.735579],
+ [16.352727, 48.728448],
+ [16.358309, 48.727259],
+ [16.374018, 48.730308],
+ [16.384974, 48.737078],
+ [16.43572, 48.794542],
+ [16.453083, 48.80219],
+ [16.481919, 48.7994],
+ [16.492254, 48.79971],
+ [16.510341, 48.804774],
+ [16.519539, 48.805601],
+ [16.528737, 48.803534],
+ [16.545791, 48.796299],
+ [16.605529, 48.784827],
+ [16.624029, 48.78338],
+ [16.643149, 48.778264],
+ [16.651004, 48.766223],
+ [16.654725, 48.751857],
+ [16.661959, 48.740023],
+ [16.675085, 48.733926],
+ [16.691001, 48.732065],
+ [16.729035, 48.733099],
+ [16.744332, 48.729637],
+ [16.780505, 48.713772],
+ [16.798902, 48.709224],
+ [16.818125, 48.710775],
+ [16.856573, 48.719818],
+ [16.873006, 48.718991],
+ [16.896674, 48.696977],
+ [16.910523, 48.63078],
+ [16.945043, 48.604166]
+ ]
+ ]
+ }
+}
diff --git a/packages/example/src/SwitzerlandMap/switzerland-10m.json b/packages/example/src/SwitzerlandMap/switzerland-10m.json
new file mode 100644
index 0000000000..e4b390c982
--- /dev/null
+++ b/packages/example/src/SwitzerlandMap/switzerland-10m.json
@@ -0,0 +1,760 @@
+{
+ "type": "Feature",
+ "properties": {"name": "Switzerland", "source": "Natural Earth 1:10m"},
+ "geometry": {
+ "type": "Polygon",
+ "coordinates": [
+ [
+ [10.453811, 46.864427],
+ [10.44854, 46.832233],
+ [10.444923, 46.823241],
+ [10.439032, 46.816885],
+ [10.417224, 46.79885],
+ [10.419085, 46.783967],
+ [10.426216, 46.76942],
+ [10.428696, 46.755648],
+ [10.416604, 46.743014],
+ [10.399654, 46.735546],
+ [10.395623, 46.7264],
+ [10.396554, 46.715005],
+ [10.394383, 46.70082],
+ [10.384771, 46.689012],
+ [10.373919, 46.681906],
+ [10.369165, 46.672398],
+ [10.377537, 46.653277],
+ [10.395623, 46.638808],
+ [10.438205, 46.635656],
+ [10.459082, 46.623564],
+ [10.466627, 46.604288],
+ [10.465903, 46.578476],
+ [10.457945, 46.553697],
+ [10.451833, 46.546702],
+ [10.443993, 46.537729],
+ [10.425906, 46.535326],
+ [10.354282, 46.548323],
+ [10.319452, 46.546049],
+ [10.306637, 46.547496],
+ [10.295371, 46.551087],
+ [10.289067, 46.555687],
+ [10.283796, 46.560725],
+ [10.275941, 46.565531],
+ [10.234703, 46.575298],
+ [10.230259, 46.58615],
+ [10.235737, 46.606691],
+ [10.233773, 46.617982],
+ [10.217856, 46.626974],
+ [10.192122, 46.626819],
+ [10.09745, 46.608035],
+ [10.087839, 46.604392],
+ [10.083498, 46.597002],
+ [10.071199, 46.564394],
+ [10.062931, 46.556746],
+ [10.04133, 46.541863],
+ [10.032752, 46.532975],
+ [10.031408, 46.525792],
+ [10.031201, 46.503829],
+ [10.02686, 46.493184],
+ [10.028101, 46.483934],
+ [10.030478, 46.476673],
+ [10.035335, 46.471066],
+ [10.044017, 46.466984],
+ [10.026344, 46.446262],
+ [10.042053, 46.432722],
+ [10.071405, 46.424816],
+ [10.116157, 46.418822],
+ [10.133417, 46.414016],
+ [10.140755, 46.402905],
+ [10.13321, 46.381098],
+ [10.125976, 46.37438],
+ [10.104995, 46.361357],
+ [10.09745, 46.351642],
+ [10.092386, 46.338103],
+ [10.091766, 46.328956],
+ [10.095797, 46.320533],
+ [10.104892, 46.309371],
+ [10.14613, 46.280277],
+ [10.158945, 46.262449],
+ [10.14582, 46.243328],
+ [10.117914, 46.231133],
+ [10.075746, 46.220022],
+ [10.042673, 46.220487],
+ [10.041847, 46.24307],
+ [10.031718, 46.260072],
+ [9.992237, 46.284359],
+ [9.977561, 46.298105],
+ [9.97105, 46.320016],
+ [9.970636, 46.339808],
+ [9.964022, 46.356086],
+ [9.93901, 46.367455],
+ [9.918443, 46.37115],
+ [9.899013, 46.372158],
+ [9.855398, 46.366964],
+ [9.788839, 46.343296],
+ [9.768065, 46.33862],
+ [9.755249, 46.340532],
+ [9.730858, 46.350712],
+ [9.720109, 46.350893],
+ [9.709257, 46.342392],
+ [9.707293, 46.330972],
+ [9.708844, 46.319629],
+ [9.70843, 46.311748],
+ [9.693134, 46.297072],
+ [9.674324, 46.291801],
+ [9.559705, 46.292731],
+ [9.536451, 46.298622],
+ [9.515264, 46.308596],
+ [9.502551, 46.32074],
+ [9.482604, 46.35681],
+ [9.473716, 46.361874],
+ [9.451598, 46.370375],
+ [9.444364, 46.375284],
+ [9.4424, 46.380891],
+ [9.443847, 46.396136],
+ [9.437852, 46.492047],
+ [9.434648, 46.498326],
+ [9.426794, 46.497111],
+ [9.410671, 46.488895],
+ [9.403849, 46.482513],
+ [9.400335, 46.475407],
+ [9.395478, 46.469413],
+ [9.384626, 46.466416],
+ [9.377081, 46.468689],
+ [9.351553, 46.485484],
+ [9.350829, 46.497861],
+ [9.330986, 46.501504],
+ [9.282306, 46.49737],
+ [9.263186, 46.485122],
+ [9.245823, 46.461041],
+ [9.237968, 46.436547],
+ [9.24758, 46.423033],
+ [9.260912, 46.416651],
+ [9.262876, 46.406626],
+ [9.260292, 46.394017],
+ [9.260396, 46.379728],
+ [9.273831, 46.344252],
+ [9.275175, 46.331385],
+ [9.268974, 46.309371],
+ [9.239725, 46.266996],
+ [9.224842, 46.231184],
+ [9.215747, 46.221056],
+ [9.204172, 46.213563],
+ [9.192183, 46.209635],
+ [9.181331, 46.204054],
+ [9.17575, 46.194132],
+ [9.171099, 46.182609],
+ [9.163788, 46.172989],
+ [9.163244, 46.172273],
+ [9.090587, 46.138167],
+ [9.072087, 46.118892],
+ [9.068159, 46.105972],
+ [9.07033, 46.083441],
+ [9.067126, 46.071142],
+ [9.059168, 46.061789],
+ [9.049659, 46.057913],
+ [9.027748, 46.053107],
+ [9.002117, 46.03931],
+ [8.997776, 46.027941],
+ [9.015553, 45.993111],
+ [8.982686, 45.971975],
+ [8.980516, 45.969495],
+ [8.979793, 45.966911],
+ [8.980516, 45.964379],
+ [8.982686, 45.961847],
+ [8.993435, 45.95425],
+ [9.001703, 45.93606],
+ [9.010798, 45.926655],
+ [9.020514, 45.922779],
+ [9.042321, 45.919731],
+ [9.051726, 45.915545],
+ [9.063095, 45.898957],
+ [9.059271, 45.881955],
+ [9.034363, 45.848107],
+ [9.002427, 45.820718],
+ [8.972351, 45.824646],
+ [8.939588, 45.834826],
+ [8.900004, 45.826403],
+ [8.903725, 45.841802],
+ [8.909719, 45.853688],
+ [8.91375, 45.86609],
+ [8.912096, 45.883402],
+ [8.906515, 45.896476],
+ [8.898144, 45.90955],
+ [8.88078, 45.931099],
+ [8.870962, 45.947067],
+ [8.864451, 45.953424],
+ [8.857733, 45.957093],
+ [8.800372, 45.978538],
+ [8.785076, 45.982311],
+ [8.767919, 45.983086],
+ [8.769573, 45.985773],
+ [8.773397, 45.990579],
+ [8.790967, 46.018691],
+ [8.819596, 46.042927],
+ [8.834375, 46.066388],
+ [8.80895, 46.089746],
+ [8.793861, 46.093415],
+ [8.763165, 46.092898],
+ [8.747145, 46.094449],
+ [8.739497, 46.098066],
+ [8.732159, 46.107419],
+ [8.728983, 46.108233],
+ [8.723891, 46.109538],
+ [8.71769, 46.107523],
+ [8.702187, 46.097963],
+ [8.695055, 46.095172],
+ [8.677485, 46.095792],
+ [8.630873, 46.114706],
+ [8.611546, 46.119357],
+ [8.601831, 46.122819],
+ [8.538682, 46.187621],
+ [8.51026, 46.207878],
+ [8.482665, 46.217542],
+ [8.456517, 46.224828],
+ [8.43812, 46.23537],
+ [8.427165, 46.251442],
+ [8.423237, 46.275833],
+ [8.426648, 46.301568],
+ [8.442874, 46.353373],
+ [8.446285, 46.382183],
+ [8.445768, 46.412362],
+ [8.441634, 46.434945],
+ [8.427888, 46.44869],
+ [8.399156, 46.452179],
+ [8.385907, 46.450206],
+ [8.343449, 46.443885],
+ [8.316267, 46.433653],
+ [8.294976, 46.418046],
+ [8.286605, 46.40536],
+ [8.290429, 46.401122],
+ [8.297043, 46.397634],
+ [8.297457, 46.387506],
+ [8.291462, 46.378359],
+ [8.281541, 46.370116],
+ [8.270068, 46.364044],
+ [8.24175, 46.354123],
+ [8.192554, 46.309164],
+ [8.171883, 46.299191],
+ [8.128475, 46.292473],
+ [8.106874, 46.285548],
+ [8.087341, 46.271802],
+ [8.077315, 46.262035],
+ [8.073078, 46.253612],
+ [8.076592, 46.249736],
+ [8.09995, 46.235629],
+ [8.129509, 46.196044],
+ [8.132299, 46.159354],
+ [8.110595, 46.126953],
+ [8.066877, 46.100598],
+ [8.056025, 46.098066],
+ [8.035354, 46.096516],
+ [8.025329, 46.091141],
+ [8.018197, 46.080858],
+ [8.016027, 46.069385],
+ [8.015924, 46.058172],
+ [8.010653, 46.029698],
+ [8.008792, 46.027683],
+ [7.999077, 46.0128],
+ [7.998354, 46.010629],
+ [7.985848, 45.999312],
+ [7.978717, 45.995178],
+ [7.969105, 45.993111],
+ [7.898205, 45.981949],
+ [7.883782, 45.973869],
+ [7.872917, 45.959383],
+ [7.870201, 45.94037],
+ [7.84962, 45.939712],
+ [7.848389, 45.938076],
+ [7.845288, 45.927792],
+ [7.846115, 45.922573],
+ [7.843738, 45.919214],
+ [7.831232, 45.91446],
+ [7.825444, 45.914666],
+ [7.807564, 45.91849],
+ [7.780072, 45.918129],
+ [7.732013, 45.930376],
+ [7.722195, 45.929601],
+ [7.71465, 45.92712],
+ [7.706279, 45.925725],
+ [7.69398, 45.928671],
+ [7.692533, 45.931203],
+ [7.673722, 45.950323],
+ [7.658736, 45.960038],
+ [7.643027, 45.966343],
+ [7.541121, 45.984119],
+ [7.524377, 45.978073],
+ [7.514662, 45.966704],
+ [7.503707, 45.956731],
+ [7.482726, 45.954871],
+ [7.452961, 45.945879],
+ [7.393843, 45.9157],
+ [7.361803, 45.907845],
+ [7.286666, 45.913426],
+ [7.27354, 45.910274],
+ [7.245428, 45.89813],
+ [7.183726, 45.880456],
+ [7.153547, 45.876529],
+ [7.120888, 45.876116],
+ [7.090192, 45.880508],
+ [7.066938, 45.890223],
+ [7.022083, 45.92526],
+ [7.015158, 45.933321],
+ [7.009784, 45.943398],
+ [7.002756, 45.961692],
+ [6.991283, 45.982466],
+ [6.987666, 45.993111],
+ [6.982808, 45.995385],
+ [6.915112, 46.048612],
+ [6.892375, 46.055588],
+ [6.884003, 46.053211],
+ [6.876872, 46.048095],
+ [6.869224, 46.044064],
+ [6.859715, 46.044994],
+ [6.85093, 46.049645],
+ [6.85031, 46.052746],
+ [6.852377, 46.056931],
+ [6.851964, 46.064683],
+ [6.853411, 46.065665],
+ [6.853101, 46.076103],
+ [6.851344, 46.086025],
+ [6.848553, 46.085043],
+ [6.853101, 46.090211],
+ [6.861162, 46.097032],
+ [6.86819, 46.10468],
+ [6.869224, 46.112329],
+ [6.853927, 46.122612],
+ [6.774346, 46.134808],
+ [6.765664, 46.151603],
+ [6.774863, 46.185864],
+ [6.792226, 46.221676],
+ [6.827676, 46.269477],
+ [6.804938, 46.296607],
+ [6.769488, 46.322678],
+ [6.750368, 46.345518],
+ [6.755742, 46.357068],
+ [6.782097, 46.378462],
+ [6.789229, 46.395205],
+ [6.788107, 46.405008],
+ [6.787058, 46.414171],
+ [6.777716, 46.424106],
+ [6.762667, 46.42926],
+ [6.613684, 46.455899],
+ [6.547021, 46.457372],
+ [6.482942, 46.448587],
+ [6.397676, 46.408176],
+ [6.365223, 46.40244],
+ [6.332357, 46.401381],
+ [6.301558, 46.394482],
+ [6.269105, 46.375026],
+ [6.24058, 46.348955],
+ [6.219496, 46.329111],
+ [6.214122, 46.315469],
+ [6.218256, 46.305495],
+ [6.227454, 46.288494],
+ [6.227971, 46.284463],
+ [6.237583, 46.267926],
+ [6.24182, 46.263689],
+ [6.252259, 46.259916],
+ [6.269002, 46.265239],
+ [6.27603, 46.26312],
+ [6.281198, 46.240073],
+ [6.255359, 46.221107],
+ [6.191384, 46.191704],
+ [6.140328, 46.150207],
+ [6.107875, 46.138632],
+ [6.073872, 46.149174],
+ [6.028293, 46.147934],
+ [5.982921, 46.140441],
+ [5.95884, 46.130467],
+ [5.972172, 46.152171],
+ [5.979821, 46.162248],
+ [5.982921, 46.170826],
+ [5.965248, 46.186226],
+ [5.954809, 46.19992],
+ [5.95853, 46.211961],
+ [5.982921, 46.222709],
+ [6.042866, 46.24307],
+ [6.044519, 46.243432],
+ [6.046173, 46.243535],
+ [6.048033, 46.243432],
+ [6.055888, 46.241675],
+ [6.061883, 46.241158],
+ [6.067671, 46.241623],
+ [6.089685, 46.246377],
+ [6.094026, 46.253044],
+ [6.093095, 46.262294],
+ [6.093612, 46.273094],
+ [6.100743, 46.301413],
+ [6.104051, 46.309216],
+ [6.118607, 46.331771],
+ [6.1364, 46.359342],
+ [6.135057, 46.370401],
+ [6.122861, 46.385542],
+ [6.108185, 46.396497],
+ [6.059019, 46.417383],
+ [6.054235, 46.419416],
+ [6.065707, 46.427012],
+ [6.067567, 46.433601],
+ [6.0655, 46.440371],
+ [6.0655, 46.447993],
+ [6.064777, 46.451068],
+ [6.0624, 46.455202],
+ [6.060229, 46.459904],
+ [6.060229, 46.46502],
+ [6.064157, 46.471118],
+ [6.075525, 46.479593],
+ [6.110355, 46.520831],
+ [6.145702, 46.55163],
+ [6.121517, 46.570285],
+ [6.118417, 46.583463],
+ [6.131853, 46.595607],
+ [6.266315, 46.680356],
+ [6.337938, 46.707409],
+ [6.34786, 46.71317],
+ [6.374215, 46.733609],
+ [6.407391, 46.745701],
+ [6.417933, 46.751101],
+ [6.429199, 46.760816],
+ [6.433023, 46.76911],
+ [6.432609, 46.785983],
+ [6.425168, 46.791615],
+ [6.419897, 46.796525],
+ [6.417107, 46.802157],
+ [6.418554, 46.807015],
+ [6.434263, 46.839545],
+ [6.441188, 46.848149],
+ [6.443118, 46.851455],
+ [6.446769, 46.857709],
+ [6.448422, 46.871559],
+ [6.445219, 46.882617],
+ [6.431886, 46.900032],
+ [6.427752, 46.909076],
+ [6.442635, 46.944164],
+ [6.491107, 46.963388],
+ [6.598698, 46.986539],
+ [6.665412, 47.021291],
+ [6.688253, 47.043848],
+ [6.676264, 47.0624],
+ [6.6897, 47.07829],
+ [6.699105, 47.084621],
+ [6.72422, 47.09077],
+ [6.72794, 47.097126],
+ [6.731661, 47.098883],
+ [6.746027, 47.103948],
+ [6.744787, 47.121053],
+ [6.774759, 47.128184],
+ [6.838076, 47.168132],
+ [6.840285, 47.169525],
+ [6.859302, 47.190919],
+ [6.888344, 47.211305],
+ [6.956247, 47.245231],
+ [6.952216, 47.270036],
+ [6.958624, 47.290551],
+ [6.977434, 47.303729],
+ [6.986529, 47.304504],
+ [6.991904, 47.305951],
+ [7.006476, 47.319361],
+ [7.016915, 47.323521],
+ [7.027147, 47.325433],
+ [7.036552, 47.329515],
+ [7.044303, 47.340497],
+ [7.033865, 47.350651],
+ [7.018879, 47.359901],
+ [7.003996, 47.368143],
+ [6.985599, 47.362123],
+ [6.86664, 47.354165],
+ [6.871601, 47.366955],
+ [6.884003, 47.382587],
+ [6.898783, 47.395713],
+ [6.924517, 47.405996],
+ [6.926068, 47.424858],
+ [6.952319, 47.428837],
+ [6.968546, 47.435194],
+ [6.983429, 47.443798],
+ [6.990973, 47.452221],
+ [6.986116, 47.464132],
+ [6.97578, 47.477956],
+ [6.9733, 47.489092],
+ [6.991904, 47.492942],
+ [7.000792, 47.49767],
+ [7.009784, 47.499247],
+ [7.018879, 47.49767],
+ [7.027974, 47.492942],
+ [7.053915, 47.490384],
+ [7.103731, 47.496275],
+ [7.127296, 47.492942],
+ [7.140318, 47.487852],
+ [7.142169, 47.487651],
+ [7.153651, 47.486405],
+ [7.180833, 47.488265],
+ [7.162642, 47.459895],
+ [7.168327, 47.443565],
+ [7.190031, 47.434728],
+ [7.219383, 47.428476],
+ [7.223517, 47.426228],
+ [7.226308, 47.422636],
+ [7.230339, 47.419019],
+ [7.23809, 47.416797],
+ [7.244808, 47.417727],
+ [7.282635, 47.428889],
+ [7.309093, 47.432661],
+ [7.33693, 47.431854],
+ [7.378547, 47.430646],
+ [7.388219, 47.433289],
+ [7.406349, 47.438242],
+ [7.420563, 47.450857],
+ [7.426089, 47.455761],
+ [7.429293, 47.465114],
+ [7.427639, 47.470747],
+ [7.422782, 47.475424],
+ [7.419474, 47.477852],
+ [7.41441, 47.484028],
+ [7.414307, 47.490177],
+ [7.425986, 47.492503],
+ [7.441488, 47.488834],
+ [7.445996, 47.486884],
+ [7.454511, 47.483201],
+ [7.46743, 47.481909],
+ [7.482726, 47.491263],
+ [7.484483, 47.492942],
+ [7.485827, 47.495784],
+ [7.48593, 47.498394],
+ [7.485776, 47.498768],
+ [7.484897, 47.5009],
+ [7.477765, 47.507696],
+ [7.475595, 47.511726],
+ [7.476939, 47.514879],
+ [7.482726, 47.516997],
+ [7.493062, 47.515499],
+ [7.501123, 47.517307],
+ [7.505464, 47.523018],
+ [7.505154, 47.533017],
+ [7.501743, 47.532965],
+ [7.485103, 47.541595],
+ [7.482726, 47.542267],
+ [7.520867, 47.563416],
+ [7.526341, 47.566452],
+ [7.550319, 47.575495],
+ [7.585483, 47.584479],
+ [7.586028, 47.584619],
+ [7.637032, 47.594977],
+ [7.659666, 47.596579],
+ [7.646541, 47.571542],
+ [7.635895, 47.564591],
+ [7.612337, 47.564731],
+ [7.609747, 47.564746],
+ [7.646901, 47.551445],
+ [7.661423, 47.546246],
+ [7.683438, 47.544257],
+ [7.72732, 47.550423],
+ [7.76674, 47.555961],
+ [7.78555, 47.563196],
+ [7.801467, 47.576089],
+ [7.819657, 47.595339],
+ [7.833713, 47.590481],
+ [7.898205, 47.587846],
+ [7.904303, 47.583557],
+ [7.907507, 47.574177],
+ [7.90947, 47.564798],
+ [7.912157, 47.560561],
+ [8.042279, 47.560561],
+ [8.087237, 47.567382],
+ [8.096952, 47.571852],
+ [8.101397, 47.576193],
+ [8.105427, 47.581257],
+ [8.113902, 47.587846],
+ [8.122067, 47.592135],
+ [8.143771, 47.600067],
+ [8.162065, 47.603762],
+ [8.168886, 47.608646],
+ [8.173847, 47.613529],
+ [8.179015, 47.615803],
+ [8.232965, 47.621952],
+ [8.251051, 47.622004],
+ [8.276993, 47.61663],
+ [8.288569, 47.615803],
+ [8.293943, 47.611462],
+ [8.299317, 47.601824],
+ [8.306345, 47.592187],
+ [8.316164, 47.587846],
+ [8.354094, 47.581024],
+ [8.41807, 47.580766],
+ [8.4211, 47.581112],
+ [8.448869, 47.58428],
+ [8.450109, 47.589034],
+ [8.461788, 47.606139],
+ [8.49238, 47.619833],
+ [8.522353, 47.621901],
+ [8.537752, 47.612134],
+ [8.549638, 47.598594],
+ [8.551719, 47.596863],
+ [8.560697, 47.589396],
+ [8.574133, 47.592445],
+ [8.576305, 47.595023],
+ [8.580644, 47.600171],
+ [8.581781, 47.607664],
+ [8.581264, 47.614769],
+ [8.582504, 47.62159],
+ [8.582091, 47.625027],
+ [8.579714, 47.628929],
+ [8.57806, 47.633476],
+ [8.580334, 47.639005],
+ [8.583951, 47.641124],
+ [8.589222, 47.642468],
+ [8.593563, 47.642571],
+ [8.594493, 47.640969],
+ [8.595113, 47.63482],
+ [8.601624, 47.632598],
+ [8.607309, 47.656291],
+ [8.598214, 47.656885],
+ [8.593589, 47.658169],
+ [8.582194, 47.66133],
+ [8.568241, 47.662932],
+ [8.519666, 47.657351],
+ [8.504679, 47.65226],
+ [8.49083, 47.645568],
+ [8.476051, 47.640401],
+ [8.458274, 47.639884],
+ [8.437603, 47.647842],
+ [8.411972, 47.661045],
+ [8.407011, 47.661562],
+ [8.391301, 47.665464],
+ [8.397709, 47.67629],
+ [8.395229, 47.684817],
+ [8.390991, 47.692129],
+ [8.392128, 47.699519],
+ [8.401947, 47.707089],
+ [8.427268, 47.716468],
+ [8.437913, 47.723186],
+ [8.445458, 47.743185],
+ [8.450109, 47.750471],
+ [8.463648, 47.763907],
+ [8.471503, 47.76706],
+ [8.482665, 47.766853],
+ [8.536512, 47.774088],
+ [8.551602, 47.779255],
+ [8.5423, 47.795017],
+ [8.558216, 47.801166],
+ [8.583124, 47.800236],
+ [8.601624, 47.794603],
+ [8.603175, 47.787317],
+ [8.604105, 47.774398],
+ [8.607619, 47.762254],
+ [8.617437, 47.757319],
+ [8.62984, 47.762796],
+ [8.635007, 47.784604],
+ [8.644102, 47.791012],
+ [8.657022, 47.788118],
+ [8.666633, 47.778273],
+ [8.674488, 47.766698],
+ [8.68193, 47.75874],
+ [8.692265, 47.757164],
+ [8.703324, 47.758714],
+ [8.713142, 47.757422],
+ [8.719757, 47.747319],
+ [8.71707, 47.743547],
+ [8.703737, 47.730033],
+ [8.70043, 47.723496],
+ [8.704667, 47.715332],
+ [8.712625, 47.708691],
+ [8.715106, 47.701069],
+ [8.71707, 47.694558],
+ [8.769883, 47.695074],
+ [8.761718, 47.70125],
+ [8.77071, 47.720861],
+ [8.797581, 47.720034],
+ [8.830241, 47.707192],
+ [8.856079, 47.690682],
+ [8.837682, 47.687788],
+ [8.837786, 47.680838],
+ [8.851935, 47.671282],
+ [8.852668, 47.670786],
+ [8.881711, 47.656136],
+ [8.906205, 47.651795],
+ [8.945376, 47.654302],
+ [8.981756, 47.662156],
+ [8.997673, 47.673835],
+ [9.016586, 47.6789],
+ [9.128104, 47.670425],
+ [9.183398, 47.670425],
+ [9.196937, 47.656136],
+ [9.234351, 47.656162],
+ [9.273211, 47.65009],
+ [9.547482, 47.534547],
+ [9.553059, 47.516891],
+ [9.554951, 47.5109],
+ [9.58451, 47.480721],
+ [9.621717, 47.469197],
+ [9.650346, 47.452092],
+ [9.649519, 47.409717],
+ [9.639804, 47.394524],
+ [9.601047, 47.36127],
+ [9.596396, 47.352305],
+ [9.591228, 47.334683],
+ [9.587404, 47.32781],
+ [9.553298, 47.299853],
+ [9.521155, 47.262801],
+ [9.504618, 47.243732],
+ [9.487358, 47.210014],
+ [9.484981, 47.176346],
+ [9.492629, 47.15981],
+ [9.503481, 47.145392],
+ [9.511853, 47.129372],
+ [9.51237, 47.10803],
+ [9.502861, 47.094698],
+ [9.487565, 47.083949],
+ [9.475886, 47.073226],
+ [9.477023, 47.063898],
+ [9.499554, 47.059351],
+ [9.560636, 47.0524],
+ [9.581203, 47.05687],
+ [9.59991, 47.053486],
+ [9.65231, 47.05793],
+ [9.669053, 47.056199],
+ [9.857982, 47.015478],
+ [9.856328, 47.004083],
+ [9.860566, 47.001602],
+ [9.866767, 47.001938],
+ [9.870591, 46.998838],
+ [9.870591, 46.992947],
+ [9.866457, 46.983387],
+ [9.863976, 46.959925],
+ [9.860772, 46.949151],
+ [9.862426, 46.939772],
+ [9.875138, 46.927421],
+ [9.899943, 46.914398],
+ [10.006913, 46.890757],
+ [10.045567, 46.865564],
+ [10.068098, 46.856624],
+ [10.1113, 46.847116],
+ [10.125188, 46.846751],
+ [10.13197, 46.846573],
+ [10.157808, 46.851612],
+ [10.201423, 46.86683],
+ [10.211655, 46.877036],
+ [10.214342, 46.884685],
+ [10.215169, 46.893108],
+ [10.219924, 46.905769],
+ [10.235116, 46.923313],
+ [10.251343, 46.92538],
+ [10.270773, 46.921892],
+ [10.295681, 46.922693],
+ [10.296198, 46.941374],
+ [10.313665, 46.964318],
+ [10.338883, 46.98411],
+ [10.367925, 46.995505],
+ [10.373403, 46.996254],
+ [10.378984, 46.995505],
+ [10.384255, 46.993153],
+ [10.384358, 46.993153],
+ [10.384358, 46.992998],
+ [10.394693, 46.985402],
+ [10.415571, 46.962406],
+ [10.449574, 46.943906],
+ [10.458462, 46.936619],
+ [10.463836, 46.919747],
+ [10.451434, 46.88577],
+ [10.453811, 46.864427]
+ ]
+ ]
+ }
+}
diff --git a/packages/example/tsconfig.json b/packages/example/tsconfig.json
index f39db93212..ff0f87e8f6 100644
--- a/packages/example/tsconfig.json
+++ b/packages/example/tsconfig.json
@@ -10,7 +10,7 @@
"lib/*": ["./src/lib/*"]
}
},
- "include": ["src"],
+ "include": ["src", "src/**/*.json"],
"references": [
{"path": "../animated-emoji"},
{"path": "../animation-utils"},