From 8b35e5638870a891bc1a170b2cf4b4a0d61751e5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 14 Nov 2019 14:09:33 +0800 Subject: [PATCH] chore: remove .cache --- .cache/.eslintrc.json | 9 - .cache/__tests__/.babelrc | 5 - .../__snapshots__/dev-loader.js.snap | 16 - .cache/__tests__/__snapshots__/loader.js.snap | 16 - .../__snapshots__/static-entry.js.snap | 13 - .cache/__tests__/dev-loader.js | 539 ----------------- .cache/__tests__/error-overlay-handler.js | 59 -- .cache/__tests__/find-path.js | 109 ---- .cache/__tests__/loader.js | 554 ------------------ .cache/__tests__/minimal-config.js | 32 - .cache/__tests__/static-entry.js | 330 ----------- .cache/__tests__/strip-prefix.js | 23 - .cache/api-runner-browser-plugins.js | 31 - .cache/api-runner-browser.js | 61 -- .cache/api-runner-ssr.js | 64 -- .cache/api-ssr-docs.js | 198 ------- .cache/app.js | 72 --- .cache/async-requires.js | 13 - .cache/babelState.json | 104 ---- ...tore-037c6ee2be3b28d965e21fc24fcf1438.json | 1 - ...tore-03f70e3c5a52291e52b331e3d35900a4.json | 1 - ...tore-09120d5540cbb8e1600096c4548475d6.json | 1 - ...tore-15c9fa5529ebd49664861c7bcf4e6952.json | 1 - ...tore-1a79a63948be948cfacc80e4c062b2ef.json | 1 - ...tore-1cf585fc8b2c0583fd712c2c11334ba7.json | 1 - ...tore-1def650c6cf8cb89db3185cbc97d09a0.json | 1 - ...tore-20649dc8fd4cdde49b1d9ea0c26371b2.json | 1 - ...tore-29dceee5020ad0891c27d8c2482f1e64.json | 1 - ...tore-2b8cd1df4f8a6941bff4108301b5d6a9.json | 1 - ...tore-2c713f7ba9a30ac45cbadf6d86d5d544.json | 1 - ...tore-30112668ec3b030a16ab70ed8557e968.json | 1 - ...tore-308215140d91d466921fde8b44e96c70.json | 1 - ...tore-335fc52df6558698584a4c58a93133dc.json | 1 - ...tore-34caa57442541fb555e65adf766c9dbf.json | 1 - ...tore-36c2072d077e6736d848e30c50da70bf.json | 1 - ...tore-3a971685629ac28e3d3c254ed1dc5e01.json | 1 - ...tore-430013523eff20613409653bf327e76f.json | 1 - ...tore-43009befa680af739fe61512801ffb17.json | 1 - ...tore-44654e1e137b1544f03ff6c9e63af3a5.json | 1 - ...tore-468b5bae8ef758f28811323986a026ca.json | 1 - ...tore-470d4aa805d5ae7d807cc6a4bb73260c.json | 1 - ...tore-479f7412bfaf2ad395f176418584631a.json | 1 - ...tore-49025698b564146544fecd0e3e64cd6a.json | 1 - ...tore-4959c881d2fccc57dea5cba657223041.json | 1 - ...tore-5197dec8e7e8b24628292c6110a3585b.json | 1 - ...tore-51d0f3b693c1d063f395570395293fb4.json | 1 - ...tore-57199a69f7efd5decc9f72929e6eaab6.json | 1 - ...tore-57508cdf95ebc59c4397e496ddb41c25.json | 1 - ...tore-57b56149d19b6dd403afccc6bfe3ffd1.json | 1 - ...tore-5834efc3cd0e551cbfd90070db9090f7.json | 1 - ...tore-5a894e6dcf41aaf38dcfe7c4ef24bb6c.json | 1 - ...tore-5aa0c32748bae2a74e08828fed4fd3a6.json | 1 - ...tore-5ce457da6f1384d2d0a1c8d65aa7035f.json | 1 - ...tore-60ffaa0253ce67428f5a7e31a4a0bad1.json | 1 - ...tore-6195db1b342fb1235a247e18694e1cc8.json | 1 - ...tore-644c992860d9a891d9d0379b27be8e52.json | 1 - ...tore-6848789e646bc12b2cbd26760f339042.json | 1 - ...tore-6c1e06477b53b3292a756f3111199015.json | 1 - ...tore-6ff3d86f3d5091056b6de32ba0d5591f.json | 1 - ...tore-733d7c702370459f84adbd328b1651a5.json | 1 - ...tore-739c1d36b4188326eb8d46ad4ca8fe6f.json | 1 - ...tore-75ccc6c53e13e0d176bf3912a21c1610.json | 1 - ...tore-8152d0a6832522eb79f34eecc5e89cd4.json | 1 - ...tore-819c3c410e8fbb86079e9344ce585ef4.json | 1 - ...tore-8a657829abac5ed5e9e205e519d6ded0.json | 1 - ...tore-8bc37c0342e221c46eeda81530413ddf.json | 1 - ...tore-8d812b6ac59a2818ead6b55b21d7a07d.json | 1 - ...tore-91591c14f7e50cf42c72e59db3f5143b.json | 1 - ...tore-9429c44d730cc08b4b28804d3d7d5a2c.json | 1 - ...tore-994b78daf72919990af1bf2269cd4372.json | 1 - ...tore-9d35c059fe2ed0d16646249d187e25ed.json | 1 - ...tore-9fdf0b53e01f30bc74c780152532eac3.json | 1 - ...tore-a4bbf303ee2db11d74c46460cc08a6d5.json | 1 - ...tore-a58f599cdea215bb9e3b4f7ab5a7470e.json | 1 - ...tore-a7725b15bd64a40f9d4d5eb35340b314.json | 1 - ...tore-a846c729526a0e04a6fb8586c2f82dbe.json | 1 - ...tore-ab3c328a2b98edcd782e2b4ea47d83c8.json | 1 - ...tore-b0407a444ef8acb3f4819a2fd00c5ae3.json | 1 - ...tore-b089023713dde4294665d832c48ccd63.json | 1 - ...tore-b196fbb424293a9c110515c8e22586c7.json | 1 - ...tore-b7df9406be8c4ec4d4cc6d6850b2bee1.json | 1 - ...tore-b923ecb39dc7dd6f4752bf9bbf5c94da.json | 1 - ...tore-badc2f24570b1f6d64603b86360ac53c.json | 1 - ...tore-bed602677090371493b02b2541d3b187.json | 1 - ...tore-bee012580db1a2e5f57e03421caf971f.json | 1 - ...tore-c0aa0f35edcda5378e5c60ee4a624538.json | 1 - ...tore-c82b32fdd1e087bae256f0beed9521cd.json | 1 - ...tore-c8fad00cb084cbc8999fbb860f29832b.json | 1 - ...tore-ca2fb97dfd9c7f243ca223efc08ffba5.json | 1 - ...tore-d2b3f82b0a8e66040aa810a8958afe0d.json | 1 - ...tore-d54f92e5508c67d452a6a5de39a3b11d.json | 1 - ...tore-dc1901f7f1baf243df1556f52717b2ba.json | 1 - ...tore-ddc1db31dfe2bcb6d2040bce323f5828.json | 1 - ...tore-df3273d6861bb7279e1756896d11d0e5.json | 1 - ...tore-e116079d62fd21e38d5b2a8325a7235f.json | 1 - ...tore-e4c1d977c1779e489bb663fddbf8dbd4.json | 1 - ...tore-fbddf0de549e59cfa8bf242898a85984.json | 1 - ...tore-fd880f1d7896439a1f4085b003961e52.json | 1 - ...tore-fed5770f608dd2a2a26b956dd6c5ab02.json | 1 - .cache/commonjs/api-runner-browser-plugins.js | 15 - .cache/commonjs/api-runner-browser.js | 61 -- .cache/commonjs/api-runner-ssr.js | 48 -- .cache/commonjs/api-ssr-docs.js | 200 ------- .cache/commonjs/app.js | 69 --- .cache/commonjs/create-react-context.js | 11 - .cache/commonjs/default-html.js | 40 -- .cache/commonjs/dev-loader.js | 41 -- .cache/commonjs/develop-static-entry.js | 135 ----- .cache/commonjs/emitter.js | 12 - .cache/commonjs/ensure-resources.js | 94 --- .cache/commonjs/error-overlay-handler.js | 67 --- .cache/commonjs/find-path.js | 111 ---- .cache/commonjs/gatsby-browser-entry.js | 90 --- .cache/commonjs/json-store.js | 93 --- .cache/commonjs/loader.js | 434 -------------- .cache/commonjs/navigation.js | 233 -------- .cache/commonjs/normalize-page-path.js | 22 - .cache/commonjs/page-renderer.js | 53 -- .cache/commonjs/prefetch.js | 76 --- .cache/commonjs/production-app.js | 139 ----- .cache/commonjs/public-page-renderer-dev.js | 33 -- .cache/commonjs/public-page-renderer-prod.js | 34 -- .cache/commonjs/public-page-renderer.js | 11 - .cache/commonjs/react-lifecycles-compat.js | 3 - .cache/commonjs/register-service-worker.js | 66 --- .cache/commonjs/root.js | 131 ----- .cache/commonjs/socketIo.js | 122 ---- .cache/commonjs/static-entry.js | 406 ------------- .cache/commonjs/strip-prefix.js | 15 - .cache/create-react-context.js | 3 - .cache/default-html.js | 39 -- .cache/dev-404-page.js | 145 ----- .cache/dev-loader.js | 39 -- .cache/develop-static-entry.js | 119 ---- .cache/emitter.js | 4 - .cache/ensure-resources.js | 81 --- .cache/error-overlay-handler.js | 65 -- .cache/find-path.js | 93 --- .cache/fragments/image-sharp-fragments.js | 321 ---------- .cache/gatsby-browser-entry.js | 102 ---- .cache/json-store.js | 99 ---- .cache/loader.js | 418 ------------- .cache/match-paths.json | 1 - .cache/navigation.js | 197 ------- .cache/normalize-page-path.js | 12 - .cache/page-renderer.js | 46 -- .cache/pages.json | 1 - .cache/prefetch.js | 76 --- .cache/production-app.js | 163 ------ .cache/public-page-renderer-dev.js | 21 - .cache/public-page-renderer-prod.js | 23 - .cache/public-page-renderer.js | 9 - .cache/react-lifecycles-compat.js | 1 - .cache/redirects.json | 32 - .cache/redux.state | Bin 590560 -> 0 bytes .cache/register-service-worker.js | 64 -- .cache/root.js | 133 ----- .cache/socketIo.js | 111 ---- .cache/static-entry.js | 435 -------------- .cache/strip-prefix.js | 9 - .cache/sync-requires.js | 16 - .cache/test-require-error.js | 21 - .gitignore | 89 +-- gatsby-browser.js | 1 - 164 files changed, 1 insertion(+), 8181 deletions(-) delete mode 100644 .cache/.eslintrc.json delete mode 100644 .cache/__tests__/.babelrc delete mode 100644 .cache/__tests__/__snapshots__/dev-loader.js.snap delete mode 100644 .cache/__tests__/__snapshots__/loader.js.snap delete mode 100644 .cache/__tests__/__snapshots__/static-entry.js.snap delete mode 100644 .cache/__tests__/dev-loader.js delete mode 100644 .cache/__tests__/error-overlay-handler.js delete mode 100644 .cache/__tests__/find-path.js delete mode 100644 .cache/__tests__/loader.js delete mode 100644 .cache/__tests__/minimal-config.js delete mode 100644 .cache/__tests__/static-entry.js delete mode 100644 .cache/__tests__/strip-prefix.js delete mode 100644 .cache/api-runner-browser-plugins.js delete mode 100644 .cache/api-runner-browser.js delete mode 100644 .cache/api-runner-ssr.js delete mode 100644 .cache/api-ssr-docs.js delete mode 100644 .cache/app.js delete mode 100644 .cache/async-requires.js delete mode 100644 .cache/babelState.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-1a79a63948be948cfacc80e4c062b2ef.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-1cf585fc8b2c0583fd712c2c11334ba7.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-1def650c6cf8cb89db3185cbc97d09a0.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-20649dc8fd4cdde49b1d9ea0c26371b2.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-29dceee5020ad0891c27d8c2482f1e64.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-2b8cd1df4f8a6941bff4108301b5d6a9.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-2c713f7ba9a30ac45cbadf6d86d5d544.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-30112668ec3b030a16ab70ed8557e968.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-308215140d91d466921fde8b44e96c70.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-335fc52df6558698584a4c58a93133dc.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-49025698b564146544fecd0e3e64cd6a.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-4959c881d2fccc57dea5cba657223041.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-5197dec8e7e8b24628292c6110a3585b.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-51d0f3b693c1d063f395570395293fb4.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-57199a69f7efd5decc9f72929e6eaab6.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-57508cdf95ebc59c4397e496ddb41c25.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-57b56149d19b6dd403afccc6bfe3ffd1.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-5834efc3cd0e551cbfd90070db9090f7.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-5a894e6dcf41aaf38dcfe7c4ef24bb6c.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-5aa0c32748bae2a74e08828fed4fd3a6.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-5ce457da6f1384d2d0a1c8d65aa7035f.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-60ffaa0253ce67428f5a7e31a4a0bad1.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-644c992860d9a891d9d0379b27be8e52.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-6848789e646bc12b2cbd26760f339042.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-6c1e06477b53b3292a756f3111199015.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-6ff3d86f3d5091056b6de32ba0d5591f.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-733d7c702370459f84adbd328b1651a5.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-739c1d36b4188326eb8d46ad4ca8fe6f.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-75ccc6c53e13e0d176bf3912a21c1610.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-8152d0a6832522eb79f34eecc5e89cd4.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-819c3c410e8fbb86079e9344ce585ef4.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-8a657829abac5ed5e9e205e519d6ded0.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-8bc37c0342e221c46eeda81530413ddf.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-8d812b6ac59a2818ead6b55b21d7a07d.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-91591c14f7e50cf42c72e59db3f5143b.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-9429c44d730cc08b4b28804d3d7d5a2c.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-a846c729526a0e04a6fb8586c2f82dbe.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-ab3c328a2b98edcd782e2b4ea47d83c8.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-b0407a444ef8acb3f4819a2fd00c5ae3.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-b089023713dde4294665d832c48ccd63.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-b196fbb424293a9c110515c8e22586c7.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-b7df9406be8c4ec4d4cc6d6850b2bee1.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-b923ecb39dc7dd6f4752bf9bbf5c94da.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-badc2f24570b1f6d64603b86360ac53c.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-bed602677090371493b02b2541d3b187.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-bee012580db1a2e5f57e03421caf971f.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-c0aa0f35edcda5378e5c60ee4a624538.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-c82b32fdd1e087bae256f0beed9521cd.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-c8fad00cb084cbc8999fbb860f29832b.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-ca2fb97dfd9c7f243ca223efc08ffba5.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-d2b3f82b0a8e66040aa810a8958afe0d.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-d54f92e5508c67d452a6a5de39a3b11d.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-dc1901f7f1baf243df1556f52717b2ba.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-ddc1db31dfe2bcb6d2040bce323f5828.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-df3273d6861bb7279e1756896d11d0e5.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-e116079d62fd21e38d5b2a8325a7235f.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-e4c1d977c1779e489bb663fddbf8dbd4.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-fbddf0de549e59cfa8bf242898a85984.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-fd880f1d7896439a1f4085b003961e52.json delete mode 100644 .cache/caches/gatsby-transformer-remark/diskstore-fed5770f608dd2a2a26b956dd6c5ab02.json delete mode 100644 .cache/commonjs/api-runner-browser-plugins.js delete mode 100644 .cache/commonjs/api-runner-browser.js delete mode 100644 .cache/commonjs/api-runner-ssr.js delete mode 100644 .cache/commonjs/api-ssr-docs.js delete mode 100644 .cache/commonjs/app.js delete mode 100644 .cache/commonjs/create-react-context.js delete mode 100644 .cache/commonjs/default-html.js delete mode 100644 .cache/commonjs/dev-loader.js delete mode 100644 .cache/commonjs/develop-static-entry.js delete mode 100644 .cache/commonjs/emitter.js delete mode 100644 .cache/commonjs/ensure-resources.js delete mode 100644 .cache/commonjs/error-overlay-handler.js delete mode 100644 .cache/commonjs/find-path.js delete mode 100644 .cache/commonjs/gatsby-browser-entry.js delete mode 100644 .cache/commonjs/json-store.js delete mode 100644 .cache/commonjs/loader.js delete mode 100644 .cache/commonjs/navigation.js delete mode 100644 .cache/commonjs/normalize-page-path.js delete mode 100644 .cache/commonjs/page-renderer.js delete mode 100644 .cache/commonjs/prefetch.js delete mode 100644 .cache/commonjs/production-app.js delete mode 100644 .cache/commonjs/public-page-renderer-dev.js delete mode 100644 .cache/commonjs/public-page-renderer-prod.js delete mode 100644 .cache/commonjs/public-page-renderer.js delete mode 100644 .cache/commonjs/react-lifecycles-compat.js delete mode 100644 .cache/commonjs/register-service-worker.js delete mode 100644 .cache/commonjs/root.js delete mode 100644 .cache/commonjs/socketIo.js delete mode 100644 .cache/commonjs/static-entry.js delete mode 100644 .cache/commonjs/strip-prefix.js delete mode 100644 .cache/create-react-context.js delete mode 100644 .cache/default-html.js delete mode 100644 .cache/dev-404-page.js delete mode 100644 .cache/dev-loader.js delete mode 100644 .cache/develop-static-entry.js delete mode 100644 .cache/emitter.js delete mode 100644 .cache/ensure-resources.js delete mode 100644 .cache/error-overlay-handler.js delete mode 100644 .cache/find-path.js delete mode 100644 .cache/fragments/image-sharp-fragments.js delete mode 100644 .cache/gatsby-browser-entry.js delete mode 100644 .cache/json-store.js delete mode 100644 .cache/loader.js delete mode 100644 .cache/match-paths.json delete mode 100644 .cache/navigation.js delete mode 100644 .cache/normalize-page-path.js delete mode 100644 .cache/page-renderer.js delete mode 100644 .cache/pages.json delete mode 100644 .cache/prefetch.js delete mode 100644 .cache/production-app.js delete mode 100644 .cache/public-page-renderer-dev.js delete mode 100644 .cache/public-page-renderer-prod.js delete mode 100644 .cache/public-page-renderer.js delete mode 100644 .cache/react-lifecycles-compat.js delete mode 100644 .cache/redirects.json delete mode 100644 .cache/redux.state delete mode 100644 .cache/register-service-worker.js delete mode 100644 .cache/root.js delete mode 100644 .cache/socketIo.js delete mode 100644 .cache/static-entry.js delete mode 100644 .cache/strip-prefix.js delete mode 100644 .cache/sync-requires.js delete mode 100644 .cache/test-require-error.js diff --git a/.cache/.eslintrc.json b/.cache/.eslintrc.json deleted file mode 100644 index 9352bcdc0d..0000000000 --- a/.cache/.eslintrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "env": { - "browser": true - }, - "globals": { - "__PATH_PREFIX__": false, - "___emitter": false - } -} \ No newline at end of file diff --git a/.cache/__tests__/.babelrc b/.cache/__tests__/.babelrc deleted file mode 100644 index b1ff77b727..0000000000 --- a/.cache/__tests__/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - ["babel-preset-gatsby"] - ] -} diff --git a/.cache/__tests__/__snapshots__/dev-loader.js.snap b/.cache/__tests__/__snapshots__/dev-loader.js.snap deleted file mode 100644 index f43ae2fb75..0000000000 --- a/.cache/__tests__/__snapshots__/dev-loader.js.snap +++ /dev/null @@ -1,16 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Dev loader loadPage should be successful when component can be loaded 1`] = ` -Object { - "component": "instance", - "json": Object { - "pageContext": "something something", - }, - "page": Object { - "componentChunkName": "chunk", - "matchPath": undefined, - "path": "/mypage/", - "webpackCompilationHash": "", - }, -} -`; diff --git a/.cache/__tests__/__snapshots__/loader.js.snap b/.cache/__tests__/__snapshots__/loader.js.snap deleted file mode 100644 index 2a10f26f4f..0000000000 --- a/.cache/__tests__/__snapshots__/loader.js.snap +++ /dev/null @@ -1,16 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Production loader loadPage should be successful when component can be loaded 1`] = ` -Object { - "component": "instance", - "json": Object { - "pageContext": "something something", - }, - "page": Object { - "componentChunkName": "chunk", - "matchPath": undefined, - "path": "/mypage/", - "webpackCompilationHash": "", - }, -} -`; diff --git a/.cache/__tests__/__snapshots__/static-entry.js.snap b/.cache/__tests__/__snapshots__/static-entry.js.snap deleted file mode 100644 index ad583044ea..0000000000 --- a/.cache/__tests__/__snapshots__/static-entry.js.snap +++ /dev/null @@ -1,13 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`develop-static-entry onPreRenderHTML can be used to replace headComponents 1`] = `"
"`; - -exports[`develop-static-entry onPreRenderHTML can be used to replace postBodyComponents 1`] = `"
div3
div2
div1
"`; - -exports[`develop-static-entry onPreRenderHTML can be used to replace preBodyComponents 1`] = `"
div3
div2
div1
"`; - -exports[`static-entry onPreRenderHTML can be used to replace headComponents 1`] = `"
"`; - -exports[`static-entry onPreRenderHTML can be used to replace postBodyComponents 1`] = `"
div3
div2
div1
"`; - -exports[`static-entry onPreRenderHTML can be used to replace preBodyComponents 1`] = `"
div3
div2
div1
"`; diff --git a/.cache/__tests__/dev-loader.js b/.cache/__tests__/dev-loader.js deleted file mode 100644 index ead077fcb8..0000000000 --- a/.cache/__tests__/dev-loader.js +++ /dev/null @@ -1,539 +0,0 @@ -// This is by no means a full test file for loader.js so feel free to add more tests. -import mock from "xhr-mock" -import DevLoader from "../dev-loader" -import emitter from "../emitter" - -jest.mock(`../emitter`) -jest.mock(`../socketIo`, () => { - return { - default: jest.fn(), - getPageData: jest.fn().mockResolvedValue(), - } -}) - -describe(`Dev loader`, () => { - describe(`loadPageDataJson`, () => { - let originalBasePath - let originalPathPrefix - let xhrCount - - /** - * @param {string} path - * @param {number} status - * @param {string|Object?} responseText - * @param {boolean?} json - */ - const mockPageData = (path, status, responseText = ``, json = false) => { - mock.get(`/page-data${path}/page-data.json`, (req, res) => { - xhrCount++ - if (json) { - res.header(`content-type`, `application/json`) - } - - return res - .status(status) - .body( - typeof responseText === `string` - ? responseText - : JSON.stringify(responseText) - ) - }) - } - - const defaultPayload = { - path: `/mypage/`, - } - - // replace the real XHR object with the mock XHR object before each test - beforeEach(() => { - originalBasePath = global.__BASE_PATH__ - originalPathPrefix = global.__PATH_PREFIX__ - global.__BASE_PATH__ = `` - global.__PATH_PREFIX__ = `` - xhrCount = 0 - mock.setup() - }) - - // put the real XHR object back and clear the mocks after each test - afterEach(() => { - global.__BASE_PATH__ = originalBasePath - global.__PATH_PREFIX__ = originalPathPrefix - mock.teardown() - }) - - it(`should return a pageData json on success`, async () => { - const devLoader = new DevLoader(null, []) - - mockPageData(`/mypage`, 200, defaultPayload, true) - - const expectation = { - status: `success`, - pagePath: `/mypage`, - payload: defaultPayload, - } - expect(await devLoader.loadPageDataJson(`/mypage/`)).toEqual(expectation) - expect(devLoader.pageDataDb.get(`/mypage`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should return a pageData json on success without contentType`, async () => { - const devLoader = new DevLoader(null, []) - - mockPageData(`/mypage`, 200, defaultPayload) - - const expectation = { - status: `success`, - pagePath: `/mypage`, - payload: defaultPayload, - } - expect(await devLoader.loadPageDataJson(`/mypage/`)).toEqual(expectation) - expect(devLoader.pageDataDb.get(`/mypage`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should return a pageData json with an empty compilation hash (gatsby develop)`, async () => { - const devLoader = new DevLoader(null, []) - - const payload = { ...defaultPayload, webpackCompilationHash: `` } - mockPageData(`/mypage`, 200, payload) - - const expectation = { - status: `success`, - pagePath: `/mypage`, - payload, - } - expect(await devLoader.loadPageDataJson(`/mypage/`)).toEqual(expectation) - expect(devLoader.pageDataDb.get(`/mypage`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should load a 404 page when page-path file is not a gatsby json`, async () => { - const devLoader = new DevLoader(null, []) - - const payload = { ...defaultPayload, path: `/404.html/` } - mockPageData(`/unknown-page`, 200, { random: `string` }, true) - mockPageData(`/404.html`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/404.html`, - notFound: true, - payload, - } - expect(await devLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(devLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should load a 404 page when page-path file is not a json`, async () => { - const devLoader = new DevLoader(null, []) - - const payload = { ...defaultPayload, path: `/404.html/` } - mockPageData(`/unknown-page`, 200) - mockPageData(`/404.html`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/404.html`, - notFound: true, - payload, - } - expect(await devLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(devLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should load a 404 page when path returns a 404`, async () => { - const devLoader = new DevLoader(null, []) - - const payload = { ...defaultPayload, path: `/404.html/` } - mockPageData(`/unknown-page`, 200) - mockPageData(`/404.html`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/404.html`, - notFound: true, - payload, - } - expect(await devLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(devLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should return the dev-404-page when no 404 page can be found`, async () => { - const devLoader = new DevLoader(null, []) - - const payload = { ...defaultPayload, path: `/dev-404-page/` } - mockPageData(`/unknown-page`, 404) - mockPageData(`/404.html`, 404) - mockPageData(`/dev-404-page`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/dev-404-page`, - notFound: true, - payload, - } - expect(await devLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - - expect(devLoader.pageDataDb.get(`/unknown-page`)).toEqual({ - notFound: true, - pagePath: `/404.html`, - status: `failure`, - }) - expect(xhrCount).toBe(3) - }) - - it(`should return an error when status is 500`, async () => { - const devLoader = new DevLoader(null, []) - - mockPageData(`/error-page`, 500) - - const expectation = { - status: `error`, - pagePath: `/error-page`, - } - expect(await devLoader.loadPageDataJson(`/error-page/`)).toEqual( - expectation - ) - expect(devLoader.pageDataDb.get(`/error-page`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should retry 3 times before returning an error`, async () => { - const devLoader = new DevLoader(null, []) - - mockPageData(`/blocked-page`, 0) - - const expectation = { - status: `error`, - retries: 3, - pagePath: `/blocked-page`, - } - expect(await devLoader.loadPageDataJson(`/blocked-page/`)).toEqual( - expectation - ) - expect(devLoader.pageDataDb.get(`/blocked-page`)).toEqual(expectation) - expect(xhrCount).toBe(4) - }) - - it(`should recover if we get 1 failure`, async () => { - const devLoader = new DevLoader(null, []) - const payload = { - path: `/blocked-page/`, - } - - let xhrCount = 0 - mock.get(`/page-data/blocked-page/page-data.json`, (req, res) => { - if (xhrCount++ === 0) { - return res.status(0).body(``) - } else { - res.header(`content-type`, `application/json`) - return res.status(200).body(JSON.stringify(payload)) - } - }) - - const expectation = { - status: `success`, - retries: 1, - pagePath: `/blocked-page`, - payload, - } - expect(await devLoader.loadPageDataJson(`/blocked-page/`)).toEqual( - expectation - ) - expect(devLoader.pageDataDb.get(`/blocked-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`shouldn't load pageData multiple times`, async () => { - const devLoader = new DevLoader(null, []) - - mockPageData(`/mypage`, 200, defaultPayload, true) - - const expectation = await devLoader.loadPageDataJson(`/mypage/`) - expect(await devLoader.loadPageDataJson(`/mypage/`)).toBe(expectation) - expect(xhrCount).toBe(1) - }) - }) - - describe(`loadPage`, () => { - const createSyncRequires = components => { - return { - components, - } - } - - let originalPathPrefix - - beforeEach(() => { - originalPathPrefix = global.__PATH_PREFIX__ - global.__PATH_PREFIX__ = `` - mock.setup() - mock.get(`/app-data.json`, (req, res) => - res - .status(200) - .header(`content-type`, `application/json`) - .body( - JSON.stringify({ - webpackCompilationHash: `123`, - }) - ) - ) - emitter.emit.mockReset() - }) - - afterEach(() => { - global.__PATH_PREFIX__ = originalPathPrefix - mock.teardown() - }) - - it(`should be successful when component can be loaded`, async () => { - const syncRequires = createSyncRequires({ - chunk: `instance`, - }) - const devLoader = new DevLoader(syncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - result: { - pageContext: `something something`, - }, - } - devLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `success`, - }) - ) - - const expectation = await devLoader.loadPage(`/mypage/`) - expect(expectation).toMatchSnapshot() - expect(Object.keys(expectation)).toEqual([`component`, `json`, `page`]) - expect(devLoader.pageDb.get(`/mypage`)).toEqual( - expect.objectContaining({ - payload: expectation, - status: `success`, - }) - ) - expect(emitter.emit).toHaveBeenCalledTimes(1) - expect(emitter.emit).toHaveBeenCalledWith(`onPostLoadPageResources`, { - page: expectation, - pageResources: expectation, - }) - }) - - it(`should set not found on finalResult`, async () => { - const syncRequires = createSyncRequires({ - chunk: `instance`, - }) - const devLoader = new DevLoader(syncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - } - devLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `success`, - notFound: true, - }) - ) - - await devLoader.loadPage(`/mypage/`) - const expectation = devLoader.pageDb.get(`/mypage`) - expect(expectation).toHaveProperty(`notFound`, true) - expect(emitter.emit).toHaveBeenCalledTimes(1) - expect(emitter.emit).toHaveBeenCalledWith(`onPostLoadPageResources`, { - page: expectation.payload, - pageResources: expectation.payload, - }) - }) - - it(`should return an error when component cannot be loaded`, async () => { - const syncRequires = createSyncRequires({ - chunk: false, - }) - const devLoader = new DevLoader(syncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - } - devLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `success`, - }) - ) - - await devLoader.loadPage(`/mypage/`) - const expectation = devLoader.pageDb.get(`/mypage`) - expect(expectation).toHaveProperty(`status`, `error`) - expect(emitter.emit).toHaveBeenCalledTimes(0) - }) - - it(`should return an error pageData contains an error`, async () => { - const syncRequires = createSyncRequires({ - chunk: `instance`, - }) - const devLoader = new DevLoader(syncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - } - devLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `error`, - }) - ) - - expect(await devLoader.loadPage(`/mypage/`)).toEqual({ status: `error` }) - expect(devLoader.pageDb.size).toBe(0) - expect(emitter.emit).toHaveBeenCalledTimes(0) - }) - - it(`should throw an error when 404 cannot be fetched`, async () => { - const devLoader = new DevLoader(null, []) - - devLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - status: `failure`, - }) - ) - - try { - await devLoader.loadPage(`/404.html/`) - } catch (err) { - expect(err.message).toEqual( - expect.stringContaining(`404 page could not be found`) - ) - } - expect(devLoader.pageDb.size).toBe(0) - expect(emitter.emit).toHaveBeenCalledTimes(0) - }) - - it(`should cache the result of loadPage`, async () => { - const syncRequires = createSyncRequires({ - chunk: `instance`, - }) - const devLoader = new DevLoader(syncRequires, []) - devLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: { - componentChunkName: `chunk`, - }, - status: `success`, - }) - ) - - const expectation = await devLoader.loadPage(`/mypage/`) - expect(await devLoader.loadPage(`/mypage/`)).toBe(expectation) - expect(devLoader.loadPageDataJson).toHaveBeenCalledTimes(1) - }) - }) - - describe(`loadPageSync`, () => { - it(`returns page resources when already fetched`, () => { - const devLoader = new DevLoader(null, []) - - devLoader.pageDb.set(`/mypage`, { payload: true }) - expect(devLoader.loadPageSync(`/mypage/`)).toBe(true) - }) - - it(`returns page resources when already fetched`, () => { - const devLoader = new DevLoader(null, []) - - expect(devLoader.loadPageSync(`/mypage/`)).toBeUndefined() - }) - }) - - describe(`prefetch`, () => { - const flushPromises = () => new Promise(resolve => setImmediate(resolve)) - - it(`shouldn't prefetch when shouldPrefetch is false`, () => { - const devLoader = new DevLoader(null, []) - devLoader.shouldPrefetch = jest.fn(() => false) - devLoader.doPrefetch = jest.fn() - devLoader.apiRunner = jest.fn() - - expect(devLoader.prefetch(`/mypath/`)).toBe(false) - expect(devLoader.shouldPrefetch).toHaveBeenCalledWith(`/mypath/`) - expect(devLoader.apiRunner).not.toHaveBeenCalled() - expect(devLoader.doPrefetch).not.toHaveBeenCalled() - }) - - it(`should trigger custom prefetch logic when core is disabled`, () => { - const devLoader = new DevLoader(null, []) - devLoader.shouldPrefetch = jest.fn(() => true) - devLoader.doPrefetch = jest.fn() - devLoader.apiRunner = jest.fn() - devLoader.prefetchDisabled = true - - expect(devLoader.prefetch(`/mypath/`)).toBe(false) - expect(devLoader.shouldPrefetch).toHaveBeenCalledWith(`/mypath/`) - expect(devLoader.apiRunner).toHaveBeenCalledWith(`onPrefetchPathname`, { - pathname: `/mypath/`, - }) - expect(devLoader.doPrefetch).not.toHaveBeenCalled() - }) - - it(`should prefetch when not yet triggered`, async () => { - jest.useFakeTimers() - const devLoader = new DevLoader(null, []) - devLoader.shouldPrefetch = jest.fn(() => true) - devLoader.apiRunner = jest.fn() - devLoader.doPrefetch = jest.fn(() => Promise.resolve({})) - - expect(devLoader.prefetch(`/mypath/`)).toBe(true) - - // wait for doPrefetchPromise - await flushPromises() - - expect(devLoader.apiRunner).toHaveBeenCalledWith(`onPrefetchPathname`, { - pathname: `/mypath/`, - }) - expect(devLoader.apiRunner).toHaveBeenNthCalledWith( - 2, - `onPostPrefetchPathname`, - { - pathname: `/mypath/`, - } - ) - }) - - it(`should only run apis once`, async () => { - const devLoader = new DevLoader(null, []) - devLoader.shouldPrefetch = jest.fn(() => true) - devLoader.apiRunner = jest.fn() - devLoader.doPrefetch = jest.fn(() => Promise.resolve({})) - - expect(devLoader.prefetch(`/mypath/`)).toBe(true) - expect(devLoader.prefetch(`/mypath/`)).toBe(true) - - // wait for doPrefetchPromise - await flushPromises() - - expect(devLoader.apiRunner).toHaveBeenCalledTimes(2) - expect(devLoader.apiRunner).toHaveBeenNthCalledWith( - 1, - `onPrefetchPathname`, - expect.anything() - ) - expect(devLoader.apiRunner).toHaveBeenNthCalledWith( - 2, - `onPostPrefetchPathname`, - expect.anything() - ) - }) - }) -}) diff --git a/.cache/__tests__/error-overlay-handler.js b/.cache/__tests__/error-overlay-handler.js deleted file mode 100644 index 088793742e..0000000000 --- a/.cache/__tests__/error-overlay-handler.js +++ /dev/null @@ -1,59 +0,0 @@ -import "@babel/polyfill" -const { - reportError, - clearError, - errorMap, -} = require(`../error-overlay-handler`) - -import * as ErrorOverlay from "react-error-overlay" - -jest.mock(`react-error-overlay`, () => { - return { - reportBuildError: jest.fn(), - dismissBuildError: jest.fn(), - startReportingRuntimeErrors: jest.fn(), - setEditorHandler: jest.fn(), - } -}) - -beforeEach(() => { - ErrorOverlay.reportBuildError.mockClear() - ErrorOverlay.dismissBuildError.mockClear() -}) - -describe(`errorOverlayHandler`, () => { - describe(`clearError()`, () => { - beforeEach(() => { - reportError(`foo`, `error`) - reportError(`bar`, `error`) - }) - afterAll(() => { - clearError(`foo`) - clearError(`bar`) - }) - it(`should clear specific error type`, () => { - expect(Object.keys(errorMap)).toHaveLength(2) - clearError(`foo`) - expect(Object.keys(errorMap)).toHaveLength(1) - expect(ErrorOverlay.dismissBuildError).not.toHaveBeenCalled() - }) - - it(`should call ErrorOverlay to dismiss build errors`, () => { - clearError(`foo`) - clearError(`bar`) - expect(ErrorOverlay.dismissBuildError).toHaveBeenCalled() - }) - }) - describe(`reportErrorOverlay()`, () => { - it(`should not add error if it's empty and not call ErrorOverlay`, () => { - reportError(`foo`, null) - expect(Object.keys(errorMap)).toHaveLength(0) - expect(ErrorOverlay.reportBuildError).not.toHaveBeenCalled() - }) - it(`should add error if it has a truthy value and call ErrorOverlay`, () => { - reportError(`foo`, `bar`) - expect(Object.keys(errorMap)).toHaveLength(1) - expect(ErrorOverlay.reportBuildError).toHaveBeenCalled() - }) - }) -}) diff --git a/.cache/__tests__/find-path.js b/.cache/__tests__/find-path.js deleted file mode 100644 index e8813aa1bd..0000000000 --- a/.cache/__tests__/find-path.js +++ /dev/null @@ -1,109 +0,0 @@ -import { cleanPath, setMatchPaths, findMatchPath, findPath } from "../find-path" - -describe(`find-path`, () => { - describe(`cleanPath`, () => { - beforeEach(() => { - global.__BASE_PATH__ = `` - }) - - it(`should strip out ? & # from a pathname`, () => { - expect(cleanPath(`/mypath#anchor?gatsby=cool`)).toBe(`/mypath`) - }) - - it(`should convert a /index.html to root dir`, () => { - expect(cleanPath(`/index.html`)).toBe(`/`) - }) - - it(`strip out a basePrefix`, () => { - global.__BASE_PATH__ = `/blog` - expect(cleanPath(`/blog/mypath`)).toBe(`/mypath`) - }) - }) - - describe(`findMatchPath`, () => { - beforeEach(() => { - // reset matchPaths - setMatchPaths([]) - global.__BASE_PATH__ = `` - }) - - it(`should find a path when matchPath found`, () => { - setMatchPaths([ - { - matchPath: `/app/*`, - path: `/app`, - }, - ]) - - expect(findMatchPath(`/app/dynamic-page#anchor?gatsby=cool`)).toBe(`/app`) - }) - - it(`should return null when no matchPathFound`, () => { - setMatchPaths([ - { - matchPath: `/app/*`, - path: `/app`, - }, - ]) - - expect(findMatchPath(`/notanapp/dynamic-page`)).toBeNull() - }) - }) - - describe(`findPath`, () => { - beforeEach(() => { - // reset matchPaths - setMatchPaths([]) - global.__BASE_PATH__ = `` - }) - - it(`should use matchPath if found`, () => { - setMatchPaths([ - { - matchPath: `/app/*`, - path: `/app`, - }, - ]) - - expect(findPath(`/app/dynamic-page#anchor?gatsby=cool`)).toBe(`/app`) - }) - - it(`should return the cleaned up path when no matchPathFound`, () => { - setMatchPaths([ - { - matchPath: `/app/*`, - path: `/app`, - }, - ]) - - expect(findPath(`/notanapp/my-page#anchor?gatsby=cool`)).toBe( - `/notanapp/my-page` - ) - }) - - it(`should only process a request once`, () => { - jest.resetModules() - jest.mock(`@reach/router/lib/utils`) - const findPath = require(`../find-path`).findPath - const setMatchPaths = require(`../find-path`).setMatchPaths - const match = require(`@reach/router/lib/utils`).match - - setMatchPaths([ - { - matchPath: `/app/*`, - path: `/app`, - }, - ]) - - expect(findPath(`/notanapp/my-page#anchor?gatsby=cool`)).toBe( - `/notanapp/my-page` - ) - expect(findPath(`/notanapp/my-page#anchor?gatsby=cool`)).toBe( - `/notanapp/my-page` - ) - expect(findPath(`/notanapp/my-page`)).toBe(`/notanapp/my-page`) - - expect(match).toHaveBeenCalledTimes(1) - }) - }) -}) diff --git a/.cache/__tests__/loader.js b/.cache/__tests__/loader.js deleted file mode 100644 index cfba630c53..0000000000 --- a/.cache/__tests__/loader.js +++ /dev/null @@ -1,554 +0,0 @@ -// This is by no means a full test file for loader.js so feel free to add more tests. -import mock from "xhr-mock" -import { ProdLoader } from "../loader" -import emitter from "../emitter" - -jest.mock(`../emitter`) - -describe(`Production loader`, () => { - describe(`loadPageDataJson`, () => { - let originalBasePath - let originalPathPrefix - let xhrCount - - /** - * @param {string} path - * @param {number} status - * @param {string|Object?} responseText - * @param {boolean?} json - */ - const mockPageData = (path, status, responseText = ``, json = false) => { - mock.get(`/page-data${path}/page-data.json`, (req, res) => { - xhrCount++ - if (json) { - res.header(`content-type`, `application/json`) - } - - return res - .status(status) - .body( - typeof responseText === `string` - ? responseText - : JSON.stringify(responseText) - ) - }) - } - - const defaultPayload = { - path: `/mypage/`, - } - - // replace the real XHR object with the mock XHR object before each test - beforeEach(() => { - originalBasePath = global.__BASE_PATH__ - originalPathPrefix = global.__PATH_PREFIX__ - global.__BASE_PATH__ = `` - global.__PATH_PREFIX__ = `` - xhrCount = 0 - mock.setup() - }) - - // put the real XHR object back and clear the mocks after each test - afterEach(() => { - global.__BASE_PATH__ = originalBasePath - global.__PATH_PREFIX__ = originalPathPrefix - mock.teardown() - }) - - it(`should return a pageData json on success`, async () => { - const prodLoader = new ProdLoader(null, []) - - mockPageData(`/mypage`, 200, defaultPayload, true) - - const expectation = { - status: `success`, - pagePath: `/mypage`, - payload: defaultPayload, - } - expect(await prodLoader.loadPageDataJson(`/mypage/`)).toEqual(expectation) - expect(prodLoader.pageDataDb.get(`/mypage`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should return a pageData json on success without contentType`, async () => { - const prodLoader = new ProdLoader(null, []) - - mockPageData(`/mypage`, 200, defaultPayload) - - const expectation = { - status: `success`, - pagePath: `/mypage`, - payload: defaultPayload, - } - expect(await prodLoader.loadPageDataJson(`/mypage/`)).toEqual(expectation) - expect(prodLoader.pageDataDb.get(`/mypage`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should return a pageData json with an empty compilation hash (gatsby develop)`, async () => { - const prodLoader = new ProdLoader(null, []) - - const payload = { ...defaultPayload, webpackCompilationHash: `` } - mockPageData(`/mypage`, 200, payload) - - const expectation = { - status: `success`, - pagePath: `/mypage`, - payload, - } - expect(await prodLoader.loadPageDataJson(`/mypage/`)).toEqual(expectation) - expect(prodLoader.pageDataDb.get(`/mypage`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should load a 404 page when page-path file is not a gatsby json`, async () => { - const prodLoader = new ProdLoader(null, []) - - const payload = { ...defaultPayload, path: `/404.html/` } - mockPageData(`/unknown-page`, 200, { random: `string` }, true) - mockPageData(`/404.html`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/404.html`, - notFound: true, - payload, - } - expect(await prodLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should load a 404 page when page-path file is not a json`, async () => { - const prodLoader = new ProdLoader(null, []) - - const payload = { ...defaultPayload, path: `/404.html/` } - mockPageData(`/unknown-page`, 200) - mockPageData(`/404.html`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/404.html`, - notFound: true, - payload, - } - expect(await prodLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should load a 404 page when path returns a 404`, async () => { - const prodLoader = new ProdLoader(null, []) - - const payload = { ...defaultPayload, path: `/404.html/` } - mockPageData(`/unknown-page`, 200) - mockPageData(`/404.html`, 200, payload, true) - - const expectation = { - status: `success`, - pagePath: `/404.html`, - notFound: true, - payload, - } - expect(await prodLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should return a failure when status is 404 and 404 page is fetched`, async () => { - const prodLoader = new ProdLoader(null, []) - - mockPageData(`/unknown-page`, 404) - mockPageData(`/404.html`, 404) - - const expectation = { - status: `failure`, - pagePath: `/404.html`, - notFound: true, - } - expect(await prodLoader.loadPageDataJson(`/unknown-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/unknown-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`should return an error when status is 500`, async () => { - const prodLoader = new ProdLoader(null, []) - - mockPageData(`/error-page`, 500) - - const expectation = { - status: `error`, - pagePath: `/error-page`, - } - expect(await prodLoader.loadPageDataJson(`/error-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/error-page`)).toEqual(expectation) - expect(xhrCount).toBe(1) - }) - - it(`should retry 3 times before returning an error`, async () => { - const prodLoader = new ProdLoader(null, []) - - mockPageData(`/blocked-page`, 0) - - const expectation = { - status: `error`, - retries: 3, - pagePath: `/blocked-page`, - } - expect(await prodLoader.loadPageDataJson(`/blocked-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/blocked-page`)).toEqual(expectation) - expect(xhrCount).toBe(4) - }) - - it(`should recover if we get 1 failure`, async () => { - const prodLoader = new ProdLoader(null, []) - const payload = { - path: `/blocked-page/`, - } - - let xhrCount = 0 - mock.get(`/page-data/blocked-page/page-data.json`, (req, res) => { - if (xhrCount++ === 0) { - return res.status(0).body(``) - } else { - res.header(`content-type`, `application/json`) - return res.status(200).body(JSON.stringify(payload)) - } - }) - - const expectation = { - status: `success`, - retries: 1, - pagePath: `/blocked-page`, - payload, - } - expect(await prodLoader.loadPageDataJson(`/blocked-page/`)).toEqual( - expectation - ) - expect(prodLoader.pageDataDb.get(`/blocked-page`)).toEqual(expectation) - expect(xhrCount).toBe(2) - }) - - it(`shouldn't load pageData multiple times`, async () => { - const prodLoader = new ProdLoader(null, []) - - mockPageData(`/mypage`, 200, defaultPayload, true) - - const expectation = await prodLoader.loadPageDataJson(`/mypage/`) - expect(await prodLoader.loadPageDataJson(`/mypage/`)).toBe(expectation) - expect(xhrCount).toBe(1) - }) - }) - - describe(`loadPage`, () => { - const createAsyncRequires = components => { - return { - components, - } - } - - let originalPathPrefix - - beforeEach(() => { - originalPathPrefix = global.__PATH_PREFIX__ - global.__PATH_PREFIX__ = `` - mock.setup() - mock.get(`/app-data.json`, (req, res) => - res - .status(200) - .header(`content-type`, `application/json`) - .body( - JSON.stringify({ - webpackCompilationHash: `123`, - }) - ) - ) - emitter.emit.mockReset() - }) - - afterEach(() => { - global.__PATH_PREFIX__ = originalPathPrefix - mock.teardown() - }) - - it(`should be successful when component can be loaded`, async () => { - const asyncRequires = createAsyncRequires({ - chunk: () => Promise.resolve(`instance`), - }) - const prodLoader = new ProdLoader(asyncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - result: { - pageContext: `something something`, - }, - } - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `success`, - }) - ) - - const expectation = await prodLoader.loadPage(`/mypage/`) - expect(expectation).toMatchSnapshot() - expect(Object.keys(expectation)).toEqual([`component`, `json`, `page`]) - expect(prodLoader.pageDb.get(`/mypage`)).toEqual( - expect.objectContaining({ - payload: expectation, - status: `success`, - }) - ) - expect(emitter.emit).toHaveBeenCalledTimes(1) - expect(emitter.emit).toHaveBeenCalledWith(`onPostLoadPageResources`, { - page: expectation, - pageResources: expectation, - }) - }) - - it(`should set not found on finalResult`, async () => { - const asyncRequires = createAsyncRequires({ - chunk: () => Promise.resolve(`instance`), - }) - const prodLoader = new ProdLoader(asyncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - } - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `success`, - notFound: true, - }) - ) - - await prodLoader.loadPage(`/mypage/`) - const expectation = prodLoader.pageDb.get(`/mypage`) - expect(expectation).toHaveProperty(`notFound`, true) - expect(emitter.emit).toHaveBeenCalledTimes(1) - expect(emitter.emit).toHaveBeenCalledWith(`onPostLoadPageResources`, { - page: expectation.payload, - pageResources: expectation.payload, - }) - }) - - it(`should return an error when component cannot be loaded`, async () => { - const asyncRequires = createAsyncRequires({ - chunk: () => Promise.resolve(false), - }) - const prodLoader = new ProdLoader(asyncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - } - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `success`, - }) - ) - - await prodLoader.loadPage(`/mypage/`) - const expectation = prodLoader.pageDb.get(`/mypage`) - expect(expectation).toHaveProperty(`status`, `error`) - expect(emitter.emit).toHaveBeenCalledTimes(0) - }) - - it(`should return an error pageData contains an error`, async () => { - const asyncRequires = createAsyncRequires({ - chunk: () => Promise.resolve(`instance`), - }) - const prodLoader = new ProdLoader(asyncRequires, []) - const pageData = { - path: `/mypage/`, - componentChunkName: `chunk`, - } - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: pageData, - status: `error`, - }) - ) - - expect(await prodLoader.loadPage(`/mypage/`)).toEqual({ status: `error` }) - expect(prodLoader.pageDb.size).toBe(0) - expect(emitter.emit).toHaveBeenCalledTimes(0) - }) - - it(`should throw an error when 404 cannot be fetched`, async () => { - const prodLoader = new ProdLoader(null, []) - - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - status: `failure`, - }) - ) - - try { - await prodLoader.loadPage(`/404.html/`) - } catch (err) { - expect(err.message).toEqual( - expect.stringContaining(`404 page could not be found`) - ) - } - expect(prodLoader.pageDb.size).toBe(0) - expect(emitter.emit).toHaveBeenCalledTimes(0) - }) - - it(`should cache the result of loadPage`, async () => { - const asyncRequires = createAsyncRequires({ - chunk: () => Promise.resolve(`instance`), - }) - const prodLoader = new ProdLoader(asyncRequires, []) - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: { - componentChunkName: `chunk`, - }, - status: `success`, - }) - ) - - const expectation = await prodLoader.loadPage(`/mypage/`) - expect(await prodLoader.loadPage(`/mypage/`)).toBe(expectation) - expect(prodLoader.loadPageDataJson).toHaveBeenCalledTimes(1) - }) - - it(`should only run 1 network request even when called multiple times`, async () => { - const asyncRequires = createAsyncRequires({ - chunk: () => Promise.resolve(`instance`), - }) - const prodLoader = new ProdLoader(asyncRequires, []) - prodLoader.loadPageDataJson = jest.fn(() => - Promise.resolve({ - payload: { - componentChunkName: `chunk`, - }, - status: `success`, - }) - ) - - const loadPagePromise = prodLoader.loadPage(`/test-page/`) - expect(prodLoader.inFlightDb.size).toBe(1) - expect(prodLoader.loadPage(`/test-page/`)).toBe(loadPagePromise) - expect(prodLoader.inFlightDb.size).toBe(1) - - const expectation = await loadPagePromise - - expect(prodLoader.inFlightDb.size).toBe(0) - expect(emitter.emit).toHaveBeenCalledTimes(1) - expect(emitter.emit).toHaveBeenCalledWith(`onPostLoadPageResources`, { - page: expectation, - pageResources: expectation, - }) - }) - }) - - describe(`loadPageSync`, () => { - it(`returns page resources when already fetched`, () => { - const prodLoader = new ProdLoader(null, []) - - prodLoader.pageDb.set(`/mypage`, { payload: true }) - expect(prodLoader.loadPageSync(`/mypage/`)).toBe(true) - }) - - it(`returns page resources when already fetched`, () => { - const prodLoader = new ProdLoader(null, []) - - expect(prodLoader.loadPageSync(`/mypage/`)).toBeUndefined() - }) - }) - - describe(`prefetch`, () => { - const flushPromises = () => new Promise(resolve => setImmediate(resolve)) - - it(`shouldn't prefetch when shouldPrefetch is false`, () => { - const prodLoader = new ProdLoader(null, []) - prodLoader.shouldPrefetch = jest.fn(() => false) - prodLoader.doPrefetch = jest.fn() - prodLoader.apiRunner = jest.fn() - - expect(prodLoader.prefetch(`/mypath/`)).toBe(false) - expect(prodLoader.shouldPrefetch).toHaveBeenCalledWith(`/mypath/`) - expect(prodLoader.apiRunner).not.toHaveBeenCalled() - expect(prodLoader.doPrefetch).not.toHaveBeenCalled() - }) - - it(`should trigger custom prefetch logic when core is disabled`, () => { - const prodLoader = new ProdLoader(null, []) - prodLoader.shouldPrefetch = jest.fn(() => true) - prodLoader.doPrefetch = jest.fn() - prodLoader.apiRunner = jest.fn() - prodLoader.prefetchDisabled = true - - expect(prodLoader.prefetch(`/mypath/`)).toBe(false) - expect(prodLoader.shouldPrefetch).toHaveBeenCalledWith(`/mypath/`) - expect(prodLoader.apiRunner).toHaveBeenCalledWith(`onPrefetchPathname`, { - pathname: `/mypath/`, - }) - expect(prodLoader.doPrefetch).not.toHaveBeenCalled() - }) - - it(`should prefetch when not yet triggered`, async () => { - jest.useFakeTimers() - const prodLoader = new ProdLoader(null, []) - prodLoader.shouldPrefetch = jest.fn(() => true) - prodLoader.apiRunner = jest.fn() - prodLoader.doPrefetch = jest.fn(() => Promise.resolve({})) - - expect(prodLoader.prefetch(`/mypath/`)).toBe(true) - - // wait for doPrefetchPromise - await flushPromises() - - expect(prodLoader.apiRunner).toHaveBeenCalledWith(`onPrefetchPathname`, { - pathname: `/mypath/`, - }) - expect(prodLoader.apiRunner).toHaveBeenNthCalledWith( - 2, - `onPostPrefetchPathname`, - { - pathname: `/mypath/`, - } - ) - }) - - it(`should only run apis once`, async () => { - const prodLoader = new ProdLoader(null, []) - prodLoader.shouldPrefetch = jest.fn(() => true) - prodLoader.apiRunner = jest.fn() - prodLoader.doPrefetch = jest.fn(() => Promise.resolve({})) - - expect(prodLoader.prefetch(`/mypath/`)).toBe(true) - expect(prodLoader.prefetch(`/mypath/`)).toBe(true) - - // wait for doPrefetchPromise - await flushPromises() - - expect(prodLoader.apiRunner).toHaveBeenCalledTimes(2) - expect(prodLoader.apiRunner).toHaveBeenNthCalledWith( - 1, - `onPrefetchPathname`, - expect.anything() - ) - expect(prodLoader.apiRunner).toHaveBeenNthCalledWith( - 2, - `onPostPrefetchPathname`, - expect.anything() - ) - }) - }) -}) diff --git a/.cache/__tests__/minimal-config.js b/.cache/__tests__/minimal-config.js deleted file mode 100644 index ef2c4c9a90..0000000000 --- a/.cache/__tests__/minimal-config.js +++ /dev/null @@ -1,32 +0,0 @@ -const path = require(`path`) -const child = require(`child_process`) - -it(`Builds cache-dir with minimal config`, done => { - const args = [ - require.resolve(`@babel/cli/bin/babel.js`), - path.join(__dirname, `..`), - `--config-file`, - path.join(__dirname, `.babelrc`), - `--ignore`, - `**/__tests__`, - ] - - const spawn = child.spawn(process.execPath, args) - - let stderr = `` - let stdout = `` - - spawn.stderr.on(`data`, function(chunk) { - stderr += chunk - }) - - spawn.stdout.on(`data`, function(chunk) { - stdout += chunk - }) - - spawn.on(`close`, function() { - expect(stderr).toEqual(``) - expect(stdout).not.toEqual(``) - done() - }) -}, 30000) diff --git a/.cache/__tests__/static-entry.js b/.cache/__tests__/static-entry.js deleted file mode 100644 index 9149015bf2..0000000000 --- a/.cache/__tests__/static-entry.js +++ /dev/null @@ -1,330 +0,0 @@ -import React from "react" -import fs from "fs" -const { join } = require(`path`) - -import DevelopStaticEntry from "../develop-static-entry" - -jest.mock(`fs`, () => { - const fs = jest.requireActual(`fs`) - return { - ...fs, - readFileSync: jest.fn(), - } -}) -jest.mock(`gatsby/package.json`, () => { - return { - version: `2.0.0`, - } -}) - -jest.mock( - `../sync-requires`, - () => { - return { - components: { - "page-component---src-pages-test-js": () => null, - }, - } - }, - { - virtual: true, - } -) - -const MOCK_FILE_INFO = { - [`${process.cwd()}/public/webpack.stats.json`]: `{}`, - [`${process.cwd()}/public/chunk-map.json`]: `{}`, - [join( - process.cwd(), - `/public/page-data/about/page-data.json` - )]: JSON.stringify({ - componentChunkName: `page-component---src-pages-test-js`, - path: `/about/`, - webpackCompilationHash: `1234567890abcdef1234`, - }), -} - -let StaticEntry -beforeEach(() => { - fs.readFileSync.mockImplementation(file => MOCK_FILE_INFO[file]) - StaticEntry = require(`../static-entry`).default -}) - -const reverseHeadersPlugin = { - plugin: { - onPreRenderHTML: ({ getHeadComponents, replaceHeadComponents }) => { - const headComponents = getHeadComponents() - headComponents.reverse() - replaceHeadComponents(headComponents) - }, - }, -} - -const injectValuePlugin = (hookName, methodName, value) => { - return { - plugin: { - [hookName]: staticEntry => { - const method = staticEntry[methodName] - method(value) - }, - }, - } -} - -const checkSanitized = components => { - expect(components.includes(null)).toBeFalsy() - expect( - components.find(val => Array.isArray(val) && val.length === 0) - ).toBeFalsy() - expect(components.find(val => Array.isArray(val))).toBeFalsy() -} - -const checkNonEmptyHeadersPlugin = { - plugin: { - onPreRenderHTML: ({ - getHeadComponents, - getPreBodyComponents, - getPostBodyComponents, - }) => { - const headComponents = getHeadComponents() - const preBodyComponents = getPreBodyComponents() - const postBodyComponents = getPostBodyComponents() - checkSanitized(headComponents) - checkSanitized(preBodyComponents) - checkSanitized(postBodyComponents) - }, - }, -} - -const fakeStylesPlugin = { - plugin: { - onRenderBody: ({ setHeadComponents }) => - setHeadComponents([ - , - , - , - ]), - }, -} - -const reverseBodyComponentsPluginFactory = type => { - return { - plugin: { - onPreRenderHTML: props => { - const components = props[`get${type}BodyComponents`]() - components.reverse() - props[`replace${type}BodyComponents`](components) - }, - }, - } -} - -const fakeComponentsPluginFactory = type => { - return { - plugin: { - onRenderBody: props => { - props[`set${type}BodyComponents`]([ -
div1
, -
div2
, -
div3
, - ]) - }, - }, - } -} - -describe(`develop-static-entry`, () => { - test(`onPreRenderHTML can be used to replace headComponents`, done => { - global.plugins = [fakeStylesPlugin, reverseHeadersPlugin] - - DevelopStaticEntry(`/about/`, (_, html) => { - expect(html).toMatchSnapshot() - done() - }) - }) - - test(`onPreRenderHTML can be used to replace postBodyComponents`, done => { - global.plugins = [ - fakeComponentsPluginFactory(`Post`), - reverseBodyComponentsPluginFactory(`Post`), - ] - - DevelopStaticEntry(`/about/`, (_, html) => { - expect(html).toMatchSnapshot() - done() - }) - }) - - test(`onPreRenderHTML can be used to replace preBodyComponents`, done => { - global.plugins = [ - fakeComponentsPluginFactory(`Pre`), - reverseBodyComponentsPluginFactory(`Pre`), - ] - - DevelopStaticEntry(`/about/`, (_, html) => { - expect(html).toMatchSnapshot() - done() - }) - }) - - test(`onPreRenderHTML adds metatag note for development environment`, done => { - DevelopStaticEntry(`/about/`, (_, html) => { - expect(html).toContain( - `` - ) - done() - }) - }) - - test(`onPreRenderHTML adds metatag note for development environment after replaceHeadComponents`, done => { - global.plugins = [reverseHeadersPlugin] - - DevelopStaticEntry(`/about/`, (_, html) => { - expect(html).toContain( - `` - ) - done() - }) - }) -}) - -describe(`static-entry sanity checks`, () => { - beforeEach(() => { - global.__PATH_PREFIX__ = `` - global.__BASE_PATH__ = `` - global.__ASSET_PREFIX__ = `` - }) - - const methodsToCheck = [ - `replaceHeadComponents`, - `replacePreBodyComponents`, - `replacePostBodyComponents`, - ] - - methodsToCheck.forEach(methodName => { - test(`${methodName} can filter out null value`, done => { - const plugin = injectValuePlugin(`onPreRenderHTML`, methodName, null) - global.plugins = [plugin, checkNonEmptyHeadersPlugin] - - StaticEntry(`/about/`, (_, html) => { - done() - }) - }) - - test(`${methodName} can filter out null values`, done => { - const plugin = injectValuePlugin(`onPreRenderHTML`, methodName, [ - null, - null, - ]) - global.plugins = [plugin, checkNonEmptyHeadersPlugin] - - StaticEntry(`/about/`, (_, html) => { - done() - }) - }) - - test(`${methodName} can filter out empty array`, done => { - const plugin = injectValuePlugin(`onPreRenderHTML`, methodName, []) - global.plugins = [plugin, checkNonEmptyHeadersPlugin] - - StaticEntry(`/about/`, (_, html) => { - done() - }) - }) - - test(`${methodName} can filter out empty arrays`, done => { - const plugin = injectValuePlugin(`onPreRenderHTML`, methodName, [[], []]) - global.plugins = [plugin, checkNonEmptyHeadersPlugin] - - StaticEntry(`/about/`, (_, html) => { - done() - }) - }) - - test(`${methodName} can flatten arrays`, done => { - const plugin = injectValuePlugin(`onPreRenderHTML`, methodName, [ - , - , - , - [], - ]) - global.plugins = [plugin, checkNonEmptyHeadersPlugin] - - StaticEntry(`/about/`, (_, html) => { - done() - }) - }) - }) -}) - -describe(`static-entry`, () => { - beforeEach(() => { - global.__PATH_PREFIX__ = `` - global.__BASE_PATH__ = `` - }) - - test(`onPreRenderHTML can be used to replace headComponents`, done => { - global.plugins = [fakeStylesPlugin, reverseHeadersPlugin] - - StaticEntry(`/about/`, (_, html) => { - expect(html).toMatchSnapshot() - done() - }) - }) - - test(`onPreRenderHTML can be used to replace postBodyComponents`, done => { - global.plugins = [ - fakeComponentsPluginFactory(`Post`), - reverseBodyComponentsPluginFactory(`Post`), - ] - - StaticEntry(`/about/`, (_, html) => { - expect(html).toMatchSnapshot() - done() - }) - }) - - test(`onPreRenderHTML can be used to replace preBodyComponents`, done => { - global.plugins = [ - fakeComponentsPluginFactory(`Pre`), - reverseBodyComponentsPluginFactory(`Pre`), - ] - - StaticEntry(`/about/`, (_, html) => { - expect(html).toMatchSnapshot() - done() - }) - }) - - test(`onPreRenderHTML does not add metatag note for development environment`, done => { - StaticEntry(`/about/`, (_, html) => { - expect(html).not.toContain( - `` - ) - done() - }) - }) -}) - -describe(`sanitizeComponents`, () => { - let sanitizeComponents - - beforeEach(() => { - fs.readFileSync.mockImplementation(file => MOCK_FILE_INFO[file]) - sanitizeComponents = require(`../static-entry`).sanitizeComponents - }) - - it(`strips assetPrefix for manifest link`, () => { - global.__PATH_PREFIX__ = `https://gatsbyjs.org/blog` - global.__BASE_PATH__ = `/blog` - global.__ASSET_PREFIX__ = `https://gatsbyjs.org` - - const sanitizedComponents = sanitizeComponents([ - , - ]) - expect(sanitizedComponents[0].props.href).toBe(`/blog/manifest.webmanifest`) - }) -}) diff --git a/.cache/__tests__/strip-prefix.js b/.cache/__tests__/strip-prefix.js deleted file mode 100644 index 78fc19be1d..0000000000 --- a/.cache/__tests__/strip-prefix.js +++ /dev/null @@ -1,23 +0,0 @@ -const stripPrefix = require(`../strip-prefix`).default - -describe(`strip-prefix`, () => { - it(`strips a prefix`, () => { - expect(stripPrefix(`/foo/bar/`, `/foo`)).toBe(`/bar/`) - }) - - it(`strips first instance only`, () => { - expect(stripPrefix(`/foo/foo/bar/`, `/foo`)).toBe(`/foo/bar/`) - }) - - it(`ignores prefix appearing elsewhere in the string`, () => { - expect(stripPrefix(`/foo/bar/`, `bar`)).toBe(`/foo/bar/`) - }) - - it(`ignores a non-existent prefix`, () => { - expect(stripPrefix(`/bar`, `/foo`)).toBe(`/bar`) - }) - - it(`returns input str if no prefix is provided`, () => { - expect(stripPrefix(`/bar`)).toBe(`/bar`) - }) -}) diff --git a/.cache/api-runner-browser-plugins.js b/.cache/api-runner-browser-plugins.js deleted file mode 100644 index 75e686c674..0000000000 --- a/.cache/api-runner-browser-plugins.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = [{ - plugin: require('../node_modules/gatsby-remark-autolink-headers/gatsby-browser.js'), - options: {"plugins":[]}, - },{ - plugin: require('../node_modules/gatsby-plugin-offline/gatsby-browser.js'), - options: {"plugins":[]}, - },{ - plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'), - options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#1890FF","theme_color":"#1890FF","display":"minimal-ui","icon":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/images/favicon.png"}, - },{ - plugin: require('../node_modules/gatsby-plugin-catch-links/gatsby-browser.js'), - options: {"plugins":[]}, - },{ - plugin: require('../node_modules/gatsby-plugin-nprogress/gatsby-browser.js'), - options: {"plugins":[]}, - },{ - plugin: require('../node_modules/gatsby-plugin-layout/gatsby-browser.js'), - options: {"plugins":[],"component":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/layouts/layout.tsx"}, - },{ - plugin: require('../node_modules/gatsby-plugin-nprogress/gatsby-browser.js'), - options: {"plugins":[],"color":"#1890FF"}, - },{ - plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'), - options: {"plugins":[],"trackingId":"UA-148148901-7"}, - },{ - plugin: require('../node_modules/@antv/gatsby-theme-antv/gatsby-browser.js'), - options: {"plugins":[],"pathPrefix":"/l7","GATrackingId":"UA-148148901-7","theme":{"primary-color":"#722ED1"}}, - },{ - plugin: require('../gatsby-browser.js'), - options: {"plugins":[]}, - }] diff --git a/.cache/api-runner-browser.js b/.cache/api-runner-browser.js deleted file mode 100644 index 2dd5981615..0000000000 --- a/.cache/api-runner-browser.js +++ /dev/null @@ -1,61 +0,0 @@ -const plugins = require(`./api-runner-browser-plugins`) -const { - getResourcesForPathname, - getResourcesForPathnameSync, - getResourceURLsForPathname, - loadPage, - loadPageSync, -} = require(`./loader`).publicLoader - -exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => { - // Hooks for gatsby-cypress's API handler - if (process.env.CYPRESS_SUPPORT) { - if (window.___apiHandler) { - window.___apiHandler(api) - } else if (window.___resolvedAPIs) { - window.___resolvedAPIs.push(api) - } else { - window.___resolvedAPIs = [api] - } - } - - let results = plugins.map(plugin => { - if (!plugin.plugin[api]) { - return undefined - } - - // Deprecated April 2019. Use `loadPageSync` instead - args.getResourcesForPathnameSync = getResourcesForPathnameSync - // Deprecated April 2019. Use `loadPage` instead - args.getResourcesForPathname = getResourcesForPathname - args.getResourceURLsForPathname = getResourceURLsForPathname - args.loadPage = loadPage - args.loadPageSync = loadPageSync - - const result = plugin.plugin[api](args, plugin.options) - if (result && argTransform) { - args = argTransform({ args, result, plugin }) - } - return result - }) - - // Filter out undefined results. - results = results.filter(result => typeof result !== `undefined`) - - if (results.length > 0) { - return results - } else if (defaultReturn) { - return [defaultReturn] - } else { - return [] - } -} - -exports.apiRunnerAsync = (api, args, defaultReturn) => - plugins.reduce( - (previous, next) => - next.plugin[api] - ? previous.then(() => next.plugin[api](args, next.options)) - : previous, - Promise.resolve() - ) diff --git a/.cache/api-runner-ssr.js b/.cache/api-runner-ssr.js deleted file mode 100644 index 12121ee2a3..0000000000 --- a/.cache/api-runner-ssr.js +++ /dev/null @@ -1,64 +0,0 @@ -var plugins = [{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-react-helmet/gatsby-ssr'), - options: {"plugins":[]}, - },{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-remark-autolink-headers/gatsby-ssr'), - options: {"plugins":[]}, - },{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-offline/gatsby-ssr'), - options: {"plugins":[]}, - },{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-manifest/gatsby-ssr'), - options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#1890FF","theme_color":"#1890FF","display":"minimal-ui","icon":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/images/favicon.png"}, - },{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-layout/gatsby-ssr'), - options: {"plugins":[],"component":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/layouts/layout.tsx"}, - },{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-google-analytics/gatsby-ssr'), - options: {"plugins":[],"trackingId":"UA-148148901-7"}, - },{ - plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/gatsby-ssr'), - options: {"plugins":[],"pathPrefix":"/l7","GATrackingId":"UA-148148901-7","theme":{"primary-color":"#722ED1"}}, - }] -// During bootstrap, we write requires at top of this file which looks like: -// var plugins = [ -// { -// plugin: require("/path/to/plugin1/gatsby-ssr.js"), -// options: { ... }, -// }, -// { -// plugin: require("/path/to/plugin2/gatsby-ssr.js"), -// options: { ... }, -// }, -// ] - -const apis = require(`./api-ssr-docs`) - -// Run the specified API in any plugins that have implemented it -module.exports = (api, args, defaultReturn, argTransform) => { - if (!apis[api]) { - console.log(`This API doesn't exist`, api) - } - - // Run each plugin in series. - // eslint-disable-next-line no-undef - let results = plugins.map(plugin => { - if (!plugin.plugin[api]) { - return undefined - } - const result = plugin.plugin[api](args, plugin.options) - if (result && argTransform) { - args = argTransform({ args, result }) - } - return result - }) - - // Filter out undefined results. - results = results.filter(result => typeof result !== `undefined`) - - if (results.length > 0) { - return results - } else { - return [defaultReturn] - } -} diff --git a/.cache/api-ssr-docs.js b/.cache/api-ssr-docs.js deleted file mode 100644 index 62982142fb..0000000000 --- a/.cache/api-ssr-docs.js +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Object containing options defined in `gatsby-config.js` - * @typedef {object} pluginOptions - */ - -/** - * Replace the default server renderer. This is useful for integration with - * Redux, css-in-js libraries, etc. that need custom setups for server - * rendering. - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {function} $0.replaceBodyHTMLString Call this with the HTML string - * you render. **WARNING** if multiple plugins implement this API it's the - * last plugin that "wins". TODO implement an automated warning against this. - * @param {function} $0.setHeadComponents Takes an array of components as its - * first argument which are added to the `headComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setHtmlAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setBodyAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setPreBodyComponents Takes an array of components as its - * first argument which are added to the `preBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setPostBodyComponents Takes an array of components as its - * first argument which are added to the `postBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setBodyProps Takes an object of data which - * is merged with other body props and passed to `html.js` as `bodyProps`. - * @param {pluginOptions} pluginOptions - * @example - * // From gatsby-plugin-glamor - * const { renderToString } = require("react-dom/server") - * const inline = require("glamor-inline") - * - * exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => { - * const bodyHTML = renderToString(bodyComponent) - * const inlinedHTML = inline(bodyHTML) - * - * replaceBodyHTMLString(inlinedHTML) - * } - */ -exports.replaceRenderer = true - -/** - * Called after every page Gatsby server renders while building HTML so you can - * set head and body components to be rendered in your `html.js`. - * - * Gatsby does a two-pass render for HTML. It loops through your pages first - * rendering only the body and then takes the result body HTML string and - * passes it as the `body` prop to your `html.js` to complete the render. - * - * It's often handy to be able to send custom components to your `html.js`. - * For example, it's a very common pattern for React.js libraries that - * support server rendering to pull out data generated during the render to - * add to your HTML. - * - * Using this API over [`replaceRenderer`](#replaceRenderer) is preferable as - * multiple plugins can implement this API where only one plugin can take - * over server rendering. However, if your plugin requires taking over server - * rendering then that's the one to - * use - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {function} $0.setHeadComponents Takes an array of components as its - * first argument which are added to the `headComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setHtmlAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setBodyAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setPreBodyComponents Takes an array of components as its - * first argument which are added to the `preBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setPostBodyComponents Takes an array of components as its - * first argument which are added to the `postBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setBodyProps Takes an object of data which - * is merged with other body props and passed to `html.js` as `bodyProps`. - * @param {pluginOptions} pluginOptions - * @example - * const { Helmet } = require("react-helmet") - * - * exports.onRenderBody = ( - * { setHeadComponents, setHtmlAttributes, setBodyAttributes }, - * pluginOptions - * ) => { - * const helmet = Helmet.renderStatic() - * setHtmlAttributes(helmet.htmlAttributes.toComponent()) - * setBodyAttributes(helmet.bodyAttributes.toComponent()) - * setHeadComponents([ - * helmet.title.toComponent(), - * helmet.link.toComponent(), - * helmet.meta.toComponent(), - * helmet.noscript.toComponent(), - * helmet.script.toComponent(), - * helmet.style.toComponent(), - * ]) - * } - */ -exports.onRenderBody = true - -/** - * Called after every page Gatsby server renders while building HTML so you can - * replace head components to be rendered in your `html.js`. This is useful if - * you need to reorder scripts or styles added by other plugins. - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {Array} $0.getHeadComponents Returns the current `headComponents` array. - * @param {function} $0.replaceHeadComponents Takes an array of components as its - * first argument which replace the `headComponents` array which is passed - * to the `html.js` component. **WARNING** if multiple plugins implement this - * API it's the last plugin that "wins". - * @param {Array} $0.getPreBodyComponents Returns the current `preBodyComponents` array. - * @param {function} $0.replacePreBodyComponents Takes an array of components as its - * first argument which replace the `preBodyComponents` array which is passed - * to the `html.js` component. **WARNING** if multiple plugins implement this - * API it's the last plugin that "wins". - * @param {Array} $0.getPostBodyComponents Returns the current `postBodyComponents` array. - * @param {function} $0.replacePostBodyComponents Takes an array of components as its - * first argument which replace the `postBodyComponents` array which is passed - * to the `html.js` component. **WARNING** if multiple plugins implement this - * API it's the last plugin that "wins". - * @param {pluginOptions} pluginOptions - * @example - * // Move Typography.js styles to the top of the head section so they're loaded first. - * exports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => { - * const headComponents = getHeadComponents() - * headComponents.sort((x, y) => { - * if (x.key === 'TypographyStyle') { - * return -1 - * } else if (y.key === 'TypographyStyle') { - * return 1 - * } - * return 0 - * }) - * replaceHeadComponents(headComponents) - * } - */ -exports.onPreRenderHTML = true - -/** - * Allow a plugin to wrap the page element. - * - * This is useful for setting wrapper components around pages that won't get - * unmounted on page changes. For setting Provider components, use [wrapRootElement](#wrapRootElement). - * - * _Note:_ - * There is an equivalent hook in Gatsby's [Browser API](/docs/browser-apis/#wrapPageElement). - * It is recommended to use both APIs together. - * For example usage, check out [Using i18n](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n). - * @param {object} $0 - * @param {ReactNode} $0.element The "Page" React Element built by Gatsby. - * @param {object} $0.props Props object used by page. - * @param {pluginOptions} pluginOptions - * @returns {ReactNode} Wrapped element - * @example - * const React = require("react") - * const Layout = require("./src/components/layout").default - * - * exports.wrapPageElement = ({ element, props }) => { - * // props provide same data to Layout as Page element will get - * // including location, data, etc - you don't need to pass it - * return {element} - * } - */ -exports.wrapPageElement = true - -/** - * Allow a plugin to wrap the root element. - * - * This is useful to set up any Provider components that will wrap your application. - * For setting persistent UI elements around pages use [wrapPageElement](#wrapPageElement). - * - * _Note:_ - * There is an equivalent hook in Gatsby's [Browser API](/docs/browser-apis/#wrapRootElement). - * It is recommended to use both APIs together. - * For example usage, check out [Using redux](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-redux). - * @param {object} $0 - * @param {ReactNode} $0.element The "Root" React Element built by Gatsby. - * @param {pluginOptions} pluginOptions - * @returns {ReactNode} Wrapped element - * @example - * const React = require("react") - * const { Provider } = require("react-redux") - * - * const createStore = require("./src/state/createStore") - * const store = createStore() - * - * exports.wrapRootElement = ({ element }) => { - * return ( - * - * {element} - * - * ) - * } - */ -exports.wrapRootElement = true diff --git a/.cache/app.js b/.cache/app.js deleted file mode 100644 index f0c2b5c476..0000000000 --- a/.cache/app.js +++ /dev/null @@ -1,72 +0,0 @@ -import React from "react" -import ReactDOM from "react-dom" -import domReady from "@mikaelkristiansson/domready" - -import socketIo from "./socketIo" -import emitter from "./emitter" -import { apiRunner, apiRunnerAsync } from "./api-runner-browser" -import { setLoader, publicLoader } from "./loader" -import DevLoader from "./dev-loader" -import syncRequires from "./sync-requires" -// Generated during bootstrap -import matchPaths from "./match-paths.json" - -window.___emitter = emitter - -const loader = new DevLoader(syncRequires, matchPaths) -setLoader(loader) -loader.setApiRunner(apiRunner) - -window.___loader = publicLoader - -// Let the site/plugins run code very early. -apiRunnerAsync(`onClientEntry`).then(() => { - // Hook up the client to socket.io on server - const socket = socketIo() - if (socket) { - socket.on(`reload`, () => { - window.location.reload() - }) - } - - /** - * Service Workers are persistent by nature. They stick around, - * serving a cached version of the site if they aren't removed. - * This is especially frustrating when you need to test the - * production build on your local machine. - * - * Let's warn if we find service workers in development. - */ - if (`serviceWorker` in navigator) { - navigator.serviceWorker.getRegistrations().then(registrations => { - if (registrations.length > 0) - console.warn( - `Warning: found one or more service workers present.`, - `If your site isn't behaving as expected, you might want to remove these.`, - registrations - ) - }) - } - - const rootElement = document.getElementById(`___gatsby`) - - const renderer = apiRunner( - `replaceHydrateFunction`, - undefined, - ReactDOM.render - )[0] - - Promise.all([ - loader.loadPage(`/dev-404-page/`), - loader.loadPage(`/404.html`), - loader.loadPage(window.location.pathname), - ]).then(() => { - const preferDefault = m => (m && m.default) || m - let Root = preferDefault(require(`./root`)) - domReady(() => { - renderer(, rootElement, () => { - apiRunner(`onInitialClientRender`) - }) - }) - }) -}) diff --git a/.cache/async-requires.js b/.cache/async-requires.js deleted file mode 100644 index 8ab3a403ea..0000000000 --- a/.cache/async-requires.js +++ /dev/null @@ -1,13 +0,0 @@ -// prefer default export if available -const preferDefault = m => m && m.default || m - -exports.components = { - "component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/templates/document.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx" */), - "component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/templates/example.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx" */), - "component---cache-dev-404-page-js": () => import("dev-404-page.js" /* webpackChunkName: "component---cache-dev-404-page-js" */), - "component---node-modules-antv-gatsby-theme-antv-site-pages-index-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/pages/index.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-pages-index-tsx" */), - "component---node-modules-antv-gatsby-theme-antv-site-pages-404-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/pages/404.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-pages-404-tsx" */), - "component---site-pages-index-en-tsx": () => import("../site/pages/index.en.tsx" /* webpackChunkName: "component---site-pages-index-en-tsx" */), - "component---site-pages-index-zh-tsx": () => import("../site/pages/index.zh.tsx" /* webpackChunkName: "component---site-pages-index-zh-tsx" */) -} - diff --git a/.cache/babelState.json b/.cache/babelState.json deleted file mode 100644 index 64d550db00..0000000000 --- a/.cache/babelState.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "stages": { - "develop": { - "plugins": [ - { - "name": "babel-plugin-import", - "options": { - "libraryName": "antd", - "libraryDirectory": "es", - "style": true - } - } - ], - "presets": [ - { - "name": "/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-typescript/node_modules/@babel/preset-typescript/lib/index.js", - "options": { - "plugins": [] - } - } - ], - "options": { - "cacheDirectory": true, - "sourceType": "unambiguous" - } - }, - "develop-html": { - "plugins": [ - { - "name": "babel-plugin-import", - "options": { - "libraryName": "antd", - "libraryDirectory": "es", - "style": true - } - } - ], - "presets": [ - { - "name": "/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-typescript/node_modules/@babel/preset-typescript/lib/index.js", - "options": { - "plugins": [] - } - } - ], - "options": { - "cacheDirectory": true, - "sourceType": "unambiguous" - } - }, - "build-html": { - "plugins": [ - { - "name": "babel-plugin-import", - "options": { - "libraryName": "antd", - "libraryDirectory": "es", - "style": true - } - } - ], - "presets": [ - { - "name": "/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-typescript/node_modules/@babel/preset-typescript/lib/index.js", - "options": { - "plugins": [] - } - } - ], - "options": { - "cacheDirectory": true, - "sourceType": "unambiguous" - } - }, - "build-javascript": { - "plugins": [ - { - "name": "babel-plugin-import", - "options": { - "libraryName": "antd", - "libraryDirectory": "es", - "style": true - } - } - ], - "presets": [ - { - "name": "/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-typescript/node_modules/@babel/preset-typescript/lib/index.js", - "options": { - "plugins": [] - } - } - ], - "options": { - "cacheDirectory": true, - "sourceType": "unambiguous" - } - } - }, - "browserslist": [ - ">0.25%", - "not dead" - ] -} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json b/.cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json deleted file mode 100644 index 130fde67b1..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-c2b718c76cd6918b08bff6ee4b3a63ea-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json b/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json deleted file mode 100644 index ef5cfad5dc..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-99b5b2f90b0432fb92044e231041ffca-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json b/.cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json deleted file mode 100644 index 0de8ae1163..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-c2b718c76cd6918b08bff6ee4b3a63ea-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json b/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json deleted file mode 100644 index a5c47f2711..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-b203d64bdde854a7c4141aaf3bd814db-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-1a79a63948be948cfacc80e4c062b2ef.json b/.cache/caches/gatsby-transformer-remark/diskstore-1a79a63948be948cfacc80e4c062b2ef.json deleted file mode 100644 index bba81a3a62..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-1a79a63948be948cfacc80e4c062b2ef.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-440de581fed1a931f1963c1d957506b6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-1cf585fc8b2c0583fd712c2c11334ba7.json b/.cache/caches/gatsby-transformer-remark/diskstore-1cf585fc8b2c0583fd712c2c11334ba7.json deleted file mode 100644 index ac1092a7c1..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-1cf585fc8b2c0583fd712c2c11334ba7.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-f47fd0b2c242daaaeea802a1c34eacee-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-1def650c6cf8cb89db3185cbc97d09a0.json b/.cache/caches/gatsby-transformer-remark/diskstore-1def650c6cf8cb89db3185cbc97d09a0.json deleted file mode 100644 index 745afd959c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-1def650c6cf8cb89db3185cbc97d09a0.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-440de581fed1a931f1963c1d957506b6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-20649dc8fd4cdde49b1d9ea0c26371b2.json b/.cache/caches/gatsby-transformer-remark/diskstore-20649dc8fd4cdde49b1d9ea0c26371b2.json deleted file mode 100644 index cae941ada6..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-20649dc8fd4cdde49b1d9ea0c26371b2.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-b1a6eb4a5fb92e03f562537f31f11c68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"h2","properties":{"id":"数据"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%95%B0%E6%8D%AE","aria-label":"数据 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"数据","position":{"start":{"line":2,"column":4,"offset":4},"end":{"line":2,"column":6,"offset":6}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":6,"offset":6}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"目前L7支持的数据格式有GeoJson,CSV,JSon Image","position":{"start":{"line":4,"column":1,"offset":8},"end":{"line":4,"column":35,"offset":42}}}],"position":{"start":{"line":4,"column":1,"offset":8},"end":{"line":4,"column":35,"offset":42}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"GeoJSON 支持点、线、面,等所有的空间数据格式。","position":{"start":{"line":6,"column":1,"offset":44},"end":{"line":6,"column":28,"offset":71}}},{"type":"raw","value":"
","position":{"start":{"line":6,"column":28,"offset":71},"end":{"line":6,"column":34,"offset":77}}},{"type":"text","value":"CSV 支持,点,线段,弧线的支持。","position":{"start":{"line":6,"column":34,"offset":77},"end":{"line":6,"column":52,"offset":95}}},{"type":"raw","value":"
","position":{"start":{"line":6,"column":52,"offset":95},"end":{"line":6,"column":58,"offset":101}}},{"type":"text","value":"JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。","position":{"start":{"line":6,"column":58,"offset":101},"end":{"line":6,"column":91,"offset":134}}}],"position":{"start":{"line":6,"column":1,"offset":44},"end":{"line":6,"column":91,"offset":134}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"geojson"},"children":[{"type":"element","tagName":"a","properties":{"href":"#geojson","aria-label":"geojson permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"GeoJSON","position":{"start":{"line":9,"column":4,"offset":140},"end":{"line":9,"column":11,"offset":147}}}],"position":{"start":{"line":9,"column":1,"offset":137},"end":{"line":9,"column":11,"offset":147}}},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。","position":{"start":{"line":11,"column":3,"offset":151},"end":{"line":11,"column":128,"offset":276}}}],"position":{"start":{"line":11,"column":3,"offset":151},"end":{"line":11,"column":128,"offset":276}}},{"type":"text","value":"\n"}],"position":{"start":{"line":11,"column":1,"offset":149},"end":{"line":11,"column":128,"offset":276}}},{"type":"text","value":"\n"},{"type":"raw","value":"
{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {},\n      \"geometry\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n          [\n            [110.478515625, 32.76880048488168],\n            [117.68554687499999, 32.76880048488168],\n            [117.68554687499999, 37.64903402157866],\n            [110.478515625, 37.64903402157866],\n            [110.478515625, 32.76880048488168]\n          ]\n        ]\n      }\n    }\n  ]\n}\n
","position":{"start":{"line":15,"column":1,"offset":280},"end":{"line":52,"column":4,"offset":980}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"地理统计分析工具"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%B0%E7%90%86%E7%BB%9F%E8%AE%A1%E5%88%86%E6%9E%90%E5%B7%A5%E5%85%B7","aria-label":"地理统计分析工具 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"地理统计分析工具","position":{"start":{"line":54,"column":4,"offset":985},"end":{"line":54,"column":12,"offset":993}}}],"position":{"start":{"line":54,"column":1,"offset":982},"end":{"line":54,"column":12,"offset":993}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"http://turfjs.org/","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"turfjs","position":{"start":{"line":55,"column":2,"offset":995},"end":{"line":55,"column":8,"offset":1001}}}],"position":{"start":{"line":55,"column":1,"offset":994},"end":{"line":55,"column":29,"offset":1022}}},{"type":"text","value":":  地理数据计算,处理,统计,分析的Javascript 库","position":{"start":{"line":55,"column":29,"offset":1022},"end":{"line":55,"column":60,"offset":1053}}}],"position":{"start":{"line":55,"column":1,"offset":994},"end":{"line":55,"column":60,"offset":1053}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"在线工具"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%A8%E7%BA%BF%E5%B7%A5%E5%85%B7","aria-label":"在线工具 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"在线工具","position":{"start":{"line":57,"column":4,"offset":1058},"end":{"line":57,"column":8,"offset":1062}}}],"position":{"start":{"line":57,"column":1,"offset":1055},"end":{"line":57,"column":8,"offset":1062}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"http://geojson.io/","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"http://geojson.io/","position":{"start":{"line":59,"column":2,"offset":1065},"end":{"line":59,"column":20,"offset":1083}}}],"position":{"start":{"line":59,"column":1,"offset":1064},"end":{"line":59,"column":41,"offset":1104}}},{"type":"text","value":"    可以在线查看,绘制,修改GeoJSON数据","position":{"start":{"line":59,"column":41,"offset":1104},"end":{"line":59,"column":66,"offset":1129}}}],"position":{"start":{"line":59,"column":1,"offset":1064},"end":{"line":59,"column":66,"offset":1129}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://mapshaper.org/","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"https://mapshaper.org/","position":{"start":{"line":61,"column":2,"offset":1132},"end":{"line":61,"column":24,"offset":1154}}}],"position":{"start":{"line":61,"column":1,"offset":1131},"end":{"line":61,"column":49,"offset":1179}}},{"type":"text","value":"  可以查看较大的geojson,还能够简化GeoJSON数据","position":{"start":{"line":61,"column":49,"offset":1179},"end":{"line":61,"column":80,"offset":1210}}}],"position":{"start":{"line":61,"column":1,"offset":1131},"end":{"line":61,"column":80,"offset":1210}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":62,"column":1,"offset":1211}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-29dceee5020ad0891c27d8c2482f1e64.json b/.cache/caches/gatsby-transformer-remark/diskstore-29dceee5020ad0891c27d8c2482f1e64.json deleted file mode 100644 index 2bbc424efa..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-29dceee5020ad0891c27d8c2482f1e64.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-c33b8eb118a2549971f1a2859bd8a790-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-2b8cd1df4f8a6941bff4108301b5d6a9.json b/.cache/caches/gatsby-transformer-remark/diskstore-2b8cd1df4f8a6941bff4108301b5d6a9.json deleted file mode 100644 index 6cde6d3aef..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-2b8cd1df4f8a6941bff4108301b5d6a9.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-99b5b2f90b0432fb92044e231041ffca-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-2c713f7ba9a30ac45cbadf6d86d5d544.json b/.cache/caches/gatsby-transformer-remark/diskstore-2c713f7ba9a30ac45cbadf6d86d5d544.json deleted file mode 100644 index 0f4c17db0c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-2c713f7ba9a30ac45cbadf6d86d5d544.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"L7 地理空间可视化设计语言","position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":2,"column":1,"offset":15}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-30112668ec3b030a16ab70ed8557e968.json b/.cache/caches/gatsby-transformer-remark/diskstore-30112668ec3b030a16ab70ed8557e968.json deleted file mode 100644 index d19b0ec386..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-30112668ec3b030a16ab70ed8557e968.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-2f14f784391b30b18dddba7eaa548883-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-308215140d91d466921fde8b44e96c70.json b/.cache/caches/gatsby-transformer-remark/diskstore-308215140d91d466921fde8b44e96c70.json deleted file mode 100644 index 7c6161d54c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-308215140d91d466921fde8b44e96c70.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-b627c832a1f77c6bd67b3f67116e04eb-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-335fc52df6558698584a4c58a93133dc.json b/.cache/caches/gatsby-transformer-remark/diskstore-335fc52df6558698584a4c58a93133dc.json deleted file mode 100644 index 7db51c7a08..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-335fc52df6558698584a4c58a93133dc.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

内容

"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json b/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json deleted file mode 100644 index e55bb68b8a..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"内容","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":4}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json b/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json deleted file mode 100644 index 20cc24e2e5..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json b/.cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json deleted file mode 100644 index 1ef21662e7..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-781c0a32942295837c2990e69f6d666a-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json b/.cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json deleted file mode 100644 index 2b7943c9f5..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-f47fd0b2c242daaaeea802a1c34eacee-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json b/.cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json deleted file mode 100644 index 5884557993..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-26a156bc9fc6a07eb205a6a3596b496d-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json b/.cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json deleted file mode 100644 index 5b4941f4a4..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-db2afa837fc242d71bff6d1c467bb7be-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json b/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json deleted file mode 100644 index 786382ca1a..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"L7 地理空间可视化设计语言","position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":2,"column":1,"offset":15}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json b/.cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json deleted file mode 100644 index 4f7b332a47..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-781c0a32942295837c2990e69f6d666a-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json b/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json deleted file mode 100644 index 946c49852c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-d1a5a1e053cc8aaf5e0018566456ceec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-49025698b564146544fecd0e3e64cd6a.json b/.cache/caches/gatsby-transformer-remark/diskstore-49025698b564146544fecd0e3e64cd6a.json deleted file mode 100644 index f6d7395526..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-49025698b564146544fecd0e3e64cd6a.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-51cffb57f20c685f94203902c79f04c6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":2}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-4959c881d2fccc57dea5cba657223041.json b/.cache/caches/gatsby-transformer-remark/diskstore-4959c881d2fccc57dea5cba657223041.json deleted file mode 100644 index 077cbf776e..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-4959c881d2fccc57dea5cba657223041.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-99b5b2f90b0432fb92044e231041ffca-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-5197dec8e7e8b24628292c6110a3585b.json b/.cache/caches/gatsby-transformer-remark/diskstore-5197dec8e7e8b24628292c6110a3585b.json deleted file mode 100644 index 95ee97ef69..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-5197dec8e7e8b24628292c6110a3585b.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-a4fe772925611fe2511fd096da3801f0-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-51d0f3b693c1d063f395570395293fb4.json b/.cache/caches/gatsby-transformer-remark/diskstore-51d0f3b693c1d063f395570395293fb4.json deleted file mode 100644 index 6fa1b06512..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-51d0f3b693c1d063f395570395293fb4.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-4e775806f930bb554f175748236303d7-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-57199a69f7efd5decc9f72929e6eaab6.json b/.cache/caches/gatsby-transformer-remark/diskstore-57199a69f7efd5decc9f72929e6eaab6.json deleted file mode 100644 index 98b8efb30e..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-57199a69f7efd5decc9f72929e6eaab6.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-0b8b19ff19f6a64f7b2cae67200ccd88-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-57508cdf95ebc59c4397e496ddb41c25.json b/.cache/caches/gatsby-transformer-remark/diskstore-57508cdf95ebc59c4397e496ddb41c25.json deleted file mode 100644 index 867cf11dbc..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-57508cdf95ebc59c4397e496ddb41c25.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-8b41ef08d386d48da6524752db1281ec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-57b56149d19b6dd403afccc6bfe3ffd1.json b/.cache/caches/gatsby-transformer-remark/diskstore-57b56149d19b6dd403afccc6bfe3ffd1.json deleted file mode 100644 index df73d6c27d..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-57b56149d19b6dd403afccc6bfe3ffd1.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-b627c832a1f77c6bd67b3f67116e04eb-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-5834efc3cd0e551cbfd90070db9090f7.json b/.cache/caches/gatsby-transformer-remark/diskstore-5834efc3cd0e551cbfd90070db9090f7.json deleted file mode 100644 index 20e1a80de4..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-5834efc3cd0e551cbfd90070db9090f7.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-a4fe772925611fe2511fd096da3801f0-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-5a894e6dcf41aaf38dcfe7c4ef24bb6c.json b/.cache/caches/gatsby-transformer-remark/diskstore-5a894e6dcf41aaf38dcfe7c4ef24bb6c.json deleted file mode 100644 index a27eeec1e3..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-5a894e6dcf41aaf38dcfe7c4ef24bb6c.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-d1a5a1e053cc8aaf5e0018566456ceec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Marker 地图标注 目前只支持2D dom标注","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":26,"offset":26},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":26,"offset":26},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#构造函数","title":null,"children":[],"data":{"hProperties":{"aria-label":"构造函数 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"构造函数","position":{"start":{"line":5,"column":4,"offset":32},"end":{"line":5,"column":8,"offset":36},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":29},"end":{"line":5,"column":8,"offset":36},"indent":[]},"data":{"id":"构造函数","htmlAttributes":{"id":"构造函数"},"hProperties":{"id":"构造函数"}}},{"type":"paragraph","children":[{"type":"text","value":"Marker","position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":7,"offset":43},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":6,"column":7,"offset":43},"end":{"line":6,"column":13,"offset":49},"indent":[]}},{"type":"html","value":"const Marker = new L7.Marker(option)","position":{"start":{"line":6,"column":13,"offset":49},"end":{"line":6,"column":51,"offset":87},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":51,"offset":87},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#option","title":null,"children":[],"data":{"hProperties":{"aria-label":"option permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"option","position":{"start":{"line":9,"column":6,"offset":95},"end":{"line":9,"column":12,"offset":101},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":90},"end":{"line":9,"column":12,"offset":101},"indent":[]},"data":{"id":"option","htmlAttributes":{"id":"option"},"hProperties":{"id":"option"}}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"color        ","position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":16,"offset":118},"indent":[]}},{"type":"html","value":"string","position":{"start":{"line":11,"column":16,"offset":118},"end":{"line":11,"column":25,"offset":127},"indent":[]}},{"type":"text","value":"   ","position":{"start":{"line":11,"column":25,"offset":127},"end":{"line":11,"column":28,"offset":130},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32","alt":"map-marker.png","position":{"start":{"line":11,"column":28,"offset":130},"end":{"line":11,"column":264,"offset":366},"indent":[]}},{"type":"text","value":" 设置默认marker的颜色","position":{"start":{"line":11,"column":264,"offset":366},"end":{"line":11,"column":278,"offset":380},"indent":[]}}],"position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":278,"offset":380},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":11,"column":278,"offset":380},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"element    ","position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":14,"offset":394},"indent":[]}},{"type":"html","value":"Dom|string","position":{"start":{"line":12,"column":14,"offset":394},"end":{"line":12,"column":26,"offset":406},"indent":[]}},{"type":"text","value":"    自定义marker Dom节点,可以是dom实例,也可以是dom id","position":{"start":{"line":12,"column":26,"offset":406},"end":{"line":12,"column":65,"offset":445},"indent":[]}}],"position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":65,"offset":445},"indent":[]}}],"position":{"start":{"line":12,"column":1,"offset":381},"end":{"line":12,"column":65,"offset":445},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"anchor     ","position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":14,"offset":459},"indent":[]}},{"type":"html","value":"string","position":{"start":{"line":13,"column":14,"offset":459},"end":{"line":13,"column":22,"offset":467},"indent":[]}},{"type":"text","value":"  锚点位置  支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right","position":{"start":{"line":13,"column":22,"offset":467},"end":{"line":13,"column":135,"offset":580},"indent":[]}}],"position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":135,"offset":580},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":446},"end":{"line":13,"column":135,"offset":580},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"offset    ","position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":13,"offset":593},"indent":[]}},{"type":"html","value":"Array","position":{"start":{"line":14,"column":13,"offset":593},"end":{"line":14,"column":20,"offset":600},"indent":[]}},{"type":"text","value":"  偏移量 ","position":{"start":{"line":14,"column":20,"offset":600},"end":{"line":14,"column":26,"offset":606},"indent":[]}},{"type":"linkReference","identifier":" 0, 0 ","label":" 0, 0 ","referenceType":"shortcut","children":[{"type":"text","value":" 0, 0 ","position":{"start":{"line":14,"column":27,"offset":607},"end":{"line":14,"column":33,"offset":613},"indent":[]}}],"position":{"start":{"line":14,"column":26,"offset":606},"end":{"line":14,"column":34,"offset":614},"indent":[]}},{"type":"text","value":" 分别表示 X, Y 的偏移量","position":{"start":{"line":14,"column":34,"offset":614},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":581},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":14,"column":49,"offset":629},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"方法","position":{"start":{"line":17,"column":4,"offset":635},"end":{"line":17,"column":6,"offset":637},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":632},"end":{"line":17,"column":6,"offset":637},"indent":[]},"data":{"id":"方法","htmlAttributes":{"id":"方法"},"hProperties":{"id":"方法"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"setlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setLnglat","position":{"start":{"line":19,"column":6,"offset":644},"end":{"line":19,"column":15,"offset":653},"indent":[]}}],"position":{"start":{"line":19,"column":1,"offset":639},"end":{"line":19,"column":15,"offset":653},"indent":[]},"data":{"id":"setlnglat","htmlAttributes":{"id":"setlnglat"},"hProperties":{"id":"setlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"设置marker经纬度位置","position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#addto","title":null,"children":[],"data":{"hProperties":{"aria-label":"addto permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"addTo","position":{"start":{"line":22,"column":6,"offset":674},"end":{"line":22,"column":11,"offset":679},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":669},"end":{"line":22,"column":11,"offset":679},"indent":[]},"data":{"id":"addto","htmlAttributes":{"id":"addto"},"hProperties":{"id":"addto"}}},{"type":"paragraph","children":[{"type":"text","value":"将marker添加到地图Scene","position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697},"indent":[]}}],"position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#remove","title":null,"children":[],"data":{"hProperties":{"aria-label":"remove permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"remove","position":{"start":{"line":25,"column":6,"offset":704},"end":{"line":25,"column":12,"offset":710},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":699},"end":{"line":25,"column":12,"offset":710},"indent":[]},"data":{"id":"remove","htmlAttributes":{"id":"remove"},"hProperties":{"id":"remove"}}},{"type":"paragraph","children":[{"type":"text","value":"移除marker","position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719},"indent":[]}}],"position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getelement","title":null,"children":[],"data":{"hProperties":{"aria-label":"getelement permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getElement","position":{"start":{"line":28,"column":6,"offset":726},"end":{"line":28,"column":16,"offset":736},"indent":[]}}],"position":{"start":{"line":28,"column":1,"offset":721},"end":{"line":28,"column":16,"offset":736},"indent":[]},"data":{"id":"getelement","htmlAttributes":{"id":"getelement"},"hProperties":{"id":"getelement"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker dom Element","position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757},"indent":[]}}],"position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLngLat","position":{"start":{"line":31,"column":6,"offset":764},"end":{"line":31,"column":15,"offset":773},"indent":[]}}],"position":{"start":{"line":31,"column":1,"offset":759},"end":{"line":31,"column":15,"offset":773},"indent":[]},"data":{"id":"getlnglat","htmlAttributes":{"id":"getlnglat"},"hProperties":{"id":"getlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker经纬度坐标","position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787},"indent":[]}}],"position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#togglepopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"togglepopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"togglePopup","position":{"start":{"line":34,"column":6,"offset":794},"end":{"line":34,"column":17,"offset":805},"indent":[]}}],"position":{"start":{"line":34,"column":1,"offset":789},"end":{"line":34,"column":17,"offset":805},"indent":[]},"data":{"id":"togglepopup","htmlAttributes":{"id":"togglepopup"},"hProperties":{"id":"togglepopup"}}},{"type":"paragraph","children":[{"type":"text","value":"开启或者关闭marker弹出框","position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821},"indent":[]}}],"position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setpopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPopup","position":{"start":{"line":37,"column":6,"offset":828},"end":{"line":37,"column":14,"offset":836},"indent":[]}}],"position":{"start":{"line":37,"column":1,"offset":823},"end":{"line":37,"column":14,"offset":836},"indent":[]},"data":{"id":"setpopup","htmlAttributes":{"id":"setpopup"},"hProperties":{"id":"setpopup"}}},{"type":"paragraph","children":[{"type":"text","value":"为marker设置popup","position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851},"indent":[]}}],"position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getpopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"getpopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getPopup","position":{"start":{"line":40,"column":6,"offset":858},"end":{"line":40,"column":14,"offset":866},"indent":[]}}],"position":{"start":{"line":40,"column":1,"offset":853},"end":{"line":40,"column":14,"offset":866},"indent":[]},"data":{"id":"getpopup","htmlAttributes":{"id":"getpopup"},"hProperties":{"id":"getpopup"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker弹出框","position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#示例代码","title":null,"children":[],"data":{"hProperties":{"aria-label":"示例代码 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"示例代码","position":{"start":{"line":44,"column":4,"offset":884},"end":{"line":44,"column":8,"offset":888},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":881},"end":{"line":44,"column":8,"offset":888},"indent":[]},"data":{"id":"示例代码","htmlAttributes":{"id":"示例代码"},"hProperties":{"id":"示例代码"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#默认marker","title":null,"children":[],"data":{"hProperties":{"aria-label":"默认marker permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"默认Marker","position":{"start":{"line":46,"column":6,"offset":895},"end":{"line":46,"column":14,"offset":903},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":890},"end":{"line":46,"column":14,"offset":903},"indent":[]},"data":{"id":"默认marker","htmlAttributes":{"id":"默认marker"},"hProperties":{"id":"默认marker"}}},{"type":"paragraph","children":[{"type":"text","value":"**","position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":3,"offset":906},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":47,"column":3,"offset":906},"end":{"line":47,"column":9,"offset":912},"indent":[]}},{"type":"html","value":"const marker = new L7.Marker({color:'blue'})","position":{"start":{"line":47,"column":9,"offset":912},"end":{"line":47,"column":56,"offset":959},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":56,"offset":959},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#自定义marker","title":null,"children":[],"data":{"hProperties":{"aria-label":"自定义marker permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"自定义Marker","position":{"start":{"line":50,"column":6,"offset":967},"end":{"line":50,"column":15,"offset":976},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":962},"end":{"line":50,"column":15,"offset":976},"indent":[]},"data":{"id":"自定义marker","htmlAttributes":{"id":"自定义marker"},"hProperties":{"id":"自定义marker"}}},{"type":"html","lang":"javascript","meta":null,"value":"
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat([data[i].x * 1, data[i].y])\n  .addTo(scene);\n
","position":{"start":{"line":52,"column":1,"offset":978},"end":{"line":62,"column":4,"offset":1281},"indent":[1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#设置-popup","title":null,"children":[],"data":{"hProperties":{"aria-label":"设置 popup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"设置 popup","position":{"start":{"line":65,"column":6,"offset":1289},"end":{"line":65,"column":14,"offset":1297},"indent":[]}}],"position":{"start":{"line":65,"column":1,"offset":1284},"end":{"line":65,"column":14,"offset":1297},"indent":[]},"data":{"id":"设置-popup","htmlAttributes":{"id":"设置-popup"},"hProperties":{"id":"设置-popup"}}},{"type":"html","lang":"javascript","meta":null,"value":"
var popup = new L7.Popup({\n  anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat(item.coordinates)\n  .setPopup(popup)\n  .addTo(scene);\n
","position":{"start":{"line":67,"column":1,"offset":1299},"end":{"line":77,"column":4,"offset":1499},"indent":[1,1,1,1,1,1,1,1,1,1]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":80,"column":1,"offset":1502}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-5aa0c32748bae2a74e08828fed4fd3a6.json b/.cache/caches/gatsby-transformer-remark/diskstore-5aa0c32748bae2a74e08828fed4fd3a6.json deleted file mode 100644 index aa06d062f7..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-5aa0c32748bae2a74e08828fed4fd3a6.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-d1a5a1e053cc8aaf5e0018566456ceec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Marker 地图标注 目前只支持2D dom标注","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":26,"offset":26}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":26,"offset":26}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"构造函数"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0","aria-label":"构造函数 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"构造函数","position":{"start":{"line":5,"column":4,"offset":32},"end":{"line":5,"column":8,"offset":36}}}],"position":{"start":{"line":5,"column":1,"offset":29},"end":{"line":5,"column":8,"offset":36}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Marker","position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":7,"offset":43}}},{"type":"raw","value":"
","position":{"start":{"line":6,"column":7,"offset":43},"end":{"line":6,"column":13,"offset":49}}},{"type":"raw","value":"const Marker = new L7.Marker(option)","position":{"start":{"line":6,"column":13,"offset":49},"end":{"line":6,"column":51,"offset":87}}}],"position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":51,"offset":87}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"option"},"children":[{"type":"element","tagName":"a","properties":{"href":"#option","aria-label":"option permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"option","position":{"start":{"line":9,"column":6,"offset":95},"end":{"line":9,"column":12,"offset":101}}}],"position":{"start":{"line":9,"column":1,"offset":90},"end":{"line":9,"column":12,"offset":101}}},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"color        ","position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":16,"offset":118}}},{"type":"raw","value":"string","position":{"start":{"line":11,"column":16,"offset":118},"end":{"line":11,"column":25,"offset":127}}},{"type":"text","value":"   ","position":{"start":{"line":11,"column":25,"offset":127},"end":{"line":11,"column":28,"offset":130}}},{"type":"element","tagName":"img","properties":{"src":"https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32","alt":"map-marker.png"},"children":[],"position":{"start":{"line":11,"column":28,"offset":130},"end":{"line":11,"column":264,"offset":366}}},{"type":"text","value":" 设置默认marker的颜色","position":{"start":{"line":11,"column":264,"offset":366},"end":{"line":11,"column":278,"offset":380}}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":11,"column":278,"offset":380}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"element    ","position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":14,"offset":394}}},{"type":"raw","value":"Dom|string","position":{"start":{"line":12,"column":14,"offset":394},"end":{"line":12,"column":26,"offset":406}}},{"type":"text","value":"    自定义marker Dom节点,可以是dom实例,也可以是dom id","position":{"start":{"line":12,"column":26,"offset":406},"end":{"line":12,"column":65,"offset":445}}}],"position":{"start":{"line":12,"column":1,"offset":381},"end":{"line":12,"column":65,"offset":445}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"anchor     ","position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":14,"offset":459}}},{"type":"raw","value":"string","position":{"start":{"line":13,"column":14,"offset":459},"end":{"line":13,"column":22,"offset":467}}},{"type":"text","value":"  锚点位置  支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right","position":{"start":{"line":13,"column":22,"offset":467},"end":{"line":13,"column":135,"offset":580}}}],"position":{"start":{"line":13,"column":1,"offset":446},"end":{"line":13,"column":135,"offset":580}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"offset    ","position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":13,"offset":593}}},{"type":"raw","value":"Array","position":{"start":{"line":14,"column":13,"offset":593},"end":{"line":14,"column":20,"offset":600}}},{"type":"text","value":"  偏移量 ","position":{"start":{"line":14,"column":20,"offset":600},"end":{"line":14,"column":26,"offset":606}}},{"type":"text","value":"[ 0, 0 ]","position":{"start":{"line":14,"column":27,"offset":607},"end":{"line":14,"column":33,"offset":613}}},{"type":"text","value":" 分别表示 X, Y 的偏移量","position":{"start":{"line":14,"column":34,"offset":614},"end":{"line":14,"column":49,"offset":629}}}],"position":{"start":{"line":14,"column":1,"offset":581},"end":{"line":14,"column":49,"offset":629}}},{"type":"text","value":"\n"}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":14,"column":49,"offset":629}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"方法"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%96%B9%E6%B3%95","aria-label":"方法 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"方法","position":{"start":{"line":17,"column":4,"offset":635},"end":{"line":17,"column":6,"offset":637}}}],"position":{"start":{"line":17,"column":1,"offset":632},"end":{"line":17,"column":6,"offset":637}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setlnglat","aria-label":"setlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setLnglat","position":{"start":{"line":19,"column":6,"offset":644},"end":{"line":19,"column":15,"offset":653}}}],"position":{"start":{"line":19,"column":1,"offset":639},"end":{"line":19,"column":15,"offset":653}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置marker经纬度位置","position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667}}}],"position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"addto"},"children":[{"type":"element","tagName":"a","properties":{"href":"#addto","aria-label":"addto permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"addTo","position":{"start":{"line":22,"column":6,"offset":674},"end":{"line":22,"column":11,"offset":679}}}],"position":{"start":{"line":22,"column":1,"offset":669},"end":{"line":22,"column":11,"offset":679}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"将marker添加到地图Scene","position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697}}}],"position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"remove"},"children":[{"type":"element","tagName":"a","properties":{"href":"#remove","aria-label":"remove permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"remove","position":{"start":{"line":25,"column":6,"offset":704},"end":{"line":25,"column":12,"offset":710}}}],"position":{"start":{"line":25,"column":1,"offset":699},"end":{"line":25,"column":12,"offset":710}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除marker","position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719}}}],"position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getelement"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getelement","aria-label":"getelement permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getElement","position":{"start":{"line":28,"column":6,"offset":726},"end":{"line":28,"column":16,"offset":736}}}],"position":{"start":{"line":28,"column":1,"offset":721},"end":{"line":28,"column":16,"offset":736}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker dom Element","position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757}}}],"position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlnglat","aria-label":"getlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLngLat","position":{"start":{"line":31,"column":6,"offset":764},"end":{"line":31,"column":15,"offset":773}}}],"position":{"start":{"line":31,"column":1,"offset":759},"end":{"line":31,"column":15,"offset":773}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker经纬度坐标","position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787}}}],"position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"togglepopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#togglepopup","aria-label":"togglepopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"togglePopup","position":{"start":{"line":34,"column":6,"offset":794},"end":{"line":34,"column":17,"offset":805}}}],"position":{"start":{"line":34,"column":1,"offset":789},"end":{"line":34,"column":17,"offset":805}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"开启或者关闭marker弹出框","position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821}}}],"position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setpopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpopup","aria-label":"setpopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPopup","position":{"start":{"line":37,"column":6,"offset":828},"end":{"line":37,"column":14,"offset":836}}}],"position":{"start":{"line":37,"column":1,"offset":823},"end":{"line":37,"column":14,"offset":836}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"为marker设置popup","position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851}}}],"position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getpopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getpopup","aria-label":"getpopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getPopup","position":{"start":{"line":40,"column":6,"offset":858},"end":{"line":40,"column":14,"offset":866}}}],"position":{"start":{"line":40,"column":1,"offset":853},"end":{"line":40,"column":14,"offset":866}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker弹出框","position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878}}}],"position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"示例代码"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81","aria-label":"示例代码 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"示例代码","position":{"start":{"line":44,"column":4,"offset":884},"end":{"line":44,"column":8,"offset":888}}}],"position":{"start":{"line":44,"column":1,"offset":881},"end":{"line":44,"column":8,"offset":888}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"默认marker"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E9%BB%98%E8%AE%A4marker","aria-label":"默认marker permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"默认Marker","position":{"start":{"line":46,"column":6,"offset":895},"end":{"line":46,"column":14,"offset":903}}}],"position":{"start":{"line":46,"column":1,"offset":890},"end":{"line":46,"column":14,"offset":903}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"**","position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":3,"offset":906}}},{"type":"raw","value":"
","position":{"start":{"line":47,"column":3,"offset":906},"end":{"line":47,"column":9,"offset":912}}},{"type":"raw","value":"const marker = new L7.Marker({color:'blue'})","position":{"start":{"line":47,"column":9,"offset":912},"end":{"line":47,"column":56,"offset":959}}}],"position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":56,"offset":959}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"自定义marker"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E8%87%AA%E5%AE%9A%E4%B9%89marker","aria-label":"自定义marker permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"自定义Marker","position":{"start":{"line":50,"column":6,"offset":967},"end":{"line":50,"column":15,"offset":976}}}],"position":{"start":{"line":50,"column":1,"offset":962},"end":{"line":50,"column":15,"offset":976}}},{"type":"text","value":"\n"},{"type":"raw","value":"
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat([data[i].x * 1, data[i].y])\n  .addTo(scene);\n
","position":{"start":{"line":52,"column":1,"offset":978},"end":{"line":62,"column":4,"offset":1281}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"设置-popup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E8%AE%BE%E7%BD%AE-popup","aria-label":"设置 popup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"设置 popup","position":{"start":{"line":65,"column":6,"offset":1289},"end":{"line":65,"column":14,"offset":1297}}}],"position":{"start":{"line":65,"column":1,"offset":1284},"end":{"line":65,"column":14,"offset":1297}}},{"type":"text","value":"\n"},{"type":"raw","value":"
var popup = new L7.Popup({\n  anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat(item.coordinates)\n  .setPopup(popup)\n  .addTo(scene);\n
","position":{"start":{"line":67,"column":1,"offset":1299},"end":{"line":77,"column":4,"offset":1499}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":80,"column":1,"offset":1502}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-5ce457da6f1384d2d0a1c8d65aa7035f.json b/.cache/caches/gatsby-transformer-remark/diskstore-5ce457da6f1384d2d0a1c8d65aa7035f.json deleted file mode 100644 index 175e0b1dc6..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-5ce457da6f1384d2d0a1c8d65aa7035f.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-a4fdd704fadc6272a50f61c3eb36ad4b-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":1,"children":[{"type":"link","url":"#popup","title":null,"children":[],"data":{"hProperties":{"aria-label":"popup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"popup","position":{"start":{"line":1,"column":3,"offset":2},"end":{"line":1,"column":8,"offset":7},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":8,"offset":7},"indent":[]},"data":{"id":"popup","htmlAttributes":{"id":"popup"},"hProperties":{"id":"popup"}}},{"type":"paragraph","children":[{"type":"text","value":"地图标注信息窗口,用于展示地图要素的属性信息","position":{"start":{"line":3,"column":1,"offset":9},"end":{"line":3,"column":23,"offset":31},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":9},"end":{"line":3,"column":23,"offset":31},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#构造函数","title":null,"children":[],"data":{"hProperties":{"aria-label":"构造函数 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"构造函数","position":{"start":{"line":6,"column":4,"offset":37},"end":{"line":6,"column":8,"offset":41},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":34},"end":{"line":6,"column":8,"offset":41},"indent":[]},"data":{"id":"构造函数","htmlAttributes":{"id":"构造函数"},"hProperties":{"id":"构造函数"}}},{"type":"paragraph","children":[{"type":"text","value":"Popup","position":{"start":{"line":7,"column":1,"offset":42},"end":{"line":7,"column":6,"offset":47},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":42},"end":{"line":7,"column":6,"offset":47},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
const popup = new L7.Popup(option);\n
","position":{"start":{"line":9,"column":1,"offset":49},"end":{"line":11,"column":4,"offset":101},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#option","title":null,"children":[],"data":{"hProperties":{"aria-label":"option permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"option","position":{"start":{"line":14,"column":6,"offset":109},"end":{"line":14,"column":12,"offset":115},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":104},"end":{"line":14,"column":12,"offset":115},"indent":[]},"data":{"id":"option","htmlAttributes":{"id":"option"},"hProperties":{"id":"option"}}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"closeButton","position":{"start":{"line":16,"column":3,"offset":119},"end":{"line":16,"column":14,"offset":130},"indent":[]}}],"position":{"start":{"line":16,"column":3,"offset":119},"end":{"line":16,"column":14,"offset":130},"indent":[]}}],"position":{"start":{"line":16,"column":1,"offset":117},"end":{"line":16,"column":14,"offset":130},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"closeOnClick","position":{"start":{"line":17,"column":3,"offset":133},"end":{"line":17,"column":15,"offset":145},"indent":[]}}],"position":{"start":{"line":17,"column":3,"offset":133},"end":{"line":17,"column":15,"offset":145},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":131},"end":{"line":17,"column":15,"offset":145},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"maxWidth","position":{"start":{"line":18,"column":3,"offset":148},"end":{"line":18,"column":11,"offset":156},"indent":[]}}],"position":{"start":{"line":18,"column":3,"offset":148},"end":{"line":18,"column":11,"offset":156},"indent":[]}}],"position":{"start":{"line":18,"column":1,"offset":146},"end":{"line":18,"column":11,"offset":156},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"anchor","position":{"start":{"line":19,"column":3,"offset":159},"end":{"line":19,"column":9,"offset":165},"indent":[]}}],"position":{"start":{"line":19,"column":3,"offset":159},"end":{"line":19,"column":9,"offset":165},"indent":[]}}],"position":{"start":{"line":19,"column":1,"offset":157},"end":{"line":19,"column":9,"offset":165},"indent":[]}}],"position":{"start":{"line":16,"column":1,"offset":117},"end":{"line":19,"column":9,"offset":165},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"方法","position":{"start":{"line":22,"column":4,"offset":171},"end":{"line":22,"column":6,"offset":173},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":168},"end":{"line":22,"column":6,"offset":173},"indent":[]},"data":{"id":"方法","htmlAttributes":{"id":"方法"},"hProperties":{"id":"方法"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"setlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setLnglat","position":{"start":{"line":24,"column":6,"offset":180},"end":{"line":24,"column":15,"offset":189},"indent":[]}}],"position":{"start":{"line":24,"column":1,"offset":175},"end":{"line":24,"column":15,"offset":189},"indent":[]},"data":{"id":"setlnglat","htmlAttributes":{"id":"setlnglat"},"hProperties":{"id":"setlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"设置popup的经纬度位置","position":{"start":{"line":25,"column":1,"offset":190},"end":{"line":25,"column":14,"offset":203},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":25,"column":14,"offset":203},"end":{"line":25,"column":20,"offset":209},"indent":[]}},{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":25,"column":22,"offset":211},"end":{"line":25,"column":24,"offset":213},"indent":[]}}],"position":{"start":{"line":25,"column":20,"offset":209},"end":{"line":25,"column":26,"offset":215},"indent":[]}},{"type":"text","value":":lnglat 经纬度数组 ","position":{"start":{"line":25,"column":26,"offset":215},"end":{"line":25,"column":40,"offset":229},"indent":[]}},{"type":"linkReference","identifier":"112,32","label":"112,32","referenceType":"shortcut","children":[{"type":"text","value":"112,32","position":{"start":{"line":25,"column":41,"offset":230},"end":{"line":25,"column":47,"offset":236},"indent":[]}}],"position":{"start":{"line":25,"column":40,"offset":229},"end":{"line":25,"column":48,"offset":237},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":190},"end":{"line":25,"column":48,"offset":237},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
popup.setLnglat([112, 32]);\n
","position":{"start":{"line":27,"column":1,"offset":239},"end":{"line":29,"column":4,"offset":284},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#addto","title":null,"children":[],"data":{"hProperties":{"aria-label":"addto permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"addTo","position":{"start":{"line":32,"column":6,"offset":292},"end":{"line":32,"column":11,"offset":297},"indent":[]}}],"position":{"start":{"line":32,"column":1,"offset":287},"end":{"line":32,"column":11,"offset":297},"indent":[]},"data":{"id":"addto","htmlAttributes":{"id":"addto"},"hProperties":{"id":"addto"}}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":33,"column":3,"offset":300},"end":{"line":33,"column":5,"offset":302},"indent":[]}}],"position":{"start":{"line":33,"column":1,"offset":298},"end":{"line":33,"column":7,"offset":304},"indent":[]}},{"type":"text","value":":scene 地图scene实例","position":{"start":{"line":33,"column":7,"offset":304},"end":{"line":33,"column":23,"offset":320},"indent":[]}}],"position":{"start":{"line":33,"column":1,"offset":298},"end":{"line":33,"column":23,"offset":320},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"将popup添加到地图scene显示","position":{"start":{"line":35,"column":1,"offset":322},"end":{"line":35,"column":19,"offset":340},"indent":[]}}],"position":{"start":{"line":35,"column":1,"offset":322},"end":{"line":35,"column":19,"offset":340},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
popup.addTo(scene);\n
","position":{"start":{"line":37,"column":1,"offset":342},"end":{"line":39,"column":4,"offset":379},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#sethtml","title":null,"children":[],"data":{"hProperties":{"aria-label":"sethtml permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setHtml","position":{"start":{"line":42,"column":6,"offset":387},"end":{"line":42,"column":13,"offset":394},"indent":[]}}],"position":{"start":{"line":42,"column":1,"offset":382},"end":{"line":42,"column":13,"offset":394},"indent":[]},"data":{"id":"sethtml","htmlAttributes":{"id":"sethtml"},"hProperties":{"id":"sethtml"}}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":43,"column":3,"offset":397},"end":{"line":43,"column":5,"offset":399},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":395},"end":{"line":43,"column":7,"offset":401},"indent":[]}},{"type":"text","value":":html 字符串","position":{"start":{"line":43,"column":7,"offset":401},"end":{"line":43,"column":16,"offset":410},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":395},"end":{"line":43,"column":16,"offset":410},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"设置popup html 内容","position":{"start":{"line":45,"column":1,"offset":412},"end":{"line":45,"column":16,"offset":427},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":412},"end":{"line":45,"column":16,"offset":427},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
var html =\n  '<p>\\u7701\\u4EFD\\uFF1A' +\n  feature.s +\n  '</p>\\n        <p>\\u5730\\u533A\\uFF1A' +\n  feature.m +\n  '</p>\\n        <p>\\u6E29\\u5EA6\\uFF1A' +\n  feature.t +\n  '</p>\\n        ';\npopup.setHtml(html);\n
","position":{"start":{"line":47,"column":1,"offset":429},"end":{"line":51,"column":4,"offset":639},"indent":[1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#settext","title":null,"children":[],"data":{"hProperties":{"aria-label":"settext permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setText","position":{"start":{"line":54,"column":6,"offset":647},"end":{"line":54,"column":13,"offset":654},"indent":[]}}],"position":{"start":{"line":54,"column":1,"offset":642},"end":{"line":54,"column":13,"offset":654},"indent":[]},"data":{"id":"settext","htmlAttributes":{"id":"settext"},"hProperties":{"id":"settext"}}},{"type":"paragraph","children":[{"type":"text","value":"设置 popup 显示文本内容","position":{"start":{"line":55,"column":1,"offset":655},"end":{"line":55,"column":16,"offset":670},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":655},"end":{"line":55,"column":16,"offset":670},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
popup.setText('hello world');\n
","position":{"start":{"line":57,"column":1,"offset":672},"end":{"line":59,"column":4,"offset":719},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#remove","title":null,"children":[],"data":{"hProperties":{"aria-label":"remove permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"remove","position":{"start":{"line":62,"column":6,"offset":727},"end":{"line":62,"column":12,"offset":733},"indent":[]}}],"position":{"start":{"line":62,"column":1,"offset":722},"end":{"line":62,"column":12,"offset":733},"indent":[]},"data":{"id":"remove","htmlAttributes":{"id":"remove"},"hProperties":{"id":"remove"}}},{"type":"paragraph","children":[{"type":"text","value":"移除popup","position":{"start":{"line":63,"column":1,"offset":734},"end":{"line":63,"column":8,"offset":741},"indent":[]}}],"position":{"start":{"line":63,"column":1,"offset":734},"end":{"line":63,"column":8,"offset":741},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
popup.remove();\n
","position":{"start":{"line":65,"column":1,"offset":743},"end":{"line":67,"column":4,"offset":775},"indent":[1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"事件","position":{"start":{"line":70,"column":4,"offset":781},"end":{"line":70,"column":6,"offset":783},"indent":[]}}],"position":{"start":{"line":70,"column":1,"offset":778},"end":{"line":70,"column":6,"offset":783},"indent":[]},"data":{"id":"事件","htmlAttributes":{"id":"事件"},"hProperties":{"id":"事件"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#close","title":null,"children":[],"data":{"hProperties":{"aria-label":"close permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"close","position":{"start":{"line":72,"column":6,"offset":790},"end":{"line":72,"column":11,"offset":795},"indent":[]}}],"position":{"start":{"line":72,"column":1,"offset":785},"end":{"line":72,"column":11,"offset":795},"indent":[]},"data":{"id":"close","htmlAttributes":{"id":"close"},"hProperties":{"id":"close"}}},{"type":"html","lang":"javascript","meta":null,"value":"
popup.on('close', () => {});\n
","position":{"start":{"line":74,"column":1,"offset":797},"end":{"line":76,"column":4,"offset":839},"indent":[1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#示例代码","title":null,"children":[],"data":{"hProperties":{"aria-label":"示例代码 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"示例代码","position":{"start":{"line":79,"column":4,"offset":845},"end":{"line":79,"column":8,"offset":849},"indent":[]}}],"position":{"start":{"line":79,"column":1,"offset":842},"end":{"line":79,"column":8,"offset":849},"indent":[]},"data":{"id":"示例代码","htmlAttributes":{"id":"示例代码"},"hProperties":{"id":"示例代码"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#添加popup","title":null,"children":[],"data":{"hProperties":{"aria-label":"添加popup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"添加popup","position":{"start":{"line":81,"column":6,"offset":856},"end":{"line":81,"column":13,"offset":863},"indent":[]}}],"position":{"start":{"line":81,"column":1,"offset":851},"end":{"line":81,"column":13,"offset":863},"indent":[]},"data":{"id":"添加popup","htmlAttributes":{"id":"添加popup"},"hProperties":{"id":"添加popup"}}},{"type":"html","lang":null,"meta":null,"value":"
  var html = '<p>'+feature.m+'</p>';\n  const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
","position":{"start":{"line":83,"column":1,"offset":865},"end":{"line":86,"column":4,"offset":981},"indent":[1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#faq","title":null,"children":[],"data":{"hProperties":{"aria-label":"faq permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"FAQ","position":{"start":{"line":88,"column":5,"offset":987},"end":{"line":88,"column":8,"offset":990},"indent":[]}}],"position":{"start":{"line":88,"column":1,"offset":983},"end":{"line":88,"column":8,"offset":990},"indent":[]},"data":{"id":"faq","htmlAttributes":{"id":"faq"},"hProperties":{"id":"faq"}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":89,"column":1,"offset":991}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-60ffaa0253ce67428f5a7e31a4a0bad1.json b/.cache/caches/gatsby-transformer-remark/diskstore-60ffaa0253ce67428f5a7e31a4a0bad1.json deleted file mode 100644 index eeb1dcdf0c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-60ffaa0253ce67428f5a7e31a4a0bad1.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-b1a6eb4a5fb92e03f562537f31f11c68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

数据

\n

目前L7支持的数据格式有GeoJson,CSV,JSon Image

\n

GeoJSON 支持点、线、面,等所有的空间数据格式。
CSV 支持,点,线段,弧线的支持。
JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。

\n

GeoJSON

\n
\n

GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。

\n
\n
{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {},\n      \"geometry\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n          [\n            [110.478515625, 32.76880048488168],\n            [117.68554687499999, 32.76880048488168],\n            [117.68554687499999, 37.64903402157866],\n            [110.478515625, 37.64903402157866],\n            [110.478515625, 32.76880048488168]\n          ]\n        ]\n      }\n    }\n  ]\n}\n
\n

地理统计分析工具

\n

turfjs:  地理数据计算,处理,统计,分析的Javascript 库

\n

在线工具

\n

http://geojson.io/    可以在线查看,绘制,修改GeoJSON数据

\n

https://mapshaper.org/  可以查看较大的geojson,还能够简化GeoJSON数据

"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json b/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json deleted file mode 100644 index 95f777eea5..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-4e775806f930bb554f175748236303d7-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":1,"children":[{"type":"link","url":"#control","title":null,"children":[],"data":{"hProperties":{"aria-label":"control permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"control","position":{"start":{"line":1,"column":3,"offset":2},"end":{"line":1,"column":10,"offset":9},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":10,"offset":9},"indent":[]},"data":{"id":"control","htmlAttributes":{"id":"control"},"hProperties":{"id":"control"}}},{"type":"paragraph","children":[{"type":"text","value":"地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺","position":{"start":{"line":3,"column":1,"offset":11},"end":{"line":3,"column":43,"offset":53},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":11},"end":{"line":3,"column":43,"offset":53},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#构造函数","title":null,"children":[],"data":{"hProperties":{"aria-label":"构造函数 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"构造函数","position":{"start":{"line":6,"column":4,"offset":59},"end":{"line":6,"column":8,"offset":63},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":56},"end":{"line":6,"column":8,"offset":63},"indent":[]},"data":{"id":"构造函数","htmlAttributes":{"id":"构造函数"},"hProperties":{"id":"构造函数"}}},{"type":"html","lang":"javascript","meta":null,"value":"
const baseControl = new L7.Control.Base(option);\n
","position":{"start":{"line":8,"column":1,"offset":65},"end":{"line":10,"column":4,"offset":131},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#option","title":null,"children":[],"data":{"hProperties":{"aria-label":"option permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"option","position":{"start":{"line":13,"column":6,"offset":139},"end":{"line":13,"column":12,"offset":145},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":134},"end":{"line":13,"column":12,"offset":145},"indent":[]},"data":{"id":"option","htmlAttributes":{"id":"option"},"hProperties":{"id":"option"}}},{"type":"paragraph","children":[{"type":"text","value":" position: ","position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":12,"offset":157},"indent":[]}},{"type":"html","value":"string","position":{"start":{"line":14,"column":12,"offset":157},"end":{"line":14,"column":20,"offset":165},"indent":[]}},{"type":"text","value":" 控件位置支持是个方位 ","position":{"start":{"line":14,"column":20,"offset":165},"end":{"line":14,"column":32,"offset":177},"indent":[]}},{"type":"html","value":"bottomright, topright, bottomleft, topleft","position":{"start":{"line":14,"column":32,"offset":177},"end":{"line":14,"column":76,"offset":221},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":76,"offset":221},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#scene-内置地图组件","title":null,"children":[],"data":{"hProperties":{"aria-label":"scene 内置地图组件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"scene 内置地图组件","position":{"start":{"line":17,"column":6,"offset":229},"end":{"line":17,"column":18,"offset":241},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":224},"end":{"line":17,"column":18,"offset":241},"indent":[]},"data":{"id":"scene-内置地图组件","htmlAttributes":{"id":"scene-内置地图组件"},"hProperties":{"id":"scene-内置地图组件"}}},{"type":"paragraph","children":[{"type":"text","value":"zoom 地图放大缩小  默认添加","position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":18,"offset":259},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":18,"column":18,"offset":259},"end":{"line":18,"column":24,"offset":265},"indent":[]}},{"type":"text","value":"Scale 地图比例尺   默认添加","position":{"start":{"line":18,"column":24,"offset":265},"end":{"line":18,"column":42,"offset":283},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":18,"column":42,"offset":283},"end":{"line":18,"column":48,"offset":289},"indent":[]}},{"type":"text","value":"attribution 地图数据属性  默认添加","position":{"start":{"line":18,"column":48,"offset":289},"end":{"line":18,"column":72,"offset":313},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":18,"column":72,"offset":313},"end":{"line":18,"column":78,"offset":319},"indent":[]}},{"type":"text","value":"layer 图层列表","position":{"start":{"line":18,"column":78,"offset":319},"end":{"line":18,"column":88,"offset":329},"indent":[]}}],"position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":88,"offset":329},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"scene配置项设置控件添加状态","position":{"start":{"line":20,"column":3,"offset":333},"end":{"line":20,"column":19,"offset":349},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":331},"end":{"line":20,"column":21,"offset":351},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":331},"end":{"line":20,"column":21,"offset":351},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene = new L7.scene({\n  zoomControl: true,\n  scaleControl: true,\n  attributionControl: true,\n});\n
","position":{"start":{"line":22,"column":1,"offset":353},"end":{"line":28,"column":4,"offset":469},"indent":[1,1,1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#","title":null,"children":[],"data":{"hProperties":{"aria-label":" permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}}],"position":{"start":{"line":30,"column":1,"offset":471},"end":{"line":30,"column":6,"offset":476},"indent":[]},"data":{"id":"","htmlAttributes":{"id":""},"hProperties":{"id":""}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#zoom","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoom permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"Zoom","position":{"start":{"line":32,"column":6,"offset":483},"end":{"line":32,"column":10,"offset":487},"indent":[]}}],"position":{"start":{"line":32,"column":1,"offset":478},"end":{"line":32,"column":10,"offset":487},"indent":[]},"data":{"id":"zoom","htmlAttributes":{"id":"zoom"},"hProperties":{"id":"zoom"}}},{"type":"paragraph","children":[{"type":"text","value":"放大缩小组件 默认 左上角","position":{"start":{"line":33,"column":1,"offset":488},"end":{"line":33,"column":14,"offset":501},"indent":[]}}],"position":{"start":{"line":33,"column":1,"offset":488},"end":{"line":33,"column":14,"offset":501},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
new L7.Control.Zoom({\n  position: 'topleft',\n}).addTo(scene);\n
","position":{"start":{"line":35,"column":1,"offset":503},"end":{"line":39,"column":4,"offset":590},"indent":[1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#scale","title":null,"children":[],"data":{"hProperties":{"aria-label":"scale permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"Scale","position":{"start":{"line":42,"column":6,"offset":598},"end":{"line":42,"column":11,"offset":603},"indent":[]}}],"position":{"start":{"line":42,"column":1,"offset":593},"end":{"line":42,"column":11,"offset":603},"indent":[]},"data":{"id":"scale","htmlAttributes":{"id":"scale"},"hProperties":{"id":"scale"}}},{"type":"paragraph","children":[{"type":"text","value":"比例尺组件默认左下角","position":{"start":{"line":43,"column":1,"offset":604},"end":{"line":43,"column":11,"offset":614},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":604},"end":{"line":43,"column":11,"offset":614},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
new L7.Control.Scale({\n  position: 'bottomleft',\n}).addTo(scene);\n
","position":{"start":{"line":45,"column":1,"offset":616},"end":{"line":49,"column":4,"offset":707},"indent":[1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#attribution","title":null,"children":[],"data":{"hProperties":{"aria-label":"attribution permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"attribution","position":{"start":{"line":52,"column":6,"offset":715},"end":{"line":52,"column":17,"offset":726},"indent":[]}}],"position":{"start":{"line":52,"column":1,"offset":710},"end":{"line":52,"column":17,"offset":726},"indent":[]},"data":{"id":"attribution","htmlAttributes":{"id":"attribution"},"hProperties":{"id":"attribution"}}},{"type":"paragraph","children":[{"type":"text","value":"默认右下角","position":{"start":{"line":53,"column":1,"offset":727},"end":{"line":53,"column":6,"offset":732},"indent":[]}}],"position":{"start":{"line":53,"column":1,"offset":727},"end":{"line":53,"column":6,"offset":732},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
new L7.Control.Attribution({\n  position: 'bottomleft',\n}).addTo(scene);\n
","position":{"start":{"line":55,"column":1,"offset":734},"end":{"line":59,"column":4,"offset":830},"indent":[1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#layer","title":null,"children":[],"data":{"hProperties":{"aria-label":"layer permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"layer","position":{"start":{"line":62,"column":6,"offset":838},"end":{"line":62,"column":11,"offset":843},"indent":[]}}],"position":{"start":{"line":62,"column":1,"offset":833},"end":{"line":62,"column":11,"offset":843},"indent":[]},"data":{"id":"layer","htmlAttributes":{"id":"layer"},"hProperties":{"id":"layer"}}},{"type":"paragraph","children":[{"type":"text","value":"图层列表目前只支持可视化overlayers 图层控制","position":{"start":{"line":63,"column":1,"offset":844},"end":{"line":63,"column":28,"offset":871},"indent":[]}}],"position":{"start":{"line":63,"column":1,"offset":844},"end":{"line":63,"column":28,"offset":871},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
var overlayers = {\n  围栏填充: layer,\n  围栏边界: layer2,\n};\nnew L7.Control.Layers({\n  overlayers: overlayers,\n}).addTo(scene);\n
","position":{"start":{"line":65,"column":1,"offset":873},"end":{"line":73,"column":4,"offset":1031},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"方法","position":{"start":{"line":76,"column":4,"offset":1037},"end":{"line":76,"column":6,"offset":1039},"indent":[]}}],"position":{"start":{"line":76,"column":1,"offset":1034},"end":{"line":76,"column":6,"offset":1039},"indent":[]},"data":{"id":"方法","htmlAttributes":{"id":"方法"},"hProperties":{"id":"方法"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#onadd","title":null,"children":[],"data":{"hProperties":{"aria-label":"onadd permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"onAdd","position":{"start":{"line":78,"column":6,"offset":1046},"end":{"line":78,"column":11,"offset":1051},"indent":[]}}],"position":{"start":{"line":78,"column":1,"offset":1041},"end":{"line":78,"column":11,"offset":1051},"indent":[]},"data":{"id":"onadd","htmlAttributes":{"id":"onadd"},"hProperties":{"id":"onadd"}}},{"type":"paragraph","children":[{"type":"text","value":"组件添加到地图Scene时调用,自定义组件时需要实现此方法","position":{"start":{"line":79,"column":1,"offset":1052},"end":{"line":79,"column":30,"offset":1081},"indent":[]}}],"position":{"start":{"line":79,"column":1,"offset":1052},"end":{"line":79,"column":30,"offset":1081},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#addto","title":null,"children":[],"data":{"hProperties":{"aria-label":"addto permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"addTo","position":{"start":{"line":82,"column":6,"offset":1089},"end":{"line":82,"column":11,"offset":1094},"indent":[]}}],"position":{"start":{"line":82,"column":1,"offset":1084},"end":{"line":82,"column":11,"offset":1094},"indent":[]},"data":{"id":"addto","htmlAttributes":{"id":"addto"},"hProperties":{"id":"addto"}}},{"type":"paragraph","children":[{"type":"text","value":"添加到地图scene","position":{"start":{"line":83,"column":1,"offset":1095},"end":{"line":83,"column":11,"offset":1105},"indent":[]}}],"position":{"start":{"line":83,"column":1,"offset":1095},"end":{"line":83,"column":11,"offset":1105},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
control.addTo(scene);\n
","position":{"start":{"line":85,"column":1,"offset":1107},"end":{"line":87,"column":4,"offset":1146},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setposition","title":null,"children":[],"data":{"hProperties":{"aria-label":"setposition permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPosition","position":{"start":{"line":90,"column":6,"offset":1154},"end":{"line":90,"column":17,"offset":1165},"indent":[]}}],"position":{"start":{"line":90,"column":1,"offset":1149},"end":{"line":90,"column":17,"offset":1165},"indent":[]},"data":{"id":"setposition","htmlAttributes":{"id":"setposition"},"hProperties":{"id":"setposition"}}},{"type":"paragraph","children":[{"type":"text","value":"设置组件位置","position":{"start":{"line":91,"column":1,"offset":1166},"end":{"line":91,"column":7,"offset":1172},"indent":[]}}],"position":{"start":{"line":91,"column":1,"offset":1166},"end":{"line":91,"column":7,"offset":1172},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
control.setPosition('bottomright');\n
","position":{"start":{"line":93,"column":1,"offset":1174},"end":{"line":95,"column":4,"offset":1227},"indent":[1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#remove","title":null,"children":[],"data":{"hProperties":{"aria-label":"remove permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"remove","position":{"start":{"line":98,"column":6,"offset":1235},"end":{"line":98,"column":12,"offset":1241},"indent":[]}}],"position":{"start":{"line":98,"column":1,"offset":1230},"end":{"line":98,"column":12,"offset":1241},"indent":[]},"data":{"id":"remove","htmlAttributes":{"id":"remove"},"hProperties":{"id":"remove"}}},{"type":"paragraph","children":[{"type":"text","value":"移除地图组件","position":{"start":{"line":99,"column":1,"offset":1242},"end":{"line":99,"column":7,"offset":1248},"indent":[]}}],"position":{"start":{"line":99,"column":1,"offset":1242},"end":{"line":99,"column":7,"offset":1248},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
control.remove();\n
","position":{"start":{"line":101,"column":1,"offset":1250},"end":{"line":103,"column":4,"offset":1285},"indent":[1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#示例代码","title":null,"children":[],"data":{"hProperties":{"aria-label":"示例代码 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"示例代码","position":{"start":{"line":107,"column":4,"offset":1292},"end":{"line":107,"column":8,"offset":1296},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":1289},"end":{"line":107,"column":8,"offset":1296},"indent":[]},"data":{"id":"示例代码","htmlAttributes":{"id":"示例代码"},"hProperties":{"id":"示例代码"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#自定义图例控件","title":null,"children":[],"data":{"hProperties":{"aria-label":"自定义图例控件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"自定义图例控件","position":{"start":{"line":110,"column":6,"offset":1304},"end":{"line":110,"column":13,"offset":1311},"indent":[]}}],"position":{"start":{"line":110,"column":1,"offset":1299},"end":{"line":110,"column":13,"offset":1311},"indent":[]},"data":{"id":"自定义图例控件","htmlAttributes":{"id":"自定义图例控件"},"hProperties":{"id":"自定义图例控件"}}},{"type":"paragraph","children":[{"type":"link","title":null,"url":"https://antv.alipay.com/zh-cn/l7/1.x/demo/component/extendControl.html","children":[{"type":"text","value":"源码","position":{"start":{"line":111,"column":2,"offset":1313},"end":{"line":111,"column":4,"offset":1315},"indent":[]}}],"position":{"start":{"line":111,"column":1,"offset":1312},"end":{"line":111,"column":77,"offset":1388},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}}],"position":{"start":{"line":111,"column":1,"offset":1312},"end":{"line":111,"column":77,"offset":1388},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
var legend = new L7.Control.Base({\n  position: 'bottomright',\n});\nlegend.onAdd = function() {\n  var el = document.createElement('div');\n  el.className = 'infolegend legend';\n  var grades = [0, 8, 15, 30, 65, 120];\n  for (var i = 0; i < grades.length; i++) {\n    el.innerHTML +=\n      '<i style=\"background:' +\n      colors[i] +\n      '\"></i> ' +\n      grades[i] +\n      (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n  }\n  return el;\n};\nlegend.addTo(scene);\n
","position":{"start":{"line":113,"column":1,"offset":1390},"end":{"line":128,"column":4,"offset":1914},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#-1","title":null,"children":[],"data":{"hProperties":{"aria-label":" 1 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}}],"position":{"start":{"line":130,"column":1,"offset":1916},"end":{"line":130,"column":4,"offset":1919},"indent":[]},"data":{"id":"-1","htmlAttributes":{"id":"-1"},"hProperties":{"id":"-1"}}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#faq","title":null,"children":[],"data":{"hProperties":{"aria-label":"faq permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"FAQ","position":{"start":{"line":132,"column":4,"offset":1924},"end":{"line":132,"column":7,"offset":1927},"indent":[]}}],"position":{"start":{"line":132,"column":1,"offset":1921},"end":{"line":132,"column":7,"offset":1927},"indent":[]},"data":{"id":"faq","htmlAttributes":{"id":"faq"},"hProperties":{"id":"faq"}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":134,"column":1,"offset":1929}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-644c992860d9a891d9d0379b27be8e52.json b/.cache/caches/gatsby-transformer-remark/diskstore-644c992860d9a891d9d0379b27be8e52.json deleted file mode 100644 index 49895ba4d3..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-644c992860d9a891d9d0379b27be8e52.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-c2d419b3714b95a5e649d8745a7ba50e-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-6848789e646bc12b2cbd26760f339042.json b/.cache/caches/gatsby-transformer-remark/diskstore-6848789e646bc12b2cbd26760f339042.json deleted file mode 100644 index 00b53f39c1..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-6848789e646bc12b2cbd26760f339042.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-b203d64bdde854a7c4141aaf3bd814db-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":2,"children":[{"type":"link","url":"#简介","title":null,"children":[],"data":{"hProperties":{"aria-label":"简介 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"简介","position":{"start":{"line":2,"column":4,"offset":4},"end":{"line":2,"column":6,"offset":6},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":6,"offset":6},"indent":[]},"data":{"id":"简介","htmlAttributes":{"id":"简介"},"hProperties":{"id":"简介"}}},{"type":"paragraph","children":[{"type":"html","value":"Scene","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15},"indent":[]}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n  id: 'map',\n  mapStyle: 'dark',\n  center: [110.770672, 34.159869],\n  pitch: 45,\n});\n
","position":{"start":{"line":7,"column":1,"offset":47},"end":{"line":15,"column":4,"offset":214},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#构造函数","title":null,"children":[],"data":{"hProperties":{"aria-label":"构造函数 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"构造函数","position":{"start":{"line":18,"column":5,"offset":221},"end":{"line":18,"column":9,"offset":225},"indent":[]}}],"position":{"start":{"line":18,"column":1,"offset":217},"end":{"line":18,"column":9,"offset":225},"indent":[]},"data":{"id":"构造函数","htmlAttributes":{"id":"构造函数"},"hProperties":{"id":"构造函数"}}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"Scene","position":{"start":{"line":20,"column":3,"offset":229},"end":{"line":20,"column":8,"offset":234},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":227},"end":{"line":20,"column":10,"offset":236},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":20,"column":10,"offset":236},"end":{"line":20,"column":16,"offset":242},"indent":[]}},{"type":"text","value":"支持两种实例化方式","position":{"start":{"line":20,"column":16,"offset":242},"end":{"line":20,"column":25,"offset":251},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":227},"end":{"line":20,"column":25,"offset":251},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"独立实例化 内部根据id自动穿件地图实例","position":{"start":{"line":22,"column":3,"offset":255},"end":{"line":22,"column":23,"offset":275},"indent":[]}}],"position":{"start":{"line":22,"column":3,"offset":255},"end":{"line":22,"column":23,"offset":275},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":253},"end":{"line":22,"column":23,"offset":275},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"传入地图实例","position":{"start":{"line":23,"column":3,"offset":278},"end":{"line":23,"column":9,"offset":284},"indent":[]}}],"position":{"start":{"line":23,"column":3,"offset":278},"end":{"line":23,"column":9,"offset":284},"indent":[]}}],"position":{"start":{"line":23,"column":1,"offset":276},"end":{"line":23,"column":9,"offset":284},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":253},"end":{"line":23,"column":9,"offset":284},"indent":[1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#独立实例化-scene","title":null,"children":[],"data":{"hProperties":{"aria-label":"独立实例化 scene permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"独立实例化 Scene","position":{"start":{"line":29,"column":6,"offset":295},"end":{"line":29,"column":17,"offset":306},"indent":[]}}],"position":{"start":{"line":29,"column":1,"offset":290},"end":{"line":29,"column":17,"offset":306},"indent":[]},"data":{"id":"独立实例化-scene","htmlAttributes":{"id":"独立实例化-scene"},"hProperties":{"id":"独立实例化-scene"}}},{"type":"html","lang":"javascript","meta":null,"value":"
const scene = new L7.Scene({\n  id: 'map',\n  mapStyle: 'dark',\n  center: [120.19382669582967, 30.258134],\n  pitch: 0,\n  zoom: 12,\n  maxZoom: 20,\n  minZoom: 0,\n});\n
","position":{"start":{"line":31,"column":1,"offset":308},"end":{"line":41,"column":4,"offset":488},"indent":[1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#根据map-实例创建sence","title":null,"children":[],"data":{"hProperties":{"aria-label":"根据map 实例创建sence permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"根据map 实例创建Sence","position":{"start":{"line":44,"column":6,"offset":496},"end":{"line":44,"column":21,"offset":511},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":491},"end":{"line":44,"column":21,"offset":511},"indent":[]},"data":{"id":"根据map-实例创建sence","htmlAttributes":{"id":"根据map-实例创建sence"},"hProperties":{"id":"根据map-实例创建sence"}}},{"type":"paragraph","children":[{"type":"text","value":"_L7 基于高德地图3D模式开发的,因此传入Map实例 _","position":{"start":{"line":46,"column":1,"offset":513},"end":{"line":46,"column":30,"offset":542},"indent":[]}},{"type":"emphasis","children":[{"type":"text","value":"viewModes需要设置成3d","position":{"start":{"line":46,"column":31,"offset":543},"end":{"line":46,"column":47,"offset":559},"indent":[]}}],"position":{"start":{"line":46,"column":30,"offset":542},"end":{"line":46,"column":48,"offset":560},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":46,"column":48,"offset":560},"end":{"line":46,"column":54,"offset":566},"indent":[]}},{"type":"text","value":"_","position":{"start":{"line":46,"column":54,"offset":566},"end":{"line":46,"column":55,"offset":567},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":513},"end":{"line":46,"column":55,"offset":567},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
var mapinstance = new AMap.Map('map', {\n  center: [120.19382669582967, 30.258134],\n  viewMode: '3D',\n  pitch: 0,\n  zoom: 12,\n  maxZoom: 20,\n  minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n  mapStyle: 'dark',\n  map: mapinstance,\n});\n
","position":{"start":{"line":47,"column":1,"offset":568},"end":{"line":61,"column":4,"offset":827},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#map","title":null,"children":[],"data":{"hProperties":{"aria-label":"map permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"map","position":{"start":{"line":64,"column":4,"offset":833},"end":{"line":64,"column":7,"offset":836},"indent":[]}}],"position":{"start":{"line":64,"column":1,"offset":830},"end":{"line":64,"column":7,"offset":836},"indent":[]},"data":{"id":"map","htmlAttributes":{"id":"map"},"hProperties":{"id":"map"}}},{"type":"paragraph","children":[{"type":"text","value":"L7 在scene 下保留了高德地图实例,可以通过scene.map 调用高德地图的map方法。","position":{"start":{"line":65,"column":1,"offset":837},"end":{"line":65,"column":49,"offset":885},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":65,"column":49,"offset":885},"end":{"line":65,"column":55,"offset":891},"indent":[]}},{"type":"text","value":"map 实例方法见","position":{"start":{"line":65,"column":55,"offset":891},"end":{"line":65,"column":64,"offset":900},"indent":[]}},{"type":"link","title":null,"url":"https://lbs.amap.com/api/javascript-api/reference/map","children":[{"type":"text","value":"高德地图文档","position":{"start":{"line":65,"column":65,"offset":901},"end":{"line":65,"column":71,"offset":907},"indent":[]}}],"position":{"start":{"line":65,"column":64,"offset":900},"end":{"line":65,"column":127,"offset":963},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}}],"position":{"start":{"line":65,"column":1,"offset":837},"end":{"line":65,"column":127,"offset":963},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.map;\n
","position":{"start":{"line":67,"column":1,"offset":965},"end":{"line":69,"column":4,"offset":992},"indent":[1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#构造类","title":null,"children":[],"data":{"hProperties":{"aria-label":"构造类 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"构造类","position":{"start":{"line":72,"column":4,"offset":998},"end":{"line":72,"column":7,"offset":1001},"indent":[]}}],"position":{"start":{"line":72,"column":1,"offset":995},"end":{"line":72,"column":7,"offset":1001},"indent":[]},"data":{"id":"构造类","htmlAttributes":{"id":"构造类"},"hProperties":{"id":"构造类"}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#pointlayer","title":null,"children":[],"data":{"hProperties":{"aria-label":"pointlayer permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"PointLayer","position":{"start":{"line":74,"column":5,"offset":1007},"end":{"line":74,"column":15,"offset":1017},"indent":[]}}],"position":{"start":{"line":74,"column":1,"offset":1003},"end":{"line":74,"column":15,"offset":1017},"indent":[]},"data":{"id":"pointlayer","htmlAttributes":{"id":"pointlayer"},"hProperties":{"id":"pointlayer"}}},{"type":"paragraph","children":[{"type":"text","value":"新建点图层","position":{"start":{"line":75,"column":1,"offset":1018},"end":{"line":75,"column":6,"offset":1023},"indent":[]}}],"position":{"start":{"line":75,"column":1,"offset":1018},"end":{"line":75,"column":6,"offset":1023},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#polylinelayer","title":null,"children":[],"data":{"hProperties":{"aria-label":"polylinelayer permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"PolylineLayer","position":{"start":{"line":77,"column":5,"offset":1029},"end":{"line":77,"column":18,"offset":1042},"indent":[]}}],"position":{"start":{"line":77,"column":1,"offset":1025},"end":{"line":77,"column":18,"offset":1042},"indent":[]},"data":{"id":"polylinelayer","htmlAttributes":{"id":"polylinelayer"},"hProperties":{"id":"polylinelayer"}}},{"type":"paragraph","children":[{"type":"text","value":"新建线图层","position":{"start":{"line":78,"column":1,"offset":1043},"end":{"line":78,"column":6,"offset":1048},"indent":[]}}],"position":{"start":{"line":78,"column":1,"offset":1043},"end":{"line":78,"column":6,"offset":1048},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#polygonlayer","title":null,"children":[],"data":{"hProperties":{"aria-label":"polygonlayer permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"PolygonLayer","position":{"start":{"line":80,"column":5,"offset":1054},"end":{"line":80,"column":17,"offset":1066},"indent":[]}}],"position":{"start":{"line":80,"column":1,"offset":1050},"end":{"line":80,"column":17,"offset":1066},"indent":[]},"data":{"id":"polygonlayer","htmlAttributes":{"id":"polygonlayer"},"hProperties":{"id":"polygonlayer"}}},{"type":"paragraph","children":[{"type":"text","value":"新建面图层","position":{"start":{"line":81,"column":1,"offset":1067},"end":{"line":81,"column":6,"offset":1072},"indent":[]}}],"position":{"start":{"line":81,"column":1,"offset":1067},"end":{"line":81,"column":6,"offset":1072},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#imagelayer","title":null,"children":[],"data":{"hProperties":{"aria-label":"imagelayer permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"ImageLayer","position":{"start":{"line":83,"column":5,"offset":1078},"end":{"line":83,"column":15,"offset":1088},"indent":[]}}],"position":{"start":{"line":83,"column":1,"offset":1074},"end":{"line":83,"column":15,"offset":1088},"indent":[]},"data":{"id":"imagelayer","htmlAttributes":{"id":"imagelayer"},"hProperties":{"id":"imagelayer"}}},{"type":"paragraph","children":[{"type":"text","value":"新建图片图层","position":{"start":{"line":84,"column":1,"offset":1089},"end":{"line":84,"column":7,"offset":1095},"indent":[]}}],"position":{"start":{"line":84,"column":1,"offset":1089},"end":{"line":84,"column":7,"offset":1095},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#配置项","title":null,"children":[],"data":{"hProperties":{"aria-label":"配置项 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"配置项","position":{"start":{"line":87,"column":4,"offset":1101},"end":{"line":87,"column":7,"offset":1104},"indent":[]}}],"position":{"start":{"line":87,"column":1,"offset":1098},"end":{"line":87,"column":7,"offset":1104},"indent":[]},"data":{"id":"配置项","htmlAttributes":{"id":"配置项"},"hProperties":{"id":"配置项"}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#id","title":null,"children":[],"data":{"hProperties":{"aria-label":"id permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"id","position":{"start":{"line":89,"column":5,"offset":1110},"end":{"line":89,"column":7,"offset":1112},"indent":[]}}],"position":{"start":{"line":89,"column":1,"offset":1106},"end":{"line":89,"column":7,"offset":1112},"indent":[]},"data":{"id":"id","htmlAttributes":{"id":"id"},"hProperties":{"id":"id"}}},{"type":"paragraph","children":[{"type":"text","value":"需传入 dom 容器或者容器 id  {domObject || string} ","position":{"start":{"line":90,"column":1,"offset":1113},"end":{"line":90,"column":42,"offset":1154},"indent":[]}},{"type":"linkReference","identifier":"必选","label":"必选","referenceType":"shortcut","children":[{"type":"text","value":"必选","position":{"start":{"line":90,"column":43,"offset":1155},"end":{"line":90,"column":45,"offset":1157},"indent":[]}}],"position":{"start":{"line":90,"column":42,"offset":1154},"end":{"line":90,"column":46,"offset":1158},"indent":[]}}],"position":{"start":{"line":90,"column":1,"offset":1113},"end":{"line":90,"column":46,"offset":1158},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#zoom","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoom permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"zoom","position":{"start":{"line":93,"column":5,"offset":1165},"end":{"line":93,"column":9,"offset":1169},"indent":[]}}],"position":{"start":{"line":93,"column":1,"offset":1161},"end":{"line":93,"column":9,"offset":1169},"indent":[]},"data":{"id":"zoom","htmlAttributes":{"id":"zoom"},"hProperties":{"id":"zoom"}}},{"type":"paragraph","children":[{"type":"text","value":"地图初始显示级别 {number} (0-22)","position":{"start":{"line":94,"column":1,"offset":1170},"end":{"line":94,"column":26,"offset":1195},"indent":[]}}],"position":{"start":{"line":94,"column":1,"offset":1170},"end":{"line":94,"column":26,"offset":1195},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#center","title":null,"children":[],"data":{"hProperties":{"aria-label":"center permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"center","position":{"start":{"line":96,"column":5,"offset":1201},"end":{"line":96,"column":11,"offset":1207},"indent":[]}}],"position":{"start":{"line":96,"column":1,"offset":1197},"end":{"line":96,"column":11,"offset":1207},"indent":[]},"data":{"id":"center","htmlAttributes":{"id":"center"},"hProperties":{"id":"center"}}},{"type":"paragraph","children":[{"type":"text","value":"地图初始中心经纬度 {Lnglat}","position":{"start":{"line":97,"column":1,"offset":1208},"end":{"line":97,"column":19,"offset":1226},"indent":[]}}],"position":{"start":{"line":97,"column":1,"offset":1208},"end":{"line":97,"column":19,"offset":1226},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#pitch","title":null,"children":[],"data":{"hProperties":{"aria-label":"pitch permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"pitch","position":{"start":{"line":99,"column":5,"offset":1232},"end":{"line":99,"column":10,"offset":1237},"indent":[]}}],"position":{"start":{"line":99,"column":1,"offset":1228},"end":{"line":99,"column":10,"offset":1237},"indent":[]},"data":{"id":"pitch","htmlAttributes":{"id":"pitch"},"hProperties":{"id":"pitch"}}},{"type":"paragraph","children":[{"type":"text","value":"地图初始俯仰角度 {number}  default 0","position":{"start":{"line":100,"column":1,"offset":1238},"end":{"line":100,"column":29,"offset":1266},"indent":[]}}],"position":{"start":{"line":100,"column":1,"offset":1238},"end":{"line":100,"column":29,"offset":1266},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#mapsyle","title":null,"children":[],"data":{"hProperties":{"aria-label":"mapsyle permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"mapSyle","position":{"start":{"line":102,"column":5,"offset":1272},"end":{"line":102,"column":12,"offset":1279},"indent":[]}}],"position":{"start":{"line":102,"column":1,"offset":1268},"end":{"line":102,"column":12,"offset":1279},"indent":[]},"data":{"id":"mapsyle","htmlAttributes":{"id":"mapsyle"},"hProperties":{"id":"mapsyle"}}},{"type":"paragraph","children":[{"type":"text","value":"地图样式 {style} 目前仅支持高德地图。 default 'dark'","position":{"start":{"line":103,"column":1,"offset":1280},"end":{"line":103,"column":39,"offset":1318},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":103,"column":39,"offset":1318},"end":{"line":103,"column":45,"offset":1324},"indent":[]}},{"type":"text","value":"L7 内置三种种默认地图样式 dark | light|blank 空地图","position":{"start":{"line":103,"column":45,"offset":1324},"end":{"line":103,"column":82,"offset":1361},"indent":[]}}],"position":{"start":{"line":103,"column":1,"offset":1280},"end":{"line":103,"column":82,"offset":1361},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"设置地图的显示样式,目前支持两种地图样式:","position":{"start":{"line":105,"column":1,"offset":1363},"end":{"line":105,"column":22,"offset":1384},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":105,"column":22,"offset":1384},"end":{"line":105,"column":28,"offset":1390},"indent":[]}},{"type":"text","value":"第一种:自定义地图样式,如","position":{"start":{"line":105,"column":28,"offset":1390},"end":{"line":105,"column":41,"offset":1403},"indent":[]}},{"type":"html","value":""amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"","position":{"start":{"line":105,"column":41,"offset":1403},"end":{"line":105,"column":91,"offset":1453},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":105,"column":91,"offset":1453},"end":{"line":105,"column":97,"offset":1459},"indent":[]}},{"type":"text","value":"可前往","position":{"start":{"line":105,"column":97,"offset":1459},"end":{"line":105,"column":100,"offset":1462},"indent":[]}},{"type":"link","title":null,"url":"https://lbs.amap.com/dev/mapstyle/index","children":[{"type":"text","value":"地图自定义平台","position":{"start":{"line":105,"column":101,"offset":1463},"end":{"line":105,"column":108,"offset":1470},"indent":[]}}],"position":{"start":{"line":105,"column":100,"offset":1462},"end":{"line":105,"column":150,"offset":1512},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"text","value":"定制自己的个性地图样式;","position":{"start":{"line":105,"column":150,"offset":1512},"end":{"line":105,"column":162,"offset":1524},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":105,"column":162,"offset":1524},"end":{"line":105,"column":168,"offset":1530},"indent":[]}},{"type":"text","value":"第二种:官方样式模版,如","position":{"start":{"line":105,"column":168,"offset":1530},"end":{"line":105,"column":180,"offset":1542},"indent":[]}},{"type":"html","value":""amap://styles/grey"","position":{"start":{"line":105,"column":180,"offset":1542},"end":{"line":105,"column":202,"offset":1564},"indent":[]}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1564},"end":{"line":105,"column":203,"offset":1565},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":105,"column":203,"offset":1565},"end":{"line":105,"column":209,"offset":1571},"indent":[]}},{"type":"text","value":"其他模版样式及自定义地图的使用说明见","position":{"start":{"line":105,"column":209,"offset":1571},"end":{"line":105,"column":227,"offset":1589},"indent":[]}},{"type":"link","title":null,"url":"https://lbs.amap.com/api/javascript-api/guide/create-map/mapstye/","children":[{"type":"text","value":"开发指南","position":{"start":{"line":105,"column":228,"offset":1590},"end":{"line":105,"column":232,"offset":1594},"indent":[]}}],"position":{"start":{"line":105,"column":227,"offset":1589},"end":{"line":105,"column":300,"offset":1662},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}}],"position":{"start":{"line":105,"column":1,"offset":1363},"end":{"line":105,"column":300,"offset":1662},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#minzoom","title":null,"children":[],"data":{"hProperties":{"aria-label":"minzoom permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"minZoom","position":{"start":{"line":108,"column":5,"offset":1669},"end":{"line":108,"column":12,"offset":1676},"indent":[]}}],"position":{"start":{"line":108,"column":1,"offset":1665},"end":{"line":108,"column":12,"offset":1676},"indent":[]},"data":{"id":"minzoom","htmlAttributes":{"id":"minzoom"},"hProperties":{"id":"minzoom"}}},{"type":"paragraph","children":[{"type":"text","value":"地图最小缩放等级 {number}  default 0 (0-22)","position":{"start":{"line":109,"column":1,"offset":1677},"end":{"line":109,"column":37,"offset":1713},"indent":[]}}],"position":{"start":{"line":109,"column":1,"offset":1677},"end":{"line":109,"column":37,"offset":1713},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#maxzoom","title":null,"children":[],"data":{"hProperties":{"aria-label":"maxzoom permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"maxZoom","position":{"start":{"line":111,"column":5,"offset":1719},"end":{"line":111,"column":12,"offset":1726},"indent":[]}}],"position":{"start":{"line":111,"column":1,"offset":1715},"end":{"line":111,"column":12,"offset":1726},"indent":[]},"data":{"id":"maxzoom","htmlAttributes":{"id":"maxzoom"},"hProperties":{"id":"maxzoom"}}},{"type":"paragraph","children":[{"type":"text","value":"地图最大缩放等级 {number}  default 22 (0-22)","position":{"start":{"line":112,"column":1,"offset":1727},"end":{"line":112,"column":38,"offset":1764},"indent":[]}}],"position":{"start":{"line":112,"column":1,"offset":1727},"end":{"line":112,"column":38,"offset":1764},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#rotateenable","title":null,"children":[],"data":{"hProperties":{"aria-label":"rotateenable permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"rotateEnable","position":{"start":{"line":114,"column":5,"offset":1770},"end":{"line":114,"column":17,"offset":1782},"indent":[]}}],"position":{"start":{"line":114,"column":1,"offset":1766},"end":{"line":114,"column":17,"offset":1782},"indent":[]},"data":{"id":"rotateenable","htmlAttributes":{"id":"rotateenable"},"hProperties":{"id":"rotateenable"}}},{"type":"paragraph","children":[{"type":"text","value":"地图是否可旋转 {Boolean} default true","position":{"start":{"line":115,"column":1,"offset":1783},"end":{"line":115,"column":31,"offset":1813},"indent":[]}}],"position":{"start":{"line":115,"column":1,"offset":1783},"end":{"line":115,"column":31,"offset":1813},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"方法","position":{"start":{"line":120,"column":4,"offset":1821},"end":{"line":120,"column":6,"offset":1823},"indent":[]}}],"position":{"start":{"line":120,"column":1,"offset":1818},"end":{"line":120,"column":6,"offset":1823},"indent":[]},"data":{"id":"方法","htmlAttributes":{"id":"方法"},"hProperties":{"id":"方法"}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getzoom","title":null,"children":[],"data":{"hProperties":{"aria-label":"getzoom permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getZoom","position":{"start":{"line":122,"column":5,"offset":1829},"end":{"line":122,"column":12,"offset":1836},"indent":[]}}],"position":{"start":{"line":122,"column":1,"offset":1825},"end":{"line":122,"column":12,"offset":1836},"indent":[]},"data":{"id":"getzoom","htmlAttributes":{"id":"getzoom"},"hProperties":{"id":"getzoom"}}},{"type":"paragraph","children":[{"type":"text","value":"获取当前缩放等级","position":{"start":{"line":123,"column":1,"offset":1837},"end":{"line":123,"column":9,"offset":1845},"indent":[]}}],"position":{"start":{"line":123,"column":1,"offset":1837},"end":{"line":123,"column":9,"offset":1845},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.getZoom();\n
","position":{"start":{"line":125,"column":1,"offset":1847},"end":{"line":127,"column":4,"offset":1881},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"return {float}  当前缩放等级","position":{"start":{"line":129,"column":1,"offset":1883},"end":{"line":129,"column":24,"offset":1906},"indent":[]}}],"position":{"start":{"line":129,"column":1,"offset":1883},"end":{"line":129,"column":24,"offset":1906},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getlayers","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlayers permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLayers()","position":{"start":{"line":131,"column":5,"offset":1912},"end":{"line":131,"column":16,"offset":1923},"indent":[]}}],"position":{"start":{"line":131,"column":1,"offset":1908},"end":{"line":131,"column":16,"offset":1923},"indent":[]},"data":{"id":"getlayers","htmlAttributes":{"id":"getlayers"},"hProperties":{"id":"getlayers"}}},{"type":"paragraph","children":[{"type":"text","value":"获取所有的地图图层","position":{"start":{"line":132,"column":1,"offset":1924},"end":{"line":132,"column":10,"offset":1933},"indent":[]}}],"position":{"start":{"line":132,"column":1,"offset":1924},"end":{"line":132,"column":10,"offset":1933},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.getLayers();\n
","position":{"start":{"line":133,"column":1,"offset":1934},"end":{"line":135,"column":4,"offset":1970},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"return 图层数组 {Array}","position":{"start":{"line":137,"column":1,"offset":1972},"end":{"line":137,"column":21,"offset":1992},"indent":[]}}],"position":{"start":{"line":137,"column":1,"offset":1972},"end":{"line":137,"column":21,"offset":1992},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getcenter","title":null,"children":[],"data":{"hProperties":{"aria-label":"getcenter permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getCenter()","position":{"start":{"line":140,"column":5,"offset":1999},"end":{"line":140,"column":16,"offset":2010},"indent":[]}}],"position":{"start":{"line":140,"column":1,"offset":1995},"end":{"line":140,"column":16,"offset":2010},"indent":[]},"data":{"id":"getcenter","htmlAttributes":{"id":"getcenter"},"hProperties":{"id":"getcenter"}}},{"type":"paragraph","children":[{"type":"text","value":"获取地图中心点","position":{"start":{"line":141,"column":1,"offset":2011},"end":{"line":141,"column":8,"offset":2018},"indent":[]}}],"position":{"start":{"line":141,"column":1,"offset":2011},"end":{"line":141,"column":8,"offset":2018},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.getCenter();\n
","position":{"start":{"line":142,"column":1,"offset":2019},"end":{"line":144,"column":4,"offset":2054},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"return {Lnglat} :地图中心点","position":{"start":{"line":146,"column":1,"offset":2056},"end":{"line":146,"column":23,"offset":2078},"indent":[]}}],"position":{"start":{"line":146,"column":1,"offset":2056},"end":{"line":146,"column":23,"offset":2078},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getsize","title":null,"children":[],"data":{"hProperties":{"aria-label":"getsize permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getSize()","position":{"start":{"line":148,"column":5,"offset":2084},"end":{"line":148,"column":14,"offset":2093},"indent":[]}}],"position":{"start":{"line":148,"column":1,"offset":2080},"end":{"line":148,"column":14,"offset":2093},"indent":[]},"data":{"id":"getsize","htmlAttributes":{"id":"getsize"},"hProperties":{"id":"getsize"}}},{"type":"paragraph","children":[{"type":"text","value":"获取地图容器大小","position":{"start":{"line":149,"column":1,"offset":2094},"end":{"line":149,"column":9,"offset":2102},"indent":[]}}],"position":{"start":{"line":149,"column":1,"offset":2094},"end":{"line":149,"column":9,"offset":2102},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.getSize();\n
","position":{"start":{"line":150,"column":1,"offset":2103},"end":{"line":152,"column":4,"offset":2136},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"return { Object } 地图容器的 width,height","position":{"start":{"line":153,"column":1,"offset":2137},"end":{"line":153,"column":37,"offset":2173},"indent":[]}}],"position":{"start":{"line":153,"column":1,"offset":2137},"end":{"line":153,"column":37,"offset":2173},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getpitch","title":null,"children":[],"data":{"hProperties":{"aria-label":"getpitch permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getPitch()","position":{"start":{"line":155,"column":5,"offset":2179},"end":{"line":155,"column":15,"offset":2189},"indent":[]}}],"position":{"start":{"line":155,"column":1,"offset":2175},"end":{"line":155,"column":15,"offset":2189},"indent":[]},"data":{"id":"getpitch","htmlAttributes":{"id":"getpitch"},"hProperties":{"id":"getpitch"}}},{"type":"paragraph","children":[{"type":"text","value":"获取地图俯仰角","position":{"start":{"line":156,"column":1,"offset":2190},"end":{"line":156,"column":8,"offset":2197},"indent":[]}}],"position":{"start":{"line":156,"column":1,"offset":2190},"end":{"line":156,"column":8,"offset":2197},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.getPitch();\n
","position":{"start":{"line":157,"column":1,"offset":2198},"end":{"line":159,"column":4,"offset":2233},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"return {number} pitch","position":{"start":{"line":161,"column":1,"offset":2235},"end":{"line":161,"column":22,"offset":2256},"indent":[]}}],"position":{"start":{"line":161,"column":1,"offset":2235},"end":{"line":161,"column":22,"offset":2256},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setcenter","title":null,"children":[],"data":{"hProperties":{"aria-label":"setcenter permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setCenter()","position":{"start":{"line":163,"column":5,"offset":2262},"end":{"line":163,"column":16,"offset":2273},"indent":[]}}],"position":{"start":{"line":163,"column":1,"offset":2258},"end":{"line":163,"column":16,"offset":2273},"indent":[]},"data":{"id":"setcenter","htmlAttributes":{"id":"setcenter"},"hProperties":{"id":"setcenter"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图中心点坐标","position":{"start":{"line":164,"column":1,"offset":2274},"end":{"line":164,"column":10,"offset":2283},"indent":[]}}],"position":{"start":{"line":164,"column":1,"offset":2274},"end":{"line":164,"column":10,"offset":2283},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.setCenter([lng, lat]);\n
","position":{"start":{"line":166,"column":1,"offset":2285},"end":{"line":168,"column":4,"offset":2329},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数:","position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":4,"offset":2334},"indent":[]}},{"type":"html","value":"center","position":{"start":{"line":170,"column":4,"offset":2334},"end":{"line":170,"column":12,"offset":2342},"indent":[]}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2342},"end":{"line":170,"column":28,"offset":2358},"indent":[]}}],"position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":28,"offset":2358},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setzoomandcenter","title":null,"children":[],"data":{"hProperties":{"aria-label":"setzoomandcenter permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2365},"end":{"line":173,"column":21,"offset":2381},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":2361},"end":{"line":173,"column":21,"offset":2381},"indent":[]},"data":{"id":"setzoomandcenter","htmlAttributes":{"id":"setzoomandcenter"},"hProperties":{"id":"setzoomandcenter"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391},"indent":[]}}],"position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.setZoomAndCenter(zoom, center);\n
","position":{"start":{"line":175,"column":1,"offset":2392},"end":{"line":177,"column":4,"offset":2445},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数:zoom {number}","position":{"start":{"line":179,"column":1,"offset":2447},"end":{"line":179,"column":17,"offset":2463},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":179,"column":17,"offset":2463},"end":{"line":179,"column":23,"offset":2469},"indent":[]}},{"type":"text","value":"center {LngLat}","position":{"start":{"line":179,"column":23,"offset":2469},"end":{"line":179,"column":38,"offset":2484},"indent":[]}}],"position":{"start":{"line":179,"column":1,"offset":2447},"end":{"line":179,"column":38,"offset":2484},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setrotation","title":null,"children":[],"data":{"hProperties":{"aria-label":"setrotation permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setRotation","position":{"start":{"line":182,"column":5,"offset":2491},"end":{"line":182,"column":16,"offset":2502},"indent":[]}}],"position":{"start":{"line":182,"column":1,"offset":2487},"end":{"line":182,"column":16,"offset":2502},"indent":[]},"data":{"id":"setrotation","htmlAttributes":{"id":"setrotation"},"hProperties":{"id":"setrotation"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图顺时针旋转角度,旋转原点为地图容器中心点,取值范围 ","position":{"start":{"line":183,"column":1,"offset":2503},"end":{"line":183,"column":31,"offset":2533},"indent":[]}},{"type":"linkReference","identifier":"0-360","label":"0-360","referenceType":"shortcut","children":[{"type":"text","value":"0-360","position":{"start":{"line":183,"column":32,"offset":2534},"end":{"line":183,"column":37,"offset":2539},"indent":[]}}],"position":{"start":{"line":183,"column":31,"offset":2533},"end":{"line":183,"column":38,"offset":2540},"indent":[]}}],"position":{"start":{"line":183,"column":1,"offset":2503},"end":{"line":183,"column":38,"offset":2540},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.setRotation(rotation);\n
","position":{"start":{"line":184,"column":1,"offset":2541},"end":{"line":186,"column":4,"offset":2586},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数: ","position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":5,"offset":2592},"indent":[]}},{"type":"html","value":"rotation","position":{"start":{"line":188,"column":5,"offset":2592},"end":{"line":188,"column":15,"offset":2602},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2602},"end":{"line":188,"column":26,"offset":2613},"indent":[]}}],"position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":26,"offset":2613},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#zoomin","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoomin permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2619},"end":{"line":190,"column":11,"offset":2625},"indent":[]}}],"position":{"start":{"line":190,"column":1,"offset":2615},"end":{"line":190,"column":11,"offset":2625},"indent":[]},"data":{"id":"zoomin","htmlAttributes":{"id":"zoomin"},"hProperties":{"id":"zoomin"}}},{"type":"paragraph","children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632},"indent":[]}}],"position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.zoomIn();\n
","position":{"start":{"line":192,"column":1,"offset":2633},"end":{"line":194,"column":4,"offset":2665},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#zoomout","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoomout permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"zoomOut","position":{"start":{"line":196,"column":5,"offset":2671},"end":{"line":196,"column":12,"offset":2678},"indent":[]}}],"position":{"start":{"line":196,"column":1,"offset":2667},"end":{"line":196,"column":12,"offset":2678},"indent":[]},"data":{"id":"zoomout","htmlAttributes":{"id":"zoomout"},"hProperties":{"id":"zoomout"}}},{"type":"paragraph","children":[{"type":"text","value":"地图缩小一级","position":{"start":{"line":197,"column":1,"offset":2679},"end":{"line":197,"column":7,"offset":2685},"indent":[]}}],"position":{"start":{"line":197,"column":1,"offset":2679},"end":{"line":197,"column":7,"offset":2685},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.ZoomOUt();\n
","position":{"start":{"line":198,"column":1,"offset":2686},"end":{"line":200,"column":4,"offset":2719},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#panto","title":null,"children":[],"data":{"hProperties":{"aria-label":"panto permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"panTo","position":{"start":{"line":202,"column":5,"offset":2725},"end":{"line":202,"column":10,"offset":2730},"indent":[]}}],"position":{"start":{"line":202,"column":1,"offset":2721},"end":{"line":202,"column":10,"offset":2730},"indent":[]},"data":{"id":"panto","htmlAttributes":{"id":"panto"},"hProperties":{"id":"panto"}}},{"type":"paragraph","children":[{"type":"text","value":"地图平移到指定的位置","position":{"start":{"line":203,"column":1,"offset":2731},"end":{"line":203,"column":11,"offset":2741},"indent":[]}}],"position":{"start":{"line":203,"column":1,"offset":2731},"end":{"line":203,"column":11,"offset":2741},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.panTo(LngLat);\n
","position":{"start":{"line":204,"column":1,"offset":2742},"end":{"line":206,"column":4,"offset":2779},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数:","position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":4,"offset":2784},"indent":[]}},{"type":"html","value":"center","position":{"start":{"line":208,"column":4,"offset":2784},"end":{"line":208,"column":12,"offset":2792},"indent":[]}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2792},"end":{"line":208,"column":27,"offset":2807},"indent":[]}}],"position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":27,"offset":2807},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#panby","title":null,"children":[],"data":{"hProperties":{"aria-label":"panby permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2813},"end":{"line":210,"column":10,"offset":2818},"indent":[]}}],"position":{"start":{"line":210,"column":1,"offset":2809},"end":{"line":210,"column":10,"offset":2818},"indent":[]},"data":{"id":"panby","htmlAttributes":{"id":"panby"},"hProperties":{"id":"panby"}}},{"type":"paragraph","children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837},"indent":[]}}],"position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.panBy(x, y);\n
","position":{"start":{"line":212,"column":1,"offset":2838},"end":{"line":214,"column":4,"offset":2872},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数:","position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":4,"offset":2876},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":215,"column":4,"offset":2876},"end":{"line":215,"column":10,"offset":2882},"indent":[]}},{"type":"html","value":"x","position":{"start":{"line":215,"column":10,"offset":2882},"end":{"line":215,"column":13,"offset":2885},"indent":[]}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2885},"end":{"line":215,"column":38,"offset":2910},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":215,"column":38,"offset":2910},"end":{"line":215,"column":44,"offset":2916},"indent":[]}},{"type":"text","value":"      ","position":{"start":{"line":215,"column":44,"offset":2916},"end":{"line":215,"column":50,"offset":2922},"indent":[]}},{"type":"html","value":"y","position":{"start":{"line":215,"column":50,"offset":2922},"end":{"line":215,"column":53,"offset":2925},"indent":[]}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2925},"end":{"line":215,"column":79,"offset":2951},"indent":[]}}],"position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":79,"offset":2951},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setpitch","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpitch permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2958},"end":{"line":218,"column":13,"offset":2966},"indent":[]}}],"position":{"start":{"line":218,"column":1,"offset":2954},"end":{"line":218,"column":13,"offset":2966},"indent":[]},"data":{"id":"setpitch","htmlAttributes":{"id":"setpitch"},"hProperties":{"id":"setpitch"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975},"indent":[]}}],"position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.setPitch(pitch);\n
","position":{"start":{"line":220,"column":1,"offset":2976},"end":{"line":222,"column":4,"offset":3015},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数 :","position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":5,"offset":3021},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":224,"column":5,"offset":3021},"end":{"line":224,"column":11,"offset":3027},"indent":[]}},{"type":"text","value":"   ","position":{"start":{"line":224,"column":11,"offset":3027},"end":{"line":224,"column":14,"offset":3030},"indent":[]}},{"type":"html","value":"pitch","position":{"start":{"line":224,"column":14,"offset":3030},"end":{"line":224,"column":21,"offset":3037},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3037},"end":{"line":224,"column":31,"offset":3047},"indent":[]}}],"position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":31,"offset":3047},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#","title":null,"children":[],"data":{"hProperties":{"aria-label":" permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}}],"position":{"start":{"line":226,"column":1,"offset":3049},"end":{"line":226,"column":5,"offset":3053},"indent":[]},"data":{"id":"","htmlAttributes":{"id":""},"hProperties":{"id":""}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setstatus","title":null,"children":[],"data":{"hProperties":{"aria-label":"setstatus permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3059},"end":{"line":228,"column":14,"offset":3068},"indent":[]}}],"position":{"start":{"line":228,"column":1,"offset":3055},"end":{"line":228,"column":14,"offset":3068},"indent":[]},"data":{"id":"setstatus","htmlAttributes":{"id":"setstatus"},"hProperties":{"id":"setstatus"}}},{"type":"paragraph","children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等   ","position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168},"indent":[]}}],"position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.setStatus({\n  dragEnable: true,\n  keyboardEnable: true,\n  doubleClickZoom: true,\n  zoomEnable: true,\n  rotateEnable: true,\n});\n
","position":{"start":{"line":231,"column":1,"offset":3170},"end":{"line":239,"column":4,"offset":3347},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#fitbounds","title":null,"children":[],"data":{"hProperties":{"aria-label":"fitbounds permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"fitBounds","position":{"start":{"line":242,"column":5,"offset":3354},"end":{"line":242,"column":14,"offset":3363},"indent":[]}}],"position":{"start":{"line":242,"column":1,"offset":3350},"end":{"line":242,"column":14,"offset":3363},"indent":[]},"data":{"id":"fitbounds","htmlAttributes":{"id":"fitbounds"},"hProperties":{"id":"fitbounds"}}},{"type":"paragraph","children":[{"type":"text","value":"地图缩放到某个范围内","position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":11,"offset":3374},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":243,"column":11,"offset":3374},"end":{"line":243,"column":17,"offset":3380},"indent":[]}},{"type":"text","value":"参数 :","position":{"start":{"line":243,"column":17,"offset":3380},"end":{"line":243,"column":21,"offset":3384},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":243,"column":21,"offset":3384},"end":{"line":243,"column":27,"offset":3390},"indent":[]}},{"type":"text","value":"  ","position":{"start":{"line":243,"column":27,"offset":3390},"end":{"line":243,"column":29,"offset":3392},"indent":[]}},{"type":"html","value":"extent","position":{"start":{"line":243,"column":29,"offset":3392},"end":{"line":243,"column":37,"offset":3400},"indent":[]}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3400},"end":{"line":243,"column":53,"offset":3416},"indent":[]}},{"type":"linkReference","identifier":"minlng,minlat,maxlng,maxlat","label":"minlng,minlat,maxlng,maxlat","referenceType":"shortcut","children":[{"type":"text","value":"minlng,minlat,maxlng,maxlat","position":{"start":{"line":243,"column":54,"offset":3417},"end":{"line":243,"column":81,"offset":3444},"indent":[]}}],"position":{"start":{"line":243,"column":53,"offset":3416},"end":{"line":243,"column":82,"offset":3445},"indent":[]}}],"position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":82,"offset":3445},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.fitBounds([112, 32, 114, 35]);\n
","position":{"start":{"line":245,"column":1,"offset":3447},"end":{"line":247,"column":4,"offset":3498},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#removelayer","title":null,"children":[],"data":{"hProperties":{"aria-label":"removelayer permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"removeLayer","position":{"start":{"line":251,"column":5,"offset":3506},"end":{"line":251,"column":16,"offset":3517},"indent":[]}}],"position":{"start":{"line":251,"column":1,"offset":3502},"end":{"line":251,"column":16,"offset":3517},"indent":[]},"data":{"id":"removelayer","htmlAttributes":{"id":"removelayer"},"hProperties":{"id":"removelayer"}}},{"type":"paragraph","children":[{"type":"text","value":"移除layer","position":{"start":{"line":252,"column":1,"offset":3518},"end":{"line":252,"column":8,"offset":3525},"indent":[]}}],"position":{"start":{"line":252,"column":1,"offset":3518},"end":{"line":252,"column":8,"offset":3525},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.removeLayer(layer);\n
","position":{"start":{"line":254,"column":1,"offset":3527},"end":{"line":256,"column":4,"offset":3569},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"参数","position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":3,"offset":3573},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":258,"column":3,"offset":3573},"end":{"line":258,"column":9,"offset":3579},"indent":[]}},{"type":"html","value":"layer","position":{"start":{"line":258,"column":9,"offset":3579},"end":{"line":258,"column":16,"offset":3586},"indent":[]}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3586},"end":{"line":258,"column":25,"offset":3595},"indent":[]}}],"position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":25,"offset":3595},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getlayers-1","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlayers 1 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3601},"end":{"line":260,"column":14,"offset":3610},"indent":[]}}],"position":{"start":{"line":260,"column":1,"offset":3597},"end":{"line":260,"column":14,"offset":3610},"indent":[]},"data":{"id":"getlayers-1","htmlAttributes":{"id":"getlayers-1"},"hProperties":{"id":"getlayers-1"}}},{"type":"paragraph","children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622},"indent":[]}}],"position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.getLayers();\n
","position":{"start":{"line":263,"column":1,"offset":3624},"end":{"line":265,"column":4,"offset":3659},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"text","value":"return layers  {array}","position":{"start":{"line":267,"column":1,"offset":3661},"end":{"line":267,"column":24,"offset":3684},"indent":[]}}],"position":{"start":{"line":267,"column":1,"offset":3661},"end":{"line":267,"column":24,"offset":3684},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"事件","position":{"start":{"line":269,"column":4,"offset":3689},"end":{"line":269,"column":6,"offset":3691},"indent":[]}}],"position":{"start":{"line":269,"column":1,"offset":3686},"end":{"line":269,"column":6,"offset":3691},"indent":[]},"data":{"id":"事件","htmlAttributes":{"id":"事件"},"hProperties":{"id":"事件"}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#on","title":null,"children":[],"data":{"hProperties":{"aria-label":"on permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"on","position":{"start":{"line":272,"column":5,"offset":3698},"end":{"line":272,"column":7,"offset":3700},"indent":[]}}],"position":{"start":{"line":272,"column":1,"offset":3694},"end":{"line":272,"column":7,"offset":3700},"indent":[]},"data":{"id":"on","htmlAttributes":{"id":"on"},"hProperties":{"id":"on"}}},{"type":"paragraph","children":[{"type":"text","value":"事件监听","position":{"start":{"line":273,"column":1,"offset":3701},"end":{"line":273,"column":5,"offset":3705},"indent":[]}}],"position":{"start":{"line":273,"column":1,"offset":3701},"end":{"line":273,"column":5,"offset":3705},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#参数","title":null,"children":[],"data":{"hProperties":{"aria-label":"参数 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"参数","position":{"start":{"line":275,"column":6,"offset":3712},"end":{"line":275,"column":8,"offset":3714},"indent":[]}}],"position":{"start":{"line":275,"column":1,"offset":3707},"end":{"line":275,"column":8,"offset":3714},"indent":[]},"data":{"id":"参数","htmlAttributes":{"id":"参数"},"hProperties":{"id":"参数"}}},{"type":"paragraph","children":[{"type":"html","value":"eventName","position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":12,"offset":3726},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3726},"end":{"line":276,"column":26,"offset":3740},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":276,"column":26,"offset":3740},"end":{"line":276,"column":32,"offset":3746},"indent":[]}},{"type":"html","value":"hander","position":{"start":{"line":276,"column":32,"offset":3746},"end":{"line":276,"column":40,"offset":3754},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3754},"end":{"line":276,"column":60,"offset":3774},"indent":[]}}],"position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":60,"offset":3774},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#off","title":null,"children":[],"data":{"hProperties":{"aria-label":"off permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3781},"end":{"line":279,"column":8,"offset":3784},"indent":[]}}],"position":{"start":{"line":279,"column":1,"offset":3777},"end":{"line":279,"column":8,"offset":3784},"indent":[]},"data":{"id":"off","htmlAttributes":{"id":"off"},"hProperties":{"id":"off"}}},{"type":"paragraph","children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":7,"offset":3791},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":280,"column":7,"offset":3791},"end":{"line":280,"column":13,"offset":3797},"indent":[]}},{"type":"html","value":"eventName","position":{"start":{"line":280,"column":13,"offset":3797},"end":{"line":280,"column":24,"offset":3808},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3808},"end":{"line":280,"column":38,"offset":3822},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":280,"column":38,"offset":3822},"end":{"line":280,"column":44,"offset":3828},"indent":[]}},{"type":"html","value":"hander","position":{"start":{"line":280,"column":44,"offset":3828},"end":{"line":280,"column":52,"offset":3836},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3836},"end":{"line":280,"column":72,"offset":3856},"indent":[]}}],"position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":72,"offset":3856},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#地图事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"地图事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3863},"end":{"line":283,"column":9,"offset":3867},"indent":[]}}],"position":{"start":{"line":283,"column":1,"offset":3859},"end":{"line":283,"column":9,"offset":3867},"indent":[]},"data":{"id":"地图事件","htmlAttributes":{"id":"地图事件"},"hProperties":{"id":"地图事件"}}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
","position":{"start":{"line":284,"column":1,"offset":3868},"end":{"line":292,"column":4,"offset":4205},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#鼠标事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"鼠标事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"鼠标事件","position":{"start":{"line":295,"column":5,"offset":4212},"end":{"line":295,"column":9,"offset":4216},"indent":[]}}],"position":{"start":{"line":295,"column":1,"offset":4208},"end":{"line":295,"column":9,"offset":4216},"indent":[]},"data":{"id":"鼠标事件","htmlAttributes":{"id":"鼠标事件"},"hProperties":{"id":"鼠标事件"}}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.on('click', ev => {}); // 鼠标左键点击事件\nscene.on('dblclick', ev => {}); // 鼠标左键双击事件\nscene.on('mousemove', ev => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', ev => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', ev => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', ev => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', ev => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', ev => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', ev => {}); // 鼠标右键单击事件\nscene.on('dragstart', ev => {}); //开始拖拽地图时触发\nscene.on('dragging', ev => {}); // 拖拽地图过程中触发\nscene.on('dragend', ev => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
","position":{"start":{"line":297,"column":1,"offset":4218},"end":{"line":310,"column":4,"offset":4925},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#其它事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"其它事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"其它事件","position":{"start":{"line":312,"column":5,"offset":4931},"end":{"line":312,"column":9,"offset":4935},"indent":[]}}],"position":{"start":{"line":312,"column":1,"offset":4927},"end":{"line":312,"column":9,"offset":4935},"indent":[]},"data":{"id":"其它事件","htmlAttributes":{"id":"其它事件"},"hProperties":{"id":"其它事件"}}},{"type":"html","lang":"javascript","meta":null,"value":"
scene.on('resize', () => {}); // 地图容器大小改变事件\n
","position":{"start":{"line":313,"column":1,"offset":4936},"end":{"line":315,"column":4,"offset":4993},"indent":[1,1]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":318,"column":1,"offset":4996}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-6c1e06477b53b3292a756f3111199015.json b/.cache/caches/gatsby-transformer-remark/diskstore-6c1e06477b53b3292a756f3111199015.json deleted file mode 100644 index 7ee702cf52..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-6c1e06477b53b3292a756f3111199015.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-26a156bc9fc6a07eb205a6a3596b496d-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-6ff3d86f3d5091056b6de32ba0d5591f.json b/.cache/caches/gatsby-transformer-remark/diskstore-6ff3d86f3d5091056b6de32ba0d5591f.json deleted file mode 100644 index 2b9c81c150..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-6ff3d86f3d5091056b6de32ba0d5591f.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-2f14f784391b30b18dddba7eaa548883-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-733d7c702370459f84adbd328b1651a5.json b/.cache/caches/gatsby-transformer-remark/diskstore-733d7c702370459f84adbd328b1651a5.json deleted file mode 100644 index c921a38847..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-733d7c702370459f84adbd328b1651a5.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-4ac738099c50f728749de01c4f86ca68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-739c1d36b4188326eb8d46ad4ca8fe6f.json b/.cache/caches/gatsby-transformer-remark/diskstore-739c1d36b4188326eb8d46ad4ca8fe6f.json deleted file mode 100644 index 54bc4e7106..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-739c1d36b4188326eb8d46ad4ca8fe6f.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-c2d419b3714b95a5e649d8745a7ba50e-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-75ccc6c53e13e0d176bf3912a21c1610.json b/.cache/caches/gatsby-transformer-remark/diskstore-75ccc6c53e13e0d176bf3912a21c1610.json deleted file mode 100644 index bcda6e1a3e..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-75ccc6c53e13e0d176bf3912a21c1610.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-0b8b19ff19f6a64f7b2cae67200ccd88-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-8152d0a6832522eb79f34eecc5e89cd4.json b/.cache/caches/gatsby-transformer-remark/diskstore-8152d0a6832522eb79f34eecc5e89cd4.json deleted file mode 100644 index ff2192548d..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-8152d0a6832522eb79f34eecc5e89cd4.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-b1a6eb4a5fb92e03f562537f31f11c68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-819c3c410e8fbb86079e9344ce585ef4.json b/.cache/caches/gatsby-transformer-remark/diskstore-819c3c410e8fbb86079e9344ce585ef4.json deleted file mode 100644 index e120a209a4..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-819c3c410e8fbb86079e9344ce585ef4.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-c2b718c76cd6918b08bff6ee4b3a63ea-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-8a657829abac5ed5e9e205e519d6ded0.json b/.cache/caches/gatsby-transformer-remark/diskstore-8a657829abac5ed5e9e205e519d6ded0.json deleted file mode 100644 index a9fa458f57..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-8a657829abac5ed5e9e205e519d6ded0.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-99b5b2f90b0432fb92044e231041ffca-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-8bc37c0342e221c46eeda81530413ddf.json b/.cache/caches/gatsby-transformer-remark/diskstore-8bc37c0342e221c46eeda81530413ddf.json deleted file mode 100644 index 2e7f0578f7..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-8bc37c0342e221c46eeda81530413ddf.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-26a156bc9fc6a07eb205a6a3596b496d-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-8d812b6ac59a2818ead6b55b21d7a07d.json b/.cache/caches/gatsby-transformer-remark/diskstore-8d812b6ac59a2818ead6b55b21d7a07d.json deleted file mode 100644 index 7720ae4c2c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-8d812b6ac59a2818ead6b55b21d7a07d.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-2f14f784391b30b18dddba7eaa548883-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-91591c14f7e50cf42c72e59db3f5143b.json b/.cache/caches/gatsby-transformer-remark/diskstore-91591c14f7e50cf42c72e59db3f5143b.json deleted file mode 100644 index adaa008b29..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-91591c14f7e50cf42c72e59db3f5143b.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-8b41ef08d386d48da6524752db1281ec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-9429c44d730cc08b4b28804d3d7d5a2c.json b/.cache/caches/gatsby-transformer-remark/diskstore-9429c44d730cc08b4b28804d3d7d5a2c.json deleted file mode 100644 index af9242f3c5..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-9429c44d730cc08b4b28804d3d7d5a2c.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

L7 地理空间可视化设计语言

"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json b/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json deleted file mode 100644 index a2a95b244c..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json b/.cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json deleted file mode 100644 index 60812259cd..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-440de581fed1a931f1963c1d957506b6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json b/.cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json deleted file mode 100644 index e0852d1a7a..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-db2afa837fc242d71bff6d1c467bb7be-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json b/.cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json deleted file mode 100644 index 65ae89af42..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-c33b8eb118a2549971f1a2859bd8a790-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json b/.cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json deleted file mode 100644 index 7d9849073a..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-8b41ef08d386d48da6524752db1281ec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json b/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json deleted file mode 100644 index 1f5b76225f..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-a4fdd704fadc6272a50f61c3eb36ad4b-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"h1","properties":{"id":"popup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#popup","aria-label":"popup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"popup","position":{"start":{"line":1,"column":3,"offset":2},"end":{"line":1,"column":8,"offset":7}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":8,"offset":7}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图标注信息窗口,用于展示地图要素的属性信息","position":{"start":{"line":3,"column":1,"offset":9},"end":{"line":3,"column":23,"offset":31}}}],"position":{"start":{"line":3,"column":1,"offset":9},"end":{"line":3,"column":23,"offset":31}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"构造函数"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0","aria-label":"构造函数 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"构造函数","position":{"start":{"line":6,"column":4,"offset":37},"end":{"line":6,"column":8,"offset":41}}}],"position":{"start":{"line":6,"column":1,"offset":34},"end":{"line":6,"column":8,"offset":41}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Popup","position":{"start":{"line":7,"column":1,"offset":42},"end":{"line":7,"column":6,"offset":47}}}],"position":{"start":{"line":7,"column":1,"offset":42},"end":{"line":7,"column":6,"offset":47}}},{"type":"text","value":"\n"},{"type":"raw","value":"
const popup = new L7.Popup(option);\n
","position":{"start":{"line":9,"column":1,"offset":49},"end":{"line":11,"column":4,"offset":101}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"option"},"children":[{"type":"element","tagName":"a","properties":{"href":"#option","aria-label":"option permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"option","position":{"start":{"line":14,"column":6,"offset":109},"end":{"line":14,"column":12,"offset":115}}}],"position":{"start":{"line":14,"column":1,"offset":104},"end":{"line":14,"column":12,"offset":115}}},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"closeButton","position":{"start":{"line":16,"column":3,"offset":119},"end":{"line":16,"column":14,"offset":130}}}],"position":{"start":{"line":16,"column":1,"offset":117},"end":{"line":16,"column":14,"offset":130}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"closeOnClick","position":{"start":{"line":17,"column":3,"offset":133},"end":{"line":17,"column":15,"offset":145}}}],"position":{"start":{"line":17,"column":1,"offset":131},"end":{"line":17,"column":15,"offset":145}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"maxWidth","position":{"start":{"line":18,"column":3,"offset":148},"end":{"line":18,"column":11,"offset":156}}}],"position":{"start":{"line":18,"column":1,"offset":146},"end":{"line":18,"column":11,"offset":156}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"anchor","position":{"start":{"line":19,"column":3,"offset":159},"end":{"line":19,"column":9,"offset":165}}}],"position":{"start":{"line":19,"column":1,"offset":157},"end":{"line":19,"column":9,"offset":165}}},{"type":"text","value":"\n"}],"position":{"start":{"line":16,"column":1,"offset":117},"end":{"line":19,"column":9,"offset":165}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"方法"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%96%B9%E6%B3%95","aria-label":"方法 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"方法","position":{"start":{"line":22,"column":4,"offset":171},"end":{"line":22,"column":6,"offset":173}}}],"position":{"start":{"line":22,"column":1,"offset":168},"end":{"line":22,"column":6,"offset":173}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setlnglat","aria-label":"setlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setLnglat","position":{"start":{"line":24,"column":6,"offset":180},"end":{"line":24,"column":15,"offset":189}}}],"position":{"start":{"line":24,"column":1,"offset":175},"end":{"line":24,"column":15,"offset":189}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置popup的经纬度位置","position":{"start":{"line":25,"column":1,"offset":190},"end":{"line":25,"column":14,"offset":203}}},{"type":"raw","value":"
","position":{"start":{"line":25,"column":14,"offset":203},"end":{"line":25,"column":20,"offset":209}}},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"参数","position":{"start":{"line":25,"column":22,"offset":211},"end":{"line":25,"column":24,"offset":213}}}],"position":{"start":{"line":25,"column":20,"offset":209},"end":{"line":25,"column":26,"offset":215}}},{"type":"text","value":":lnglat 经纬度数组 ","position":{"start":{"line":25,"column":26,"offset":215},"end":{"line":25,"column":40,"offset":229}}},{"type":"text","value":"[112,32]","position":{"start":{"line":25,"column":41,"offset":230},"end":{"line":25,"column":47,"offset":236}}}],"position":{"start":{"line":25,"column":1,"offset":190},"end":{"line":25,"column":48,"offset":237}}},{"type":"text","value":"\n"},{"type":"raw","value":"
popup.setLnglat([112, 32]);\n
","position":{"start":{"line":27,"column":1,"offset":239},"end":{"line":29,"column":4,"offset":284}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"addto"},"children":[{"type":"element","tagName":"a","properties":{"href":"#addto","aria-label":"addto permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"addTo","position":{"start":{"line":32,"column":6,"offset":292},"end":{"line":32,"column":11,"offset":297}}}],"position":{"start":{"line":32,"column":1,"offset":287},"end":{"line":32,"column":11,"offset":297}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"参数","position":{"start":{"line":33,"column":3,"offset":300},"end":{"line":33,"column":5,"offset":302}}}],"position":{"start":{"line":33,"column":1,"offset":298},"end":{"line":33,"column":7,"offset":304}}},{"type":"text","value":":scene 地图scene实例","position":{"start":{"line":33,"column":7,"offset":304},"end":{"line":33,"column":23,"offset":320}}}],"position":{"start":{"line":33,"column":1,"offset":298},"end":{"line":33,"column":23,"offset":320}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"将popup添加到地图scene显示","position":{"start":{"line":35,"column":1,"offset":322},"end":{"line":35,"column":19,"offset":340}}}],"position":{"start":{"line":35,"column":1,"offset":322},"end":{"line":35,"column":19,"offset":340}}},{"type":"text","value":"\n"},{"type":"raw","value":"
popup.addTo(scene);\n
","position":{"start":{"line":37,"column":1,"offset":342},"end":{"line":39,"column":4,"offset":379}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"sethtml"},"children":[{"type":"element","tagName":"a","properties":{"href":"#sethtml","aria-label":"sethtml permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setHtml","position":{"start":{"line":42,"column":6,"offset":387},"end":{"line":42,"column":13,"offset":394}}}],"position":{"start":{"line":42,"column":1,"offset":382},"end":{"line":42,"column":13,"offset":394}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"参数","position":{"start":{"line":43,"column":3,"offset":397},"end":{"line":43,"column":5,"offset":399}}}],"position":{"start":{"line":43,"column":1,"offset":395},"end":{"line":43,"column":7,"offset":401}}},{"type":"text","value":":html 字符串","position":{"start":{"line":43,"column":7,"offset":401},"end":{"line":43,"column":16,"offset":410}}}],"position":{"start":{"line":43,"column":1,"offset":395},"end":{"line":43,"column":16,"offset":410}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置popup html 内容","position":{"start":{"line":45,"column":1,"offset":412},"end":{"line":45,"column":16,"offset":427}}}],"position":{"start":{"line":45,"column":1,"offset":412},"end":{"line":45,"column":16,"offset":427}}},{"type":"text","value":"\n"},{"type":"raw","value":"
var html =\n  '<p>\\u7701\\u4EFD\\uFF1A' +\n  feature.s +\n  '</p>\\n        <p>\\u5730\\u533A\\uFF1A' +\n  feature.m +\n  '</p>\\n        <p>\\u6E29\\u5EA6\\uFF1A' +\n  feature.t +\n  '</p>\\n        ';\npopup.setHtml(html);\n
","position":{"start":{"line":47,"column":1,"offset":429},"end":{"line":51,"column":4,"offset":639}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"settext"},"children":[{"type":"element","tagName":"a","properties":{"href":"#settext","aria-label":"settext permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setText","position":{"start":{"line":54,"column":6,"offset":647},"end":{"line":54,"column":13,"offset":654}}}],"position":{"start":{"line":54,"column":1,"offset":642},"end":{"line":54,"column":13,"offset":654}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置 popup 显示文本内容","position":{"start":{"line":55,"column":1,"offset":655},"end":{"line":55,"column":16,"offset":670}}}],"position":{"start":{"line":55,"column":1,"offset":655},"end":{"line":55,"column":16,"offset":670}}},{"type":"text","value":"\n"},{"type":"raw","value":"
popup.setText('hello world');\n
","position":{"start":{"line":57,"column":1,"offset":672},"end":{"line":59,"column":4,"offset":719}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"remove"},"children":[{"type":"element","tagName":"a","properties":{"href":"#remove","aria-label":"remove permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"remove","position":{"start":{"line":62,"column":6,"offset":727},"end":{"line":62,"column":12,"offset":733}}}],"position":{"start":{"line":62,"column":1,"offset":722},"end":{"line":62,"column":12,"offset":733}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除popup","position":{"start":{"line":63,"column":1,"offset":734},"end":{"line":63,"column":8,"offset":741}}}],"position":{"start":{"line":63,"column":1,"offset":734},"end":{"line":63,"column":8,"offset":741}}},{"type":"text","value":"\n"},{"type":"raw","value":"
popup.remove();\n
","position":{"start":{"line":65,"column":1,"offset":743},"end":{"line":67,"column":4,"offset":775}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E4%BA%8B%E4%BB%B6","aria-label":"事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"事件","position":{"start":{"line":70,"column":4,"offset":781},"end":{"line":70,"column":6,"offset":783}}}],"position":{"start":{"line":70,"column":1,"offset":778},"end":{"line":70,"column":6,"offset":783}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"close"},"children":[{"type":"element","tagName":"a","properties":{"href":"#close","aria-label":"close permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"close","position":{"start":{"line":72,"column":6,"offset":790},"end":{"line":72,"column":11,"offset":795}}}],"position":{"start":{"line":72,"column":1,"offset":785},"end":{"line":72,"column":11,"offset":795}}},{"type":"text","value":"\n"},{"type":"raw","value":"
popup.on('close', () => {});\n
","position":{"start":{"line":74,"column":1,"offset":797},"end":{"line":76,"column":4,"offset":839}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"示例代码"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81","aria-label":"示例代码 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"示例代码","position":{"start":{"line":79,"column":4,"offset":845},"end":{"line":79,"column":8,"offset":849}}}],"position":{"start":{"line":79,"column":1,"offset":842},"end":{"line":79,"column":8,"offset":849}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"添加popup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%B7%BB%E5%8A%A0popup","aria-label":"添加popup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"添加popup","position":{"start":{"line":81,"column":6,"offset":856},"end":{"line":81,"column":13,"offset":863}}}],"position":{"start":{"line":81,"column":1,"offset":851},"end":{"line":81,"column":13,"offset":863}}},{"type":"text","value":"\n"},{"type":"raw","value":"
  var html = '<p>'+feature.m+'</p>';\n  const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
","position":{"start":{"line":83,"column":1,"offset":865},"end":{"line":86,"column":4,"offset":981}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"faq"},"children":[{"type":"element","tagName":"a","properties":{"href":"#faq","aria-label":"faq permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"FAQ","position":{"start":{"line":88,"column":5,"offset":987},"end":{"line":88,"column":8,"offset":990}}}],"position":{"start":{"line":88,"column":1,"offset":983},"end":{"line":88,"column":8,"offset":990}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":89,"column":1,"offset":991}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a846c729526a0e04a6fb8586c2f82dbe.json b/.cache/caches/gatsby-transformer-remark/diskstore-a846c729526a0e04a6fb8586c2f82dbe.json deleted file mode 100644 index 73833a48a9..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-a846c729526a0e04a6fb8586c2f82dbe.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-781c0a32942295837c2990e69f6d666a-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-ab3c328a2b98edcd782e2b4ea47d83c8.json b/.cache/caches/gatsby-transformer-remark/diskstore-ab3c328a2b98edcd782e2b4ea47d83c8.json deleted file mode 100644 index 660648b17a..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-ab3c328a2b98edcd782e2b4ea47d83c8.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-b203d64bdde854a7c4141aaf3bd814db-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"h2","properties":{"id":"简介"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%AE%80%E4%BB%8B","aria-label":"简介 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"简介","position":{"start":{"line":2,"column":4,"offset":4},"end":{"line":2,"column":6,"offset":6}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":6,"offset":6}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"raw","value":"Scene","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15}}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39}}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}},{"type":"text","value":"\n"},{"type":"raw","value":"
import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n  id: 'map',\n  mapStyle: 'dark',\n  center: [110.770672, 34.159869],\n  pitch: 45,\n});\n
","position":{"start":{"line":7,"column":1,"offset":47},"end":{"line":15,"column":4,"offset":214}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"构造函数"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0","aria-label":"构造函数 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"构造函数","position":{"start":{"line":18,"column":5,"offset":221},"end":{"line":18,"column":9,"offset":225}}}],"position":{"start":{"line":18,"column":1,"offset":217},"end":{"line":18,"column":9,"offset":225}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Scene","position":{"start":{"line":20,"column":3,"offset":229},"end":{"line":20,"column":8,"offset":234}}}],"position":{"start":{"line":20,"column":1,"offset":227},"end":{"line":20,"column":10,"offset":236}}},{"type":"raw","value":"
","position":{"start":{"line":20,"column":10,"offset":236},"end":{"line":20,"column":16,"offset":242}}},{"type":"text","value":"支持两种实例化方式","position":{"start":{"line":20,"column":16,"offset":242},"end":{"line":20,"column":25,"offset":251}}}],"position":{"start":{"line":20,"column":1,"offset":227},"end":{"line":20,"column":25,"offset":251}}},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"独立实例化 内部根据id自动穿件地图实例","position":{"start":{"line":22,"column":3,"offset":255},"end":{"line":22,"column":23,"offset":275}}}],"position":{"start":{"line":22,"column":1,"offset":253},"end":{"line":22,"column":23,"offset":275}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"传入地图实例","position":{"start":{"line":23,"column":3,"offset":278},"end":{"line":23,"column":9,"offset":284}}}],"position":{"start":{"line":23,"column":1,"offset":276},"end":{"line":23,"column":9,"offset":284}}},{"type":"text","value":"\n"}],"position":{"start":{"line":22,"column":1,"offset":253},"end":{"line":23,"column":9,"offset":284}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"独立实例化-scene"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%8B%AC%E7%AB%8B%E5%AE%9E%E4%BE%8B%E5%8C%96-scene","aria-label":"独立实例化 scene permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"独立实例化 Scene","position":{"start":{"line":29,"column":6,"offset":295},"end":{"line":29,"column":17,"offset":306}}}],"position":{"start":{"line":29,"column":1,"offset":290},"end":{"line":29,"column":17,"offset":306}}},{"type":"text","value":"\n"},{"type":"raw","value":"
const scene = new L7.Scene({\n  id: 'map',\n  mapStyle: 'dark',\n  center: [120.19382669582967, 30.258134],\n  pitch: 0,\n  zoom: 12,\n  maxZoom: 20,\n  minZoom: 0,\n});\n
","position":{"start":{"line":31,"column":1,"offset":308},"end":{"line":41,"column":4,"offset":488}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"根据map-实例创建sence"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%A0%B9%E6%8D%AEmap-%E5%AE%9E%E4%BE%8B%E5%88%9B%E5%BB%BAsence","aria-label":"根据map 实例创建sence permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"根据map 实例创建Sence","position":{"start":{"line":44,"column":6,"offset":496},"end":{"line":44,"column":21,"offset":511}}}],"position":{"start":{"line":44,"column":1,"offset":491},"end":{"line":44,"column":21,"offset":511}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"_L7 基于高德地图3D模式开发的,因此传入Map实例 _","position":{"start":{"line":46,"column":1,"offset":513},"end":{"line":46,"column":30,"offset":542}}},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"viewModes需要设置成3d","position":{"start":{"line":46,"column":31,"offset":543},"end":{"line":46,"column":47,"offset":559}}}],"position":{"start":{"line":46,"column":30,"offset":542},"end":{"line":46,"column":48,"offset":560}}},{"type":"raw","value":"
","position":{"start":{"line":46,"column":48,"offset":560},"end":{"line":46,"column":54,"offset":566}}},{"type":"text","value":"_","position":{"start":{"line":46,"column":54,"offset":566},"end":{"line":46,"column":55,"offset":567}}}],"position":{"start":{"line":46,"column":1,"offset":513},"end":{"line":46,"column":55,"offset":567}}},{"type":"text","value":"\n"},{"type":"raw","value":"
var mapinstance = new AMap.Map('map', {\n  center: [120.19382669582967, 30.258134],\n  viewMode: '3D',\n  pitch: 0,\n  zoom: 12,\n  maxZoom: 20,\n  minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n  mapStyle: 'dark',\n  map: mapinstance,\n});\n
","position":{"start":{"line":47,"column":1,"offset":568},"end":{"line":61,"column":4,"offset":827}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"map"},"children":[{"type":"element","tagName":"a","properties":{"href":"#map","aria-label":"map permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"map","position":{"start":{"line":64,"column":4,"offset":833},"end":{"line":64,"column":7,"offset":836}}}],"position":{"start":{"line":64,"column":1,"offset":830},"end":{"line":64,"column":7,"offset":836}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"L7 在scene 下保留了高德地图实例,可以通过scene.map 调用高德地图的map方法。","position":{"start":{"line":65,"column":1,"offset":837},"end":{"line":65,"column":49,"offset":885}}},{"type":"raw","value":"
","position":{"start":{"line":65,"column":49,"offset":885},"end":{"line":65,"column":55,"offset":891}}},{"type":"text","value":"map 实例方法见","position":{"start":{"line":65,"column":55,"offset":891},"end":{"line":65,"column":64,"offset":900}}},{"type":"element","tagName":"a","properties":{"href":"https://lbs.amap.com/api/javascript-api/reference/map","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"高德地图文档","position":{"start":{"line":65,"column":65,"offset":901},"end":{"line":65,"column":71,"offset":907}}}],"position":{"start":{"line":65,"column":64,"offset":900},"end":{"line":65,"column":127,"offset":963}}}],"position":{"start":{"line":65,"column":1,"offset":837},"end":{"line":65,"column":127,"offset":963}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.map;\n
","position":{"start":{"line":67,"column":1,"offset":965},"end":{"line":69,"column":4,"offset":992}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"构造类"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%9E%84%E9%80%A0%E7%B1%BB","aria-label":"构造类 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"构造类","position":{"start":{"line":72,"column":4,"offset":998},"end":{"line":72,"column":7,"offset":1001}}}],"position":{"start":{"line":72,"column":1,"offset":995},"end":{"line":72,"column":7,"offset":1001}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"pointlayer"},"children":[{"type":"element","tagName":"a","properties":{"href":"#pointlayer","aria-label":"pointlayer permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"PointLayer","position":{"start":{"line":74,"column":5,"offset":1007},"end":{"line":74,"column":15,"offset":1017}}}],"position":{"start":{"line":74,"column":1,"offset":1003},"end":{"line":74,"column":15,"offset":1017}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"新建点图层","position":{"start":{"line":75,"column":1,"offset":1018},"end":{"line":75,"column":6,"offset":1023}}}],"position":{"start":{"line":75,"column":1,"offset":1018},"end":{"line":75,"column":6,"offset":1023}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"polylinelayer"},"children":[{"type":"element","tagName":"a","properties":{"href":"#polylinelayer","aria-label":"polylinelayer permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"PolylineLayer","position":{"start":{"line":77,"column":5,"offset":1029},"end":{"line":77,"column":18,"offset":1042}}}],"position":{"start":{"line":77,"column":1,"offset":1025},"end":{"line":77,"column":18,"offset":1042}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"新建线图层","position":{"start":{"line":78,"column":1,"offset":1043},"end":{"line":78,"column":6,"offset":1048}}}],"position":{"start":{"line":78,"column":1,"offset":1043},"end":{"line":78,"column":6,"offset":1048}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"polygonlayer"},"children":[{"type":"element","tagName":"a","properties":{"href":"#polygonlayer","aria-label":"polygonlayer permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"PolygonLayer","position":{"start":{"line":80,"column":5,"offset":1054},"end":{"line":80,"column":17,"offset":1066}}}],"position":{"start":{"line":80,"column":1,"offset":1050},"end":{"line":80,"column":17,"offset":1066}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"新建面图层","position":{"start":{"line":81,"column":1,"offset":1067},"end":{"line":81,"column":6,"offset":1072}}}],"position":{"start":{"line":81,"column":1,"offset":1067},"end":{"line":81,"column":6,"offset":1072}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"imagelayer"},"children":[{"type":"element","tagName":"a","properties":{"href":"#imagelayer","aria-label":"imagelayer permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"ImageLayer","position":{"start":{"line":83,"column":5,"offset":1078},"end":{"line":83,"column":15,"offset":1088}}}],"position":{"start":{"line":83,"column":1,"offset":1074},"end":{"line":83,"column":15,"offset":1088}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"新建图片图层","position":{"start":{"line":84,"column":1,"offset":1089},"end":{"line":84,"column":7,"offset":1095}}}],"position":{"start":{"line":84,"column":1,"offset":1089},"end":{"line":84,"column":7,"offset":1095}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"配置项"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E9%85%8D%E7%BD%AE%E9%A1%B9","aria-label":"配置项 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"配置项","position":{"start":{"line":87,"column":4,"offset":1101},"end":{"line":87,"column":7,"offset":1104}}}],"position":{"start":{"line":87,"column":1,"offset":1098},"end":{"line":87,"column":7,"offset":1104}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"id"},"children":[{"type":"element","tagName":"a","properties":{"href":"#id","aria-label":"id permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"id","position":{"start":{"line":89,"column":5,"offset":1110},"end":{"line":89,"column":7,"offset":1112}}}],"position":{"start":{"line":89,"column":1,"offset":1106},"end":{"line":89,"column":7,"offset":1112}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"需传入 dom 容器或者容器 id  {domObject || string} ","position":{"start":{"line":90,"column":1,"offset":1113},"end":{"line":90,"column":42,"offset":1154}}},{"type":"text","value":"[必选]","position":{"start":{"line":90,"column":43,"offset":1155},"end":{"line":90,"column":45,"offset":1157}}}],"position":{"start":{"line":90,"column":1,"offset":1113},"end":{"line":90,"column":46,"offset":1158}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"zoom"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoom","aria-label":"zoom permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"zoom","position":{"start":{"line":93,"column":5,"offset":1165},"end":{"line":93,"column":9,"offset":1169}}}],"position":{"start":{"line":93,"column":1,"offset":1161},"end":{"line":93,"column":9,"offset":1169}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图初始显示级别 {number} (0-22)","position":{"start":{"line":94,"column":1,"offset":1170},"end":{"line":94,"column":26,"offset":1195}}}],"position":{"start":{"line":94,"column":1,"offset":1170},"end":{"line":94,"column":26,"offset":1195}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"center"},"children":[{"type":"element","tagName":"a","properties":{"href":"#center","aria-label":"center permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"center","position":{"start":{"line":96,"column":5,"offset":1201},"end":{"line":96,"column":11,"offset":1207}}}],"position":{"start":{"line":96,"column":1,"offset":1197},"end":{"line":96,"column":11,"offset":1207}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图初始中心经纬度 {Lnglat}","position":{"start":{"line":97,"column":1,"offset":1208},"end":{"line":97,"column":19,"offset":1226}}}],"position":{"start":{"line":97,"column":1,"offset":1208},"end":{"line":97,"column":19,"offset":1226}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"pitch"},"children":[{"type":"element","tagName":"a","properties":{"href":"#pitch","aria-label":"pitch permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"pitch","position":{"start":{"line":99,"column":5,"offset":1232},"end":{"line":99,"column":10,"offset":1237}}}],"position":{"start":{"line":99,"column":1,"offset":1228},"end":{"line":99,"column":10,"offset":1237}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图初始俯仰角度 {number}  default 0","position":{"start":{"line":100,"column":1,"offset":1238},"end":{"line":100,"column":29,"offset":1266}}}],"position":{"start":{"line":100,"column":1,"offset":1238},"end":{"line":100,"column":29,"offset":1266}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"mapsyle"},"children":[{"type":"element","tagName":"a","properties":{"href":"#mapsyle","aria-label":"mapsyle permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"mapSyle","position":{"start":{"line":102,"column":5,"offset":1272},"end":{"line":102,"column":12,"offset":1279}}}],"position":{"start":{"line":102,"column":1,"offset":1268},"end":{"line":102,"column":12,"offset":1279}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图样式 {style} 目前仅支持高德地图。 default 'dark'","position":{"start":{"line":103,"column":1,"offset":1280},"end":{"line":103,"column":39,"offset":1318}}},{"type":"raw","value":"
","position":{"start":{"line":103,"column":39,"offset":1318},"end":{"line":103,"column":45,"offset":1324}}},{"type":"text","value":"L7 内置三种种默认地图样式 dark | light|blank 空地图","position":{"start":{"line":103,"column":45,"offset":1324},"end":{"line":103,"column":82,"offset":1361}}}],"position":{"start":{"line":103,"column":1,"offset":1280},"end":{"line":103,"column":82,"offset":1361}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图的显示样式,目前支持两种地图样式:","position":{"start":{"line":105,"column":1,"offset":1363},"end":{"line":105,"column":22,"offset":1384}}},{"type":"raw","value":"
","position":{"start":{"line":105,"column":22,"offset":1384},"end":{"line":105,"column":28,"offset":1390}}},{"type":"text","value":"第一种:自定义地图样式,如","position":{"start":{"line":105,"column":28,"offset":1390},"end":{"line":105,"column":41,"offset":1403}}},{"type":"raw","value":""amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"","position":{"start":{"line":105,"column":41,"offset":1403},"end":{"line":105,"column":91,"offset":1453}}},{"type":"raw","value":"
","position":{"start":{"line":105,"column":91,"offset":1453},"end":{"line":105,"column":97,"offset":1459}}},{"type":"text","value":"可前往","position":{"start":{"line":105,"column":97,"offset":1459},"end":{"line":105,"column":100,"offset":1462}}},{"type":"element","tagName":"a","properties":{"href":"https://lbs.amap.com/dev/mapstyle/index","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"地图自定义平台","position":{"start":{"line":105,"column":101,"offset":1463},"end":{"line":105,"column":108,"offset":1470}}}],"position":{"start":{"line":105,"column":100,"offset":1462},"end":{"line":105,"column":150,"offset":1512}}},{"type":"text","value":"定制自己的个性地图样式;","position":{"start":{"line":105,"column":150,"offset":1512},"end":{"line":105,"column":162,"offset":1524}}},{"type":"raw","value":"
","position":{"start":{"line":105,"column":162,"offset":1524},"end":{"line":105,"column":168,"offset":1530}}},{"type":"text","value":"第二种:官方样式模版,如","position":{"start":{"line":105,"column":168,"offset":1530},"end":{"line":105,"column":180,"offset":1542}}},{"type":"raw","value":""amap://styles/grey"","position":{"start":{"line":105,"column":180,"offset":1542},"end":{"line":105,"column":202,"offset":1564}}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1564},"end":{"line":105,"column":203,"offset":1565}}},{"type":"raw","value":"
","position":{"start":{"line":105,"column":203,"offset":1565},"end":{"line":105,"column":209,"offset":1571}}},{"type":"text","value":"其他模版样式及自定义地图的使用说明见","position":{"start":{"line":105,"column":209,"offset":1571},"end":{"line":105,"column":227,"offset":1589}}},{"type":"element","tagName":"a","properties":{"href":"https://lbs.amap.com/api/javascript-api/guide/create-map/mapstye/","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"开发指南","position":{"start":{"line":105,"column":228,"offset":1590},"end":{"line":105,"column":232,"offset":1594}}}],"position":{"start":{"line":105,"column":227,"offset":1589},"end":{"line":105,"column":300,"offset":1662}}}],"position":{"start":{"line":105,"column":1,"offset":1363},"end":{"line":105,"column":300,"offset":1662}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"minzoom"},"children":[{"type":"element","tagName":"a","properties":{"href":"#minzoom","aria-label":"minzoom permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"minZoom","position":{"start":{"line":108,"column":5,"offset":1669},"end":{"line":108,"column":12,"offset":1676}}}],"position":{"start":{"line":108,"column":1,"offset":1665},"end":{"line":108,"column":12,"offset":1676}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图最小缩放等级 {number}  default 0 (0-22)","position":{"start":{"line":109,"column":1,"offset":1677},"end":{"line":109,"column":37,"offset":1713}}}],"position":{"start":{"line":109,"column":1,"offset":1677},"end":{"line":109,"column":37,"offset":1713}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"maxzoom"},"children":[{"type":"element","tagName":"a","properties":{"href":"#maxzoom","aria-label":"maxzoom permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"maxZoom","position":{"start":{"line":111,"column":5,"offset":1719},"end":{"line":111,"column":12,"offset":1726}}}],"position":{"start":{"line":111,"column":1,"offset":1715},"end":{"line":111,"column":12,"offset":1726}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图最大缩放等级 {number}  default 22 (0-22)","position":{"start":{"line":112,"column":1,"offset":1727},"end":{"line":112,"column":38,"offset":1764}}}],"position":{"start":{"line":112,"column":1,"offset":1727},"end":{"line":112,"column":38,"offset":1764}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"rotateenable"},"children":[{"type":"element","tagName":"a","properties":{"href":"#rotateenable","aria-label":"rotateenable permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"rotateEnable","position":{"start":{"line":114,"column":5,"offset":1770},"end":{"line":114,"column":17,"offset":1782}}}],"position":{"start":{"line":114,"column":1,"offset":1766},"end":{"line":114,"column":17,"offset":1782}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图是否可旋转 {Boolean} default true","position":{"start":{"line":115,"column":1,"offset":1783},"end":{"line":115,"column":31,"offset":1813}}}],"position":{"start":{"line":115,"column":1,"offset":1783},"end":{"line":115,"column":31,"offset":1813}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"方法"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%96%B9%E6%B3%95","aria-label":"方法 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"方法","position":{"start":{"line":120,"column":4,"offset":1821},"end":{"line":120,"column":6,"offset":1823}}}],"position":{"start":{"line":120,"column":1,"offset":1818},"end":{"line":120,"column":6,"offset":1823}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getzoom"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getzoom","aria-label":"getzoom permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getZoom","position":{"start":{"line":122,"column":5,"offset":1829},"end":{"line":122,"column":12,"offset":1836}}}],"position":{"start":{"line":122,"column":1,"offset":1825},"end":{"line":122,"column":12,"offset":1836}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取当前缩放等级","position":{"start":{"line":123,"column":1,"offset":1837},"end":{"line":123,"column":9,"offset":1845}}}],"position":{"start":{"line":123,"column":1,"offset":1837},"end":{"line":123,"column":9,"offset":1845}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.getZoom();\n
","position":{"start":{"line":125,"column":1,"offset":1847},"end":{"line":127,"column":4,"offset":1881}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"return {float}  当前缩放等级","position":{"start":{"line":129,"column":1,"offset":1883},"end":{"line":129,"column":24,"offset":1906}}}],"position":{"start":{"line":129,"column":1,"offset":1883},"end":{"line":129,"column":24,"offset":1906}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getlayers"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlayers","aria-label":"getlayers permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLayers()","position":{"start":{"line":131,"column":5,"offset":1912},"end":{"line":131,"column":16,"offset":1923}}}],"position":{"start":{"line":131,"column":1,"offset":1908},"end":{"line":131,"column":16,"offset":1923}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取所有的地图图层","position":{"start":{"line":132,"column":1,"offset":1924},"end":{"line":132,"column":10,"offset":1933}}}],"position":{"start":{"line":132,"column":1,"offset":1924},"end":{"line":132,"column":10,"offset":1933}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.getLayers();\n
","position":{"start":{"line":133,"column":1,"offset":1934},"end":{"line":135,"column":4,"offset":1970}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"return 图层数组 {Array}","position":{"start":{"line":137,"column":1,"offset":1972},"end":{"line":137,"column":21,"offset":1992}}}],"position":{"start":{"line":137,"column":1,"offset":1972},"end":{"line":137,"column":21,"offset":1992}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getcenter"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getcenter","aria-label":"getcenter permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getCenter()","position":{"start":{"line":140,"column":5,"offset":1999},"end":{"line":140,"column":16,"offset":2010}}}],"position":{"start":{"line":140,"column":1,"offset":1995},"end":{"line":140,"column":16,"offset":2010}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取地图中心点","position":{"start":{"line":141,"column":1,"offset":2011},"end":{"line":141,"column":8,"offset":2018}}}],"position":{"start":{"line":141,"column":1,"offset":2011},"end":{"line":141,"column":8,"offset":2018}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.getCenter();\n
","position":{"start":{"line":142,"column":1,"offset":2019},"end":{"line":144,"column":4,"offset":2054}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"return {Lnglat} :地图中心点","position":{"start":{"line":146,"column":1,"offset":2056},"end":{"line":146,"column":23,"offset":2078}}}],"position":{"start":{"line":146,"column":1,"offset":2056},"end":{"line":146,"column":23,"offset":2078}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getsize"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getsize","aria-label":"getsize permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getSize()","position":{"start":{"line":148,"column":5,"offset":2084},"end":{"line":148,"column":14,"offset":2093}}}],"position":{"start":{"line":148,"column":1,"offset":2080},"end":{"line":148,"column":14,"offset":2093}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取地图容器大小","position":{"start":{"line":149,"column":1,"offset":2094},"end":{"line":149,"column":9,"offset":2102}}}],"position":{"start":{"line":149,"column":1,"offset":2094},"end":{"line":149,"column":9,"offset":2102}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.getSize();\n
","position":{"start":{"line":150,"column":1,"offset":2103},"end":{"line":152,"column":4,"offset":2136}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"return { Object } 地图容器的 width,height","position":{"start":{"line":153,"column":1,"offset":2137},"end":{"line":153,"column":37,"offset":2173}}}],"position":{"start":{"line":153,"column":1,"offset":2137},"end":{"line":153,"column":37,"offset":2173}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getpitch"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getpitch","aria-label":"getpitch permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getPitch()","position":{"start":{"line":155,"column":5,"offset":2179},"end":{"line":155,"column":15,"offset":2189}}}],"position":{"start":{"line":155,"column":1,"offset":2175},"end":{"line":155,"column":15,"offset":2189}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取地图俯仰角","position":{"start":{"line":156,"column":1,"offset":2190},"end":{"line":156,"column":8,"offset":2197}}}],"position":{"start":{"line":156,"column":1,"offset":2190},"end":{"line":156,"column":8,"offset":2197}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.getPitch();\n
","position":{"start":{"line":157,"column":1,"offset":2198},"end":{"line":159,"column":4,"offset":2233}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"return {number} pitch","position":{"start":{"line":161,"column":1,"offset":2235},"end":{"line":161,"column":22,"offset":2256}}}],"position":{"start":{"line":161,"column":1,"offset":2235},"end":{"line":161,"column":22,"offset":2256}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setcenter"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setcenter","aria-label":"setcenter permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setCenter()","position":{"start":{"line":163,"column":5,"offset":2262},"end":{"line":163,"column":16,"offset":2273}}}],"position":{"start":{"line":163,"column":1,"offset":2258},"end":{"line":163,"column":16,"offset":2273}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图中心点坐标","position":{"start":{"line":164,"column":1,"offset":2274},"end":{"line":164,"column":10,"offset":2283}}}],"position":{"start":{"line":164,"column":1,"offset":2274},"end":{"line":164,"column":10,"offset":2283}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.setCenter([lng, lat]);\n
","position":{"start":{"line":166,"column":1,"offset":2285},"end":{"line":168,"column":4,"offset":2329}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数:","position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":4,"offset":2334}}},{"type":"raw","value":"center","position":{"start":{"line":170,"column":4,"offset":2334},"end":{"line":170,"column":12,"offset":2342}}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2342},"end":{"line":170,"column":28,"offset":2358}}}],"position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":28,"offset":2358}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setzoomandcenter"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setzoomandcenter","aria-label":"setzoomandcenter permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2365},"end":{"line":173,"column":21,"offset":2381}}}],"position":{"start":{"line":173,"column":1,"offset":2361},"end":{"line":173,"column":21,"offset":2381}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391}}}],"position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.setZoomAndCenter(zoom, center);\n
","position":{"start":{"line":175,"column":1,"offset":2392},"end":{"line":177,"column":4,"offset":2445}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数:zoom {number}","position":{"start":{"line":179,"column":1,"offset":2447},"end":{"line":179,"column":17,"offset":2463}}},{"type":"raw","value":"
","position":{"start":{"line":179,"column":17,"offset":2463},"end":{"line":179,"column":23,"offset":2469}}},{"type":"text","value":"center {LngLat}","position":{"start":{"line":179,"column":23,"offset":2469},"end":{"line":179,"column":38,"offset":2484}}}],"position":{"start":{"line":179,"column":1,"offset":2447},"end":{"line":179,"column":38,"offset":2484}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setrotation"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setrotation","aria-label":"setrotation permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setRotation","position":{"start":{"line":182,"column":5,"offset":2491},"end":{"line":182,"column":16,"offset":2502}}}],"position":{"start":{"line":182,"column":1,"offset":2487},"end":{"line":182,"column":16,"offset":2502}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图顺时针旋转角度,旋转原点为地图容器中心点,取值范围 ","position":{"start":{"line":183,"column":1,"offset":2503},"end":{"line":183,"column":31,"offset":2533}}},{"type":"text","value":"[0-360]","position":{"start":{"line":183,"column":32,"offset":2534},"end":{"line":183,"column":37,"offset":2539}}}],"position":{"start":{"line":183,"column":1,"offset":2503},"end":{"line":183,"column":38,"offset":2540}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.setRotation(rotation);\n
","position":{"start":{"line":184,"column":1,"offset":2541},"end":{"line":186,"column":4,"offset":2586}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数: ","position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":5,"offset":2592}}},{"type":"raw","value":"rotation","position":{"start":{"line":188,"column":5,"offset":2592},"end":{"line":188,"column":15,"offset":2602}}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2602},"end":{"line":188,"column":26,"offset":2613}}}],"position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":26,"offset":2613}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"zoomin"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoomin","aria-label":"zoomin permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2619},"end":{"line":190,"column":11,"offset":2625}}}],"position":{"start":{"line":190,"column":1,"offset":2615},"end":{"line":190,"column":11,"offset":2625}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632}}}],"position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.zoomIn();\n
","position":{"start":{"line":192,"column":1,"offset":2633},"end":{"line":194,"column":4,"offset":2665}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"zoomout"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoomout","aria-label":"zoomout permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"zoomOut","position":{"start":{"line":196,"column":5,"offset":2671},"end":{"line":196,"column":12,"offset":2678}}}],"position":{"start":{"line":196,"column":1,"offset":2667},"end":{"line":196,"column":12,"offset":2678}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图缩小一级","position":{"start":{"line":197,"column":1,"offset":2679},"end":{"line":197,"column":7,"offset":2685}}}],"position":{"start":{"line":197,"column":1,"offset":2679},"end":{"line":197,"column":7,"offset":2685}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.ZoomOUt();\n
","position":{"start":{"line":198,"column":1,"offset":2686},"end":{"line":200,"column":4,"offset":2719}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"panto"},"children":[{"type":"element","tagName":"a","properties":{"href":"#panto","aria-label":"panto permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"panTo","position":{"start":{"line":202,"column":5,"offset":2725},"end":{"line":202,"column":10,"offset":2730}}}],"position":{"start":{"line":202,"column":1,"offset":2721},"end":{"line":202,"column":10,"offset":2730}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图平移到指定的位置","position":{"start":{"line":203,"column":1,"offset":2731},"end":{"line":203,"column":11,"offset":2741}}}],"position":{"start":{"line":203,"column":1,"offset":2731},"end":{"line":203,"column":11,"offset":2741}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.panTo(LngLat);\n
","position":{"start":{"line":204,"column":1,"offset":2742},"end":{"line":206,"column":4,"offset":2779}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数:","position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":4,"offset":2784}}},{"type":"raw","value":"center","position":{"start":{"line":208,"column":4,"offset":2784},"end":{"line":208,"column":12,"offset":2792}}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2792},"end":{"line":208,"column":27,"offset":2807}}}],"position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":27,"offset":2807}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"panby"},"children":[{"type":"element","tagName":"a","properties":{"href":"#panby","aria-label":"panby permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2813},"end":{"line":210,"column":10,"offset":2818}}}],"position":{"start":{"line":210,"column":1,"offset":2809},"end":{"line":210,"column":10,"offset":2818}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837}}}],"position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.panBy(x, y);\n
","position":{"start":{"line":212,"column":1,"offset":2838},"end":{"line":214,"column":4,"offset":2872}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数:","position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":4,"offset":2876}}},{"type":"raw","value":"
","position":{"start":{"line":215,"column":4,"offset":2876},"end":{"line":215,"column":10,"offset":2882}}},{"type":"raw","value":"x","position":{"start":{"line":215,"column":10,"offset":2882},"end":{"line":215,"column":13,"offset":2885}}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2885},"end":{"line":215,"column":38,"offset":2910}}},{"type":"raw","value":"
","position":{"start":{"line":215,"column":38,"offset":2910},"end":{"line":215,"column":44,"offset":2916}}},{"type":"text","value":"      ","position":{"start":{"line":215,"column":44,"offset":2916},"end":{"line":215,"column":50,"offset":2922}}},{"type":"raw","value":"y","position":{"start":{"line":215,"column":50,"offset":2922},"end":{"line":215,"column":53,"offset":2925}}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2925},"end":{"line":215,"column":79,"offset":2951}}}],"position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":79,"offset":2951}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setpitch"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpitch","aria-label":"setpitch permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2958},"end":{"line":218,"column":13,"offset":2966}}}],"position":{"start":{"line":218,"column":1,"offset":2954},"end":{"line":218,"column":13,"offset":2966}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975}}}],"position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.setPitch(pitch);\n
","position":{"start":{"line":220,"column":1,"offset":2976},"end":{"line":222,"column":4,"offset":3015}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数 :","position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":5,"offset":3021}}},{"type":"raw","value":"
","position":{"start":{"line":224,"column":5,"offset":3021},"end":{"line":224,"column":11,"offset":3027}}},{"type":"text","value":"   ","position":{"start":{"line":224,"column":11,"offset":3027},"end":{"line":224,"column":14,"offset":3030}}},{"type":"raw","value":"pitch","position":{"start":{"line":224,"column":14,"offset":3030},"end":{"line":224,"column":21,"offset":3037}}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3037},"end":{"line":224,"column":31,"offset":3047}}}],"position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":31,"offset":3047}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":""},"children":[{"type":"element","tagName":"a","properties":{"href":"#","aria-label":" permalink","class":"anchor"},"children":[{"type":"raw","value":""}]}],"position":{"start":{"line":226,"column":1,"offset":3049},"end":{"line":226,"column":5,"offset":3053}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setstatus"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setstatus","aria-label":"setstatus permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3059},"end":{"line":228,"column":14,"offset":3068}}}],"position":{"start":{"line":228,"column":1,"offset":3055},"end":{"line":228,"column":14,"offset":3068}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等   ","position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168}}}],"position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.setStatus({\n  dragEnable: true,\n  keyboardEnable: true,\n  doubleClickZoom: true,\n  zoomEnable: true,\n  rotateEnable: true,\n});\n
","position":{"start":{"line":231,"column":1,"offset":3170},"end":{"line":239,"column":4,"offset":3347}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"fitbounds"},"children":[{"type":"element","tagName":"a","properties":{"href":"#fitbounds","aria-label":"fitbounds permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"fitBounds","position":{"start":{"line":242,"column":5,"offset":3354},"end":{"line":242,"column":14,"offset":3363}}}],"position":{"start":{"line":242,"column":1,"offset":3350},"end":{"line":242,"column":14,"offset":3363}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图缩放到某个范围内","position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":11,"offset":3374}}},{"type":"raw","value":"
","position":{"start":{"line":243,"column":11,"offset":3374},"end":{"line":243,"column":17,"offset":3380}}},{"type":"text","value":"参数 :","position":{"start":{"line":243,"column":17,"offset":3380},"end":{"line":243,"column":21,"offset":3384}}},{"type":"raw","value":"
","position":{"start":{"line":243,"column":21,"offset":3384},"end":{"line":243,"column":27,"offset":3390}}},{"type":"text","value":"  ","position":{"start":{"line":243,"column":27,"offset":3390},"end":{"line":243,"column":29,"offset":3392}}},{"type":"raw","value":"extent","position":{"start":{"line":243,"column":29,"offset":3392},"end":{"line":243,"column":37,"offset":3400}}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3400},"end":{"line":243,"column":53,"offset":3416}}},{"type":"text","value":"[minlng,minlat,maxlng,maxlat]","position":{"start":{"line":243,"column":54,"offset":3417},"end":{"line":243,"column":81,"offset":3444}}}],"position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":82,"offset":3445}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.fitBounds([112, 32, 114, 35]);\n
","position":{"start":{"line":245,"column":1,"offset":3447},"end":{"line":247,"column":4,"offset":3498}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"removelayer"},"children":[{"type":"element","tagName":"a","properties":{"href":"#removelayer","aria-label":"removelayer permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"removeLayer","position":{"start":{"line":251,"column":5,"offset":3506},"end":{"line":251,"column":16,"offset":3517}}}],"position":{"start":{"line":251,"column":1,"offset":3502},"end":{"line":251,"column":16,"offset":3517}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除layer","position":{"start":{"line":252,"column":1,"offset":3518},"end":{"line":252,"column":8,"offset":3525}}}],"position":{"start":{"line":252,"column":1,"offset":3518},"end":{"line":252,"column":8,"offset":3525}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.removeLayer(layer);\n
","position":{"start":{"line":254,"column":1,"offset":3527},"end":{"line":256,"column":4,"offset":3569}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"参数","position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":3,"offset":3573}}},{"type":"raw","value":"
","position":{"start":{"line":258,"column":3,"offset":3573},"end":{"line":258,"column":9,"offset":3579}}},{"type":"raw","value":"layer","position":{"start":{"line":258,"column":9,"offset":3579},"end":{"line":258,"column":16,"offset":3586}}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3586},"end":{"line":258,"column":25,"offset":3595}}}],"position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":25,"offset":3595}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getlayers-1"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlayers-1","aria-label":"getlayers 1 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3601},"end":{"line":260,"column":14,"offset":3610}}}],"position":{"start":{"line":260,"column":1,"offset":3597},"end":{"line":260,"column":14,"offset":3610}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622}}}],"position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.getLayers();\n
","position":{"start":{"line":263,"column":1,"offset":3624},"end":{"line":265,"column":4,"offset":3659}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"return layers  {array}","position":{"start":{"line":267,"column":1,"offset":3661},"end":{"line":267,"column":24,"offset":3684}}}],"position":{"start":{"line":267,"column":1,"offset":3661},"end":{"line":267,"column":24,"offset":3684}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E4%BA%8B%E4%BB%B6","aria-label":"事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"事件","position":{"start":{"line":269,"column":4,"offset":3689},"end":{"line":269,"column":6,"offset":3691}}}],"position":{"start":{"line":269,"column":1,"offset":3686},"end":{"line":269,"column":6,"offset":3691}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"on"},"children":[{"type":"element","tagName":"a","properties":{"href":"#on","aria-label":"on permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"on","position":{"start":{"line":272,"column":5,"offset":3698},"end":{"line":272,"column":7,"offset":3700}}}],"position":{"start":{"line":272,"column":1,"offset":3694},"end":{"line":272,"column":7,"offset":3700}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"事件监听","position":{"start":{"line":273,"column":1,"offset":3701},"end":{"line":273,"column":5,"offset":3705}}}],"position":{"start":{"line":273,"column":1,"offset":3701},"end":{"line":273,"column":5,"offset":3705}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"参数"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%8F%82%E6%95%B0","aria-label":"参数 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"参数","position":{"start":{"line":275,"column":6,"offset":3712},"end":{"line":275,"column":8,"offset":3714}}}],"position":{"start":{"line":275,"column":1,"offset":3707},"end":{"line":275,"column":8,"offset":3714}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"raw","value":"eventName","position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":12,"offset":3726}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3726},"end":{"line":276,"column":26,"offset":3740}}},{"type":"raw","value":"
","position":{"start":{"line":276,"column":26,"offset":3740},"end":{"line":276,"column":32,"offset":3746}}},{"type":"raw","value":"hander","position":{"start":{"line":276,"column":32,"offset":3746},"end":{"line":276,"column":40,"offset":3754}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3754},"end":{"line":276,"column":60,"offset":3774}}}],"position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":60,"offset":3774}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"off"},"children":[{"type":"element","tagName":"a","properties":{"href":"#off","aria-label":"off permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3781},"end":{"line":279,"column":8,"offset":3784}}}],"position":{"start":{"line":279,"column":1,"offset":3777},"end":{"line":279,"column":8,"offset":3784}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":7,"offset":3791}}},{"type":"raw","value":"
","position":{"start":{"line":280,"column":7,"offset":3791},"end":{"line":280,"column":13,"offset":3797}}},{"type":"raw","value":"eventName","position":{"start":{"line":280,"column":13,"offset":3797},"end":{"line":280,"column":24,"offset":3808}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3808},"end":{"line":280,"column":38,"offset":3822}}},{"type":"raw","value":"
","position":{"start":{"line":280,"column":38,"offset":3822},"end":{"line":280,"column":44,"offset":3828}}},{"type":"raw","value":"hander","position":{"start":{"line":280,"column":44,"offset":3828},"end":{"line":280,"column":52,"offset":3836}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3836},"end":{"line":280,"column":72,"offset":3856}}}],"position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":72,"offset":3856}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"地图事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%B0%E5%9B%BE%E4%BA%8B%E4%BB%B6","aria-label":"地图事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3863},"end":{"line":283,"column":9,"offset":3867}}}],"position":{"start":{"line":283,"column":1,"offset":3859},"end":{"line":283,"column":9,"offset":3867}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
","position":{"start":{"line":284,"column":1,"offset":3868},"end":{"line":292,"column":4,"offset":4205}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"鼠标事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E9%BC%A0%E6%A0%87%E4%BA%8B%E4%BB%B6","aria-label":"鼠标事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"鼠标事件","position":{"start":{"line":295,"column":5,"offset":4212},"end":{"line":295,"column":9,"offset":4216}}}],"position":{"start":{"line":295,"column":1,"offset":4208},"end":{"line":295,"column":9,"offset":4216}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.on('click', ev => {}); // 鼠标左键点击事件\nscene.on('dblclick', ev => {}); // 鼠标左键双击事件\nscene.on('mousemove', ev => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', ev => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', ev => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', ev => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', ev => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', ev => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', ev => {}); // 鼠标右键单击事件\nscene.on('dragstart', ev => {}); //开始拖拽地图时触发\nscene.on('dragging', ev => {}); // 拖拽地图过程中触发\nscene.on('dragend', ev => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
","position":{"start":{"line":297,"column":1,"offset":4218},"end":{"line":310,"column":4,"offset":4925}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"其它事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%85%B6%E5%AE%83%E4%BA%8B%E4%BB%B6","aria-label":"其它事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"其它事件","position":{"start":{"line":312,"column":5,"offset":4931},"end":{"line":312,"column":9,"offset":4935}}}],"position":{"start":{"line":312,"column":1,"offset":4927},"end":{"line":312,"column":9,"offset":4935}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene.on('resize', () => {}); // 地图容器大小改变事件\n
","position":{"start":{"line":313,"column":1,"offset":4936},"end":{"line":315,"column":4,"offset":4993}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":318,"column":1,"offset":4996}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-b0407a444ef8acb3f4819a2fd00c5ae3.json b/.cache/caches/gatsby-transformer-remark/diskstore-b0407a444ef8acb3f4819a2fd00c5ae3.json deleted file mode 100644 index 6012e06cbe..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-b0407a444ef8acb3f4819a2fd00c5ae3.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-4e775806f930bb554f175748236303d7-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"h1","properties":{"id":"control"},"children":[{"type":"element","tagName":"a","properties":{"href":"#control","aria-label":"control permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"control","position":{"start":{"line":1,"column":3,"offset":2},"end":{"line":1,"column":10,"offset":9}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":10,"offset":9}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺","position":{"start":{"line":3,"column":1,"offset":11},"end":{"line":3,"column":43,"offset":53}}}],"position":{"start":{"line":3,"column":1,"offset":11},"end":{"line":3,"column":43,"offset":53}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"构造函数"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0","aria-label":"构造函数 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"构造函数","position":{"start":{"line":6,"column":4,"offset":59},"end":{"line":6,"column":8,"offset":63}}}],"position":{"start":{"line":6,"column":1,"offset":56},"end":{"line":6,"column":8,"offset":63}}},{"type":"text","value":"\n"},{"type":"raw","value":"
const baseControl = new L7.Control.Base(option);\n
","position":{"start":{"line":8,"column":1,"offset":65},"end":{"line":10,"column":4,"offset":131}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"option"},"children":[{"type":"element","tagName":"a","properties":{"href":"#option","aria-label":"option permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"option","position":{"start":{"line":13,"column":6,"offset":139},"end":{"line":13,"column":12,"offset":145}}}],"position":{"start":{"line":13,"column":1,"offset":134},"end":{"line":13,"column":12,"offset":145}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":" position: ","position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":12,"offset":157}}},{"type":"raw","value":"string","position":{"start":{"line":14,"column":12,"offset":157},"end":{"line":14,"column":20,"offset":165}}},{"type":"text","value":" 控件位置支持是个方位 ","position":{"start":{"line":14,"column":20,"offset":165},"end":{"line":14,"column":32,"offset":177}}},{"type":"raw","value":"bottomright, topright, bottomleft, topleft","position":{"start":{"line":14,"column":32,"offset":177},"end":{"line":14,"column":76,"offset":221}}}],"position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":76,"offset":221}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"scene-内置地图组件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#scene-%E5%86%85%E7%BD%AE%E5%9C%B0%E5%9B%BE%E7%BB%84%E4%BB%B6","aria-label":"scene 内置地图组件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"scene 内置地图组件","position":{"start":{"line":17,"column":6,"offset":229},"end":{"line":17,"column":18,"offset":241}}}],"position":{"start":{"line":17,"column":1,"offset":224},"end":{"line":17,"column":18,"offset":241}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"zoom 地图放大缩小  默认添加","position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":18,"offset":259}}},{"type":"raw","value":"
","position":{"start":{"line":18,"column":18,"offset":259},"end":{"line":18,"column":24,"offset":265}}},{"type":"text","value":"Scale 地图比例尺   默认添加","position":{"start":{"line":18,"column":24,"offset":265},"end":{"line":18,"column":42,"offset":283}}},{"type":"raw","value":"
","position":{"start":{"line":18,"column":42,"offset":283},"end":{"line":18,"column":48,"offset":289}}},{"type":"text","value":"attribution 地图数据属性  默认添加","position":{"start":{"line":18,"column":48,"offset":289},"end":{"line":18,"column":72,"offset":313}}},{"type":"raw","value":"
","position":{"start":{"line":18,"column":72,"offset":313},"end":{"line":18,"column":78,"offset":319}}},{"type":"text","value":"layer 图层列表","position":{"start":{"line":18,"column":78,"offset":319},"end":{"line":18,"column":88,"offset":329}}}],"position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":88,"offset":329}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"scene配置项设置控件添加状态","position":{"start":{"line":20,"column":3,"offset":333},"end":{"line":20,"column":19,"offset":349}}}],"position":{"start":{"line":20,"column":1,"offset":331},"end":{"line":20,"column":21,"offset":351}}}],"position":{"start":{"line":20,"column":1,"offset":331},"end":{"line":20,"column":21,"offset":351}}},{"type":"text","value":"\n"},{"type":"raw","value":"
scene = new L7.scene({\n  zoomControl: true,\n  scaleControl: true,\n  attributionControl: true,\n});\n
","position":{"start":{"line":22,"column":1,"offset":353},"end":{"line":28,"column":4,"offset":469}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":""},"children":[{"type":"element","tagName":"a","properties":{"href":"#","aria-label":" permalink","class":"anchor"},"children":[{"type":"raw","value":""}]}],"position":{"start":{"line":30,"column":1,"offset":471},"end":{"line":30,"column":6,"offset":476}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"zoom"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoom","aria-label":"zoom permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"Zoom","position":{"start":{"line":32,"column":6,"offset":483},"end":{"line":32,"column":10,"offset":487}}}],"position":{"start":{"line":32,"column":1,"offset":478},"end":{"line":32,"column":10,"offset":487}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"放大缩小组件 默认 左上角","position":{"start":{"line":33,"column":1,"offset":488},"end":{"line":33,"column":14,"offset":501}}}],"position":{"start":{"line":33,"column":1,"offset":488},"end":{"line":33,"column":14,"offset":501}}},{"type":"text","value":"\n"},{"type":"raw","value":"
new L7.Control.Zoom({\n  position: 'topleft',\n}).addTo(scene);\n
","position":{"start":{"line":35,"column":1,"offset":503},"end":{"line":39,"column":4,"offset":590}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"scale"},"children":[{"type":"element","tagName":"a","properties":{"href":"#scale","aria-label":"scale permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"Scale","position":{"start":{"line":42,"column":6,"offset":598},"end":{"line":42,"column":11,"offset":603}}}],"position":{"start":{"line":42,"column":1,"offset":593},"end":{"line":42,"column":11,"offset":603}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"比例尺组件默认左下角","position":{"start":{"line":43,"column":1,"offset":604},"end":{"line":43,"column":11,"offset":614}}}],"position":{"start":{"line":43,"column":1,"offset":604},"end":{"line":43,"column":11,"offset":614}}},{"type":"text","value":"\n"},{"type":"raw","value":"
new L7.Control.Scale({\n  position: 'bottomleft',\n}).addTo(scene);\n
","position":{"start":{"line":45,"column":1,"offset":616},"end":{"line":49,"column":4,"offset":707}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"attribution"},"children":[{"type":"element","tagName":"a","properties":{"href":"#attribution","aria-label":"attribution permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"attribution","position":{"start":{"line":52,"column":6,"offset":715},"end":{"line":52,"column":17,"offset":726}}}],"position":{"start":{"line":52,"column":1,"offset":710},"end":{"line":52,"column":17,"offset":726}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"默认右下角","position":{"start":{"line":53,"column":1,"offset":727},"end":{"line":53,"column":6,"offset":732}}}],"position":{"start":{"line":53,"column":1,"offset":727},"end":{"line":53,"column":6,"offset":732}}},{"type":"text","value":"\n"},{"type":"raw","value":"
new L7.Control.Attribution({\n  position: 'bottomleft',\n}).addTo(scene);\n
","position":{"start":{"line":55,"column":1,"offset":734},"end":{"line":59,"column":4,"offset":830}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"layer"},"children":[{"type":"element","tagName":"a","properties":{"href":"#layer","aria-label":"layer permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"layer","position":{"start":{"line":62,"column":6,"offset":838},"end":{"line":62,"column":11,"offset":843}}}],"position":{"start":{"line":62,"column":1,"offset":833},"end":{"line":62,"column":11,"offset":843}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"图层列表目前只支持可视化overlayers 图层控制","position":{"start":{"line":63,"column":1,"offset":844},"end":{"line":63,"column":28,"offset":871}}}],"position":{"start":{"line":63,"column":1,"offset":844},"end":{"line":63,"column":28,"offset":871}}},{"type":"text","value":"\n"},{"type":"raw","value":"
var overlayers = {\n  围栏填充: layer,\n  围栏边界: layer2,\n};\nnew L7.Control.Layers({\n  overlayers: overlayers,\n}).addTo(scene);\n
","position":{"start":{"line":65,"column":1,"offset":873},"end":{"line":73,"column":4,"offset":1031}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"方法"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%96%B9%E6%B3%95","aria-label":"方法 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"方法","position":{"start":{"line":76,"column":4,"offset":1037},"end":{"line":76,"column":6,"offset":1039}}}],"position":{"start":{"line":76,"column":1,"offset":1034},"end":{"line":76,"column":6,"offset":1039}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"onadd"},"children":[{"type":"element","tagName":"a","properties":{"href":"#onadd","aria-label":"onadd permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"onAdd","position":{"start":{"line":78,"column":6,"offset":1046},"end":{"line":78,"column":11,"offset":1051}}}],"position":{"start":{"line":78,"column":1,"offset":1041},"end":{"line":78,"column":11,"offset":1051}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"组件添加到地图Scene时调用,自定义组件时需要实现此方法","position":{"start":{"line":79,"column":1,"offset":1052},"end":{"line":79,"column":30,"offset":1081}}}],"position":{"start":{"line":79,"column":1,"offset":1052},"end":{"line":79,"column":30,"offset":1081}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"addto"},"children":[{"type":"element","tagName":"a","properties":{"href":"#addto","aria-label":"addto permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"addTo","position":{"start":{"line":82,"column":6,"offset":1089},"end":{"line":82,"column":11,"offset":1094}}}],"position":{"start":{"line":82,"column":1,"offset":1084},"end":{"line":82,"column":11,"offset":1094}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"添加到地图scene","position":{"start":{"line":83,"column":1,"offset":1095},"end":{"line":83,"column":11,"offset":1105}}}],"position":{"start":{"line":83,"column":1,"offset":1095},"end":{"line":83,"column":11,"offset":1105}}},{"type":"text","value":"\n"},{"type":"raw","value":"
control.addTo(scene);\n
","position":{"start":{"line":85,"column":1,"offset":1107},"end":{"line":87,"column":4,"offset":1146}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setposition"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setposition","aria-label":"setposition permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPosition","position":{"start":{"line":90,"column":6,"offset":1154},"end":{"line":90,"column":17,"offset":1165}}}],"position":{"start":{"line":90,"column":1,"offset":1149},"end":{"line":90,"column":17,"offset":1165}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置组件位置","position":{"start":{"line":91,"column":1,"offset":1166},"end":{"line":91,"column":7,"offset":1172}}}],"position":{"start":{"line":91,"column":1,"offset":1166},"end":{"line":91,"column":7,"offset":1172}}},{"type":"text","value":"\n"},{"type":"raw","value":"
control.setPosition('bottomright');\n
","position":{"start":{"line":93,"column":1,"offset":1174},"end":{"line":95,"column":4,"offset":1227}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"remove"},"children":[{"type":"element","tagName":"a","properties":{"href":"#remove","aria-label":"remove permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"remove","position":{"start":{"line":98,"column":6,"offset":1235},"end":{"line":98,"column":12,"offset":1241}}}],"position":{"start":{"line":98,"column":1,"offset":1230},"end":{"line":98,"column":12,"offset":1241}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除地图组件","position":{"start":{"line":99,"column":1,"offset":1242},"end":{"line":99,"column":7,"offset":1248}}}],"position":{"start":{"line":99,"column":1,"offset":1242},"end":{"line":99,"column":7,"offset":1248}}},{"type":"text","value":"\n"},{"type":"raw","value":"
control.remove();\n
","position":{"start":{"line":101,"column":1,"offset":1250},"end":{"line":103,"column":4,"offset":1285}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"示例代码"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81","aria-label":"示例代码 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"示例代码","position":{"start":{"line":107,"column":4,"offset":1292},"end":{"line":107,"column":8,"offset":1296}}}],"position":{"start":{"line":107,"column":1,"offset":1289},"end":{"line":107,"column":8,"offset":1296}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"自定义图例控件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%9B%BE%E4%BE%8B%E6%8E%A7%E4%BB%B6","aria-label":"自定义图例控件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"自定义图例控件","position":{"start":{"line":110,"column":6,"offset":1304},"end":{"line":110,"column":13,"offset":1311}}}],"position":{"start":{"line":110,"column":1,"offset":1299},"end":{"line":110,"column":13,"offset":1311}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://antv.alipay.com/zh-cn/l7/1.x/demo/component/extendControl.html","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"源码","position":{"start":{"line":111,"column":2,"offset":1313},"end":{"line":111,"column":4,"offset":1315}}}],"position":{"start":{"line":111,"column":1,"offset":1312},"end":{"line":111,"column":77,"offset":1388}}}],"position":{"start":{"line":111,"column":1,"offset":1312},"end":{"line":111,"column":77,"offset":1388}}},{"type":"text","value":"\n"},{"type":"raw","value":"
var legend = new L7.Control.Base({\n  position: 'bottomright',\n});\nlegend.onAdd = function() {\n  var el = document.createElement('div');\n  el.className = 'infolegend legend';\n  var grades = [0, 8, 15, 30, 65, 120];\n  for (var i = 0; i < grades.length; i++) {\n    el.innerHTML +=\n      '<i style=\"background:' +\n      colors[i] +\n      '\"></i> ' +\n      grades[i] +\n      (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n  }\n  return el;\n};\nlegend.addTo(scene);\n
","position":{"start":{"line":113,"column":1,"offset":1390},"end":{"line":128,"column":4,"offset":1914}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"-1"},"children":[{"type":"element","tagName":"a","properties":{"href":"#-1","aria-label":" 1 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]}],"position":{"start":{"line":130,"column":1,"offset":1916},"end":{"line":130,"column":4,"offset":1919}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"faq"},"children":[{"type":"element","tagName":"a","properties":{"href":"#faq","aria-label":"faq permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"FAQ","position":{"start":{"line":132,"column":4,"offset":1924},"end":{"line":132,"column":7,"offset":1927}}}],"position":{"start":{"line":132,"column":1,"offset":1921},"end":{"line":132,"column":7,"offset":1927}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":134,"column":1,"offset":1929}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-b089023713dde4294665d832c48ccd63.json b/.cache/caches/gatsby-transformer-remark/diskstore-b089023713dde4294665d832c48ccd63.json deleted file mode 100644 index 2f7fcc01ea..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-b089023713dde4294665d832c48ccd63.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-a4fdd704fadc6272a50f61c3eb36ad4b-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-b196fbb424293a9c110515c8e22586c7.json b/.cache/caches/gatsby-transformer-remark/diskstore-b196fbb424293a9c110515c8e22586c7.json deleted file mode 100644 index 5e68ec8c2f..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-b196fbb424293a9c110515c8e22586c7.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-b7df9406be8c4ec4d4cc6d6850b2bee1.json b/.cache/caches/gatsby-transformer-remark/diskstore-b7df9406be8c4ec4d4cc6d6850b2bee1.json deleted file mode 100644 index e38c2c0792..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-b7df9406be8c4ec4d4cc6d6850b2bee1.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-51cffb57f20c685f94203902c79f04c6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":2}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-b923ecb39dc7dd6f4752bf9bbf5c94da.json b/.cache/caches/gatsby-transformer-remark/diskstore-b923ecb39dc7dd6f4752bf9bbf5c94da.json deleted file mode 100644 index bb21fdde63..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-b923ecb39dc7dd6f4752bf9bbf5c94da.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-4e775806f930bb554f175748236303d7-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

control

\n

地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺

\n

构造函数

\n
const baseControl = new L7.Control.Base(option);\n
\n

option

\n

 position: string 控件位置支持是个方位 bottomright, topright, bottomleft, topleft

\n

scene 内置地图组件

\n

zoom 地图放大缩小  默认添加
Scale 地图比例尺   默认添加
attribution 地图数据属性  默认添加
layer 图层列表

\n

scene配置项设置控件添加状态

\n
scene = new L7.scene({\n  zoomControl: true,\n  scaleControl: true,\n  attributionControl: true,\n});\n
\n

\n

Zoom

\n

放大缩小组件 默认 左上角

\n
new L7.Control.Zoom({\n  position: 'topleft',\n}).addTo(scene);\n
\n

Scale

\n

比例尺组件默认左下角

\n
new L7.Control.Scale({\n  position: 'bottomleft',\n}).addTo(scene);\n
\n

attribution

\n

默认右下角

\n
new L7.Control.Attribution({\n  position: 'bottomleft',\n}).addTo(scene);\n
\n

layer

\n

图层列表目前只支持可视化overlayers 图层控制

\n
var overlayers = {\n  围栏填充: layer,\n  围栏边界: layer2,\n};\nnew L7.Control.Layers({\n  overlayers: overlayers,\n}).addTo(scene);\n
\n

方法

\n

onAdd

\n

组件添加到地图Scene时调用,自定义组件时需要实现此方法

\n

addTo

\n

添加到地图scene

\n
control.addTo(scene);\n
\n

setPosition

\n

设置组件位置

\n
control.setPosition('bottomright');\n
\n

remove

\n

移除地图组件

\n
control.remove();\n
\n

示例代码

\n

自定义图例控件

\n

源码

\n
var legend = new L7.Control.Base({\n  position: 'bottomright',\n});\nlegend.onAdd = function() {\n  var el = document.createElement('div');\n  el.className = 'infolegend legend';\n  var grades = [0, 8, 15, 30, 65, 120];\n  for (var i = 0; i < grades.length; i++) {\n    el.innerHTML +=\n      '<i style=\"background:' +\n      colors[i] +\n      '\"></i> ' +\n      grades[i] +\n      (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n  }\n  return el;\n};\nlegend.addTo(scene);\n
\n

\n

FAQ

"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-badc2f24570b1f6d64603b86360ac53c.json b/.cache/caches/gatsby-transformer-remark/diskstore-badc2f24570b1f6d64603b86360ac53c.json deleted file mode 100644 index 64e790abca..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-badc2f24570b1f6d64603b86360ac53c.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-c33b8eb118a2549971f1a2859bd8a790-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-bed602677090371493b02b2541d3b187.json b/.cache/caches/gatsby-transformer-remark/diskstore-bed602677090371493b02b2541d3b187.json deleted file mode 100644 index b1f2d6b432..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-bed602677090371493b02b2541d3b187.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-51cffb57f20c685f94203902c79f04c6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-bee012580db1a2e5f57e03421caf971f.json b/.cache/caches/gatsby-transformer-remark/diskstore-bee012580db1a2e5f57e03421caf971f.json deleted file mode 100644 index 336a019d51..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-bee012580db1a2e5f57e03421caf971f.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"内容","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":4}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-c0aa0f35edcda5378e5c60ee4a624538.json b/.cache/caches/gatsby-transformer-remark/diskstore-c0aa0f35edcda5378e5c60ee4a624538.json deleted file mode 100644 index b1b961f675..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-c0aa0f35edcda5378e5c60ee4a624538.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-4ac738099c50f728749de01c4f86ca68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-c82b32fdd1e087bae256f0beed9521cd.json b/.cache/caches/gatsby-transformer-remark/diskstore-c82b32fdd1e087bae256f0beed9521cd.json deleted file mode 100644 index f372f1b805..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-c82b32fdd1e087bae256f0beed9521cd.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-4ac738099c50f728749de01c4f86ca68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-c8fad00cb084cbc8999fbb860f29832b.json b/.cache/caches/gatsby-transformer-remark/diskstore-c8fad00cb084cbc8999fbb860f29832b.json deleted file mode 100644 index f949c34a6f..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-c8fad00cb084cbc8999fbb860f29832b.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-b203d64bdde854a7c4141aaf3bd814db-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

简介

\n

Scene基础的地图类,提供地图创建,图层创建,管理等功能

\n

示例代码

\n
import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n  id: 'map',\n  mapStyle: 'dark',\n  center: [110.770672, 34.159869],\n  pitch: 45,\n});\n
\n

构造函数

\n

Scene
支持两种实例化方式

\n
    \n
  • 独立实例化 内部根据id自动穿件地图实例
  • \n
  • 传入地图实例
  • \n
\n

独立实例化 Scene

\n
const scene = new L7.Scene({\n  id: 'map',\n  mapStyle: 'dark',\n  center: [120.19382669582967, 30.258134],\n  pitch: 0,\n  zoom: 12,\n  maxZoom: 20,\n  minZoom: 0,\n});\n
\n

根据map 实例创建Sence

\n

_L7 基于高德地图3D模式开发的,因此传入Map实例 _viewModes需要设置成3d
_

\n
var mapinstance = new AMap.Map('map', {\n  center: [120.19382669582967, 30.258134],\n  viewMode: '3D',\n  pitch: 0,\n  zoom: 12,\n  maxZoom: 20,\n  minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n  mapStyle: 'dark',\n  map: mapinstance,\n});\n
\n

map

\n

L7 在scene 下保留了高德地图实例,可以通过scene.map 调用高德地图的map方法。
map 实例方法见高德地图文档

\n
scene.map;\n
\n

构造类

\n

PointLayer

\n

新建点图层

\n

PolylineLayer

\n

新建线图层

\n

PolygonLayer

\n

新建面图层

\n

ImageLayer

\n

新建图片图层

\n

配置项

\n

id

\n

需传入 dom 容器或者容器 id  {domObject || string} [必选]

\n

zoom

\n

地图初始显示级别 {number} (0-22)

\n

center

\n

地图初始中心经纬度 {Lnglat}

\n

pitch

\n

地图初始俯仰角度 {number}  default 0

\n

mapSyle

\n

地图样式 {style} 目前仅支持高德地图。 default 'dark'
L7 内置三种种默认地图样式 dark | light|blank 空地图

\n

设置地图的显示样式,目前支持两种地图样式:
第一种:自定义地图样式,如"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
可前往地图自定义平台定制自己的个性地图样式;
第二种:官方样式模版,如"amap://styles/grey"
其他模版样式及自定义地图的使用说明见开发指南

\n

minZoom

\n

地图最小缩放等级 {number}  default 0 (0-22)

\n

maxZoom

\n

地图最大缩放等级 {number}  default 22 (0-22)

\n

rotateEnable

\n

地图是否可旋转 {Boolean} default true

\n

方法

\n

getZoom

\n

获取当前缩放等级

\n
scene.getZoom();\n
\n

return {float}  当前缩放等级

\n

getLayers()

\n

获取所有的地图图层

\n
scene.getLayers();\n
\n

return 图层数组 {Array}

\n

getCenter()

\n

获取地图中心点

\n
scene.getCenter();\n
\n

return {Lnglat} :地图中心点

\n

getSize()

\n

获取地图容器大小

\n
scene.getSize();\n
\n

return { Object } 地图容器的 width,height

\n

getPitch()

\n

获取地图俯仰角

\n
scene.getPitch();\n
\n

return {number} pitch

\n

setCenter()

\n

设置地图中心点坐标

\n
scene.setCenter([lng, lat]);\n
\n

参数:center {LngLat} 地图中心点

\n

setZoomAndCenter

\n

设置地图等级和中心

\n
scene.setZoomAndCenter(zoom, center);\n
\n

参数:zoom {number}
center {LngLat}

\n

setRotation

\n

设置地图顺时针旋转角度,旋转原点为地图容器中心点,取值范围 [0-360]

\n
scene.setRotation(rotation);\n
\n

参数: rotation {number}

\n

zoomIn

\n

地图放大一级

\n
scene.zoomIn();\n
\n

zoomOut

\n

地图缩小一级

\n
scene.ZoomOUt();\n
\n

panTo

\n

地图平移到指定的位置

\n
scene.panTo(LngLat);\n
\n

参数:center LngLat 中心位置坐标

\n

panBy

\n

以像素为单位沿X方向和Y方向移动地图

\n
scene.panBy(x, y);\n
\n

参数:
x {number} 水平方向移动像素 向右为正方向
      y {number} 垂直方向移动像素 向下为正方向

\n

setPitch

\n

设置地图仰俯角度

\n
scene.setPitch(pitch);\n
\n

参数 :
   pitch {number}

\n

\n

setStatus

\n

设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等   

\n
scene.setStatus({\n  dragEnable: true,\n  keyboardEnable: true,\n  doubleClickZoom: true,\n  zoomEnable: true,\n  rotateEnable: true,\n});\n
\n

fitBounds

\n

地图缩放到某个范围内
参数 :
  extent { array} 经纬度范围 [minlng,minlat,maxlng,maxlat]

\n
scene.fitBounds([112, 32, 114, 35]);\n
\n

removeLayer

\n

移除layer

\n
scene.removeLayer(layer);\n
\n

参数
layer {Layer}

\n

getLayers

\n

 获取所有的layer

\n
scene.getLayers();\n
\n

return layers  {array}

\n

事件

\n

on

\n

事件监听

\n

参数

\n

eventName {string} 事件名
hander {function } 事件回调函数

\n

off

\n

移除事件监听
eventName {string} 事件名
hander {function } 事件回调函数

\n

地图事件

\n
scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
\n

鼠标事件

\n
scene.on('click', ev => {}); // 鼠标左键点击事件\nscene.on('dblclick', ev => {}); // 鼠标左键双击事件\nscene.on('mousemove', ev => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', ev => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', ev => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', ev => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', ev => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', ev => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', ev => {}); // 鼠标右键单击事件\nscene.on('dragstart', ev => {}); //开始拖拽地图时触发\nscene.on('dragging', ev => {}); // 拖拽地图过程中触发\nscene.on('dragend', ev => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
\n

其它事件

\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-ca2fb97dfd9c7f243ca223efc08ffba5.json b/.cache/caches/gatsby-transformer-remark/diskstore-ca2fb97dfd9c7f243ca223efc08ffba5.json deleted file mode 100644 index 624a702d84..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-ca2fb97dfd9c7f243ca223efc08ffba5.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-a4fdd704fadc6272a50f61c3eb36ad4b-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

popup

\n

地图标注信息窗口,用于展示地图要素的属性信息

\n

构造函数

\n

Popup

\n
const popup = new L7.Popup(option);\n
\n

option

\n
    \n
  • closeButton
  • \n
  • closeOnClick
  • \n
  • maxWidth
  • \n
  • anchor
  • \n
\n

方法

\n

setLnglat

\n

设置popup的经纬度位置
参数:lnglat 经纬度数组 [112,32]

\n
popup.setLnglat([112, 32]);\n
\n

addTo

\n

参数:scene 地图scene实例

\n

将popup添加到地图scene显示

\n
popup.addTo(scene);\n
\n

setHtml

\n

参数:html 字符串

\n

设置popup html 内容

\n
var html =\n  '<p>\\u7701\\u4EFD\\uFF1A' +\n  feature.s +\n  '</p>\\n        <p>\\u5730\\u533A\\uFF1A' +\n  feature.m +\n  '</p>\\n        <p>\\u6E29\\u5EA6\\uFF1A' +\n  feature.t +\n  '</p>\\n        ';\npopup.setHtml(html);\n
\n

setText

\n

设置 popup 显示文本内容

\n
popup.setText('hello world');\n
\n

remove

\n

移除popup

\n
popup.remove();\n
\n

事件

\n

close

\n
popup.on('close', () => {});\n
\n

示例代码

\n

添加popup

\n
  var html = '<p>'+feature.m+'</p>';\n  const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
\n

FAQ

"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-d2b3f82b0a8e66040aa810a8958afe0d.json b/.cache/caches/gatsby-transformer-remark/diskstore-d2b3f82b0a8e66040aa810a8958afe0d.json deleted file mode 100644 index 6e08bff604..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-d2b3f82b0a8e66040aa810a8958afe0d.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-d1a5a1e053cc8aaf5e0018566456ceec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"

Marker 地图标注 目前只支持2D dom标注

\n

构造函数

\n

Marker
const Marker = new L7.Marker(option)

\n

option

\n
    \n
  • color        string   \"map-marker.png\" 设置默认marker的颜色
  • \n
  • element    Dom|string    自定义marker Dom节点,可以是dom实例,也可以是dom id
  • \n
  • anchor     string  锚点位置  支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right
  • \n
  • offset    Array  偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量
  • \n
\n

方法

\n

setLnglat

\n

设置marker经纬度位置

\n

addTo

\n

将marker添加到地图Scene

\n

remove

\n

移除marker

\n

getElement

\n

获取marker dom Element

\n

getLngLat

\n

获取marker经纬度坐标

\n

togglePopup

\n

开启或者关闭marker弹出框

\n

setPopup

\n

为marker设置popup

\n

getPopup

\n

获取marker弹出框

\n

示例代码

\n

默认Marker

\n

**
const marker = new L7.Marker({color:'blue'})

\n

自定义Marker

\n
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat([data[i].x * 1, data[i].y])\n  .addTo(scene);\n
\n

设置 popup

\n
var popup = new L7.Popup({\n  anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat(item.coordinates)\n  .setPopup(popup)\n  .addTo(scene);\n
"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-d54f92e5508c67d452a6a5de39a3b11d.json b/.cache/caches/gatsby-transformer-remark/diskstore-d54f92e5508c67d452a6a5de39a3b11d.json deleted file mode 100644 index 4c8b48035b..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-d54f92e5508c67d452a6a5de39a3b11d.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-a4fe772925611fe2511fd096da3801f0-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-dc1901f7f1baf243df1556f52717b2ba.json b/.cache/caches/gatsby-transformer-remark/diskstore-dc1901f7f1baf243df1556f52717b2ba.json deleted file mode 100644 index 132097f980..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-dc1901f7f1baf243df1556f52717b2ba.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-ddc1db31dfe2bcb6d2040bce323f5828.json b/.cache/caches/gatsby-transformer-remark/diskstore-ddc1db31dfe2bcb6d2040bce323f5828.json deleted file mode 100644 index f6a2301db1..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-ddc1db31dfe2bcb6d2040bce323f5828.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-b1a6eb4a5fb92e03f562537f31f11c68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":2,"children":[{"type":"link","url":"#数据","title":null,"children":[],"data":{"hProperties":{"aria-label":"数据 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"数据","position":{"start":{"line":2,"column":4,"offset":4},"end":{"line":2,"column":6,"offset":6},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":6,"offset":6},"indent":[]},"data":{"id":"数据","htmlAttributes":{"id":"数据"},"hProperties":{"id":"数据"}}},{"type":"paragraph","children":[{"type":"text","value":"目前L7支持的数据格式有GeoJson,CSV,JSon Image","position":{"start":{"line":4,"column":1,"offset":8},"end":{"line":4,"column":35,"offset":42},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":8},"end":{"line":4,"column":35,"offset":42},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"GeoJSON 支持点、线、面,等所有的空间数据格式。","position":{"start":{"line":6,"column":1,"offset":44},"end":{"line":6,"column":28,"offset":71},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":6,"column":28,"offset":71},"end":{"line":6,"column":34,"offset":77},"indent":[]}},{"type":"text","value":"CSV 支持,点,线段,弧线的支持。","position":{"start":{"line":6,"column":34,"offset":77},"end":{"line":6,"column":52,"offset":95},"indent":[]}},{"type":"html","value":"
","position":{"start":{"line":6,"column":52,"offset":95},"end":{"line":6,"column":58,"offset":101},"indent":[]}},{"type":"text","value":"JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。","position":{"start":{"line":6,"column":58,"offset":101},"end":{"line":6,"column":91,"offset":134},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":44},"end":{"line":6,"column":91,"offset":134},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#geojson","title":null,"children":[],"data":{"hProperties":{"aria-label":"geojson permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"GeoJSON","position":{"start":{"line":9,"column":4,"offset":140},"end":{"line":9,"column":11,"offset":147},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":137},"end":{"line":9,"column":11,"offset":147},"indent":[]},"data":{"id":"geojson","htmlAttributes":{"id":"geojson"},"hProperties":{"id":"geojson"}}},{"type":"blockquote","children":[{"type":"paragraph","children":[{"type":"text","value":"GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。","position":{"start":{"line":11,"column":3,"offset":151},"end":{"line":11,"column":128,"offset":276},"indent":[]}}],"position":{"start":{"line":11,"column":3,"offset":151},"end":{"line":11,"column":128,"offset":276},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":149},"end":{"line":11,"column":128,"offset":276},"indent":[]}},{"type":"html","lang":"json","meta":null,"value":"
{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {},\n      \"geometry\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n          [\n            [110.478515625, 32.76880048488168],\n            [117.68554687499999, 32.76880048488168],\n            [117.68554687499999, 37.64903402157866],\n            [110.478515625, 37.64903402157866],\n            [110.478515625, 32.76880048488168]\n          ]\n        ]\n      }\n    }\n  ]\n}\n
","position":{"start":{"line":15,"column":1,"offset":280},"end":{"line":52,"column":4,"offset":980},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#地理统计分析工具","title":null,"children":[],"data":{"hProperties":{"aria-label":"地理统计分析工具 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"地理统计分析工具","position":{"start":{"line":54,"column":4,"offset":985},"end":{"line":54,"column":12,"offset":993},"indent":[]}}],"position":{"start":{"line":54,"column":1,"offset":982},"end":{"line":54,"column":12,"offset":993},"indent":[]},"data":{"id":"地理统计分析工具","htmlAttributes":{"id":"地理统计分析工具"},"hProperties":{"id":"地理统计分析工具"}}},{"type":"paragraph","children":[{"type":"link","title":null,"url":"http://turfjs.org/","children":[{"type":"text","value":"turfjs","position":{"start":{"line":55,"column":2,"offset":995},"end":{"line":55,"column":8,"offset":1001},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":994},"end":{"line":55,"column":29,"offset":1022},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"text","value":":  地理数据计算,处理,统计,分析的Javascript 库","position":{"start":{"line":55,"column":29,"offset":1022},"end":{"line":55,"column":60,"offset":1053},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":994},"end":{"line":55,"column":60,"offset":1053},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#在线工具","title":null,"children":[],"data":{"hProperties":{"aria-label":"在线工具 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"在线工具","position":{"start":{"line":57,"column":4,"offset":1058},"end":{"line":57,"column":8,"offset":1062},"indent":[]}}],"position":{"start":{"line":57,"column":1,"offset":1055},"end":{"line":57,"column":8,"offset":1062},"indent":[]},"data":{"id":"在线工具","htmlAttributes":{"id":"在线工具"},"hProperties":{"id":"在线工具"}}},{"type":"paragraph","children":[{"type":"link","title":null,"url":"http://geojson.io/","children":[{"type":"text","value":"http://geojson.io/","position":{"start":{"line":59,"column":2,"offset":1065},"end":{"line":59,"column":20,"offset":1083},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":1064},"end":{"line":59,"column":41,"offset":1104},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"text","value":"    可以在线查看,绘制,修改GeoJSON数据","position":{"start":{"line":59,"column":41,"offset":1104},"end":{"line":59,"column":66,"offset":1129},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":1064},"end":{"line":59,"column":66,"offset":1129},"indent":[]}},{"type":"paragraph","children":[{"type":"link","title":null,"url":"https://mapshaper.org/","children":[{"type":"text","value":"https://mapshaper.org/","position":{"start":{"line":61,"column":2,"offset":1132},"end":{"line":61,"column":24,"offset":1154},"indent":[]}}],"position":{"start":{"line":61,"column":1,"offset":1131},"end":{"line":61,"column":49,"offset":1179},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"text","value":"  可以查看较大的geojson,还能够简化GeoJSON数据","position":{"start":{"line":61,"column":49,"offset":1179},"end":{"line":61,"column":80,"offset":1210},"indent":[]}}],"position":{"start":{"line":61,"column":1,"offset":1131},"end":{"line":61,"column":80,"offset":1210},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":62,"column":1,"offset":1211}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-df3273d6861bb7279e1756896d11d0e5.json b/.cache/caches/gatsby-transformer-remark/diskstore-df3273d6861bb7279e1756896d11d0e5.json deleted file mode 100644 index 197af1a568..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-df3273d6861bb7279e1756896d11d0e5.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-db2afa837fc242d71bff6d1c467bb7be-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-e116079d62fd21e38d5b2a8325a7235f.json b/.cache/caches/gatsby-transformer-remark/diskstore-e116079d62fd21e38d5b2a8325a7235f.json deleted file mode 100644 index 5f194f7fd6..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-e116079d62fd21e38d5b2a8325a7235f.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-f47fd0b2c242daaaeea802a1c34eacee-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-e4c1d977c1779e489bb663fddbf8dbd4.json b/.cache/caches/gatsby-transformer-remark/diskstore-e4c1d977c1779e489bb663fddbf8dbd4.json deleted file mode 100644 index 5a63a7d8b9..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-e4c1d977c1779e489bb663fddbf8dbd4.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-c2d419b3714b95a5e649d8745a7ba50e-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-fbddf0de549e59cfa8bf242898a85984.json b/.cache/caches/gatsby-transformer-remark/diskstore-fbddf0de549e59cfa8bf242898a85984.json deleted file mode 100644 index 981f5af71f..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-fbddf0de549e59cfa8bf242898a85984.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-toc-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-fd880f1d7896439a1f4085b003961e52.json b/.cache/caches/gatsby-transformer-remark/diskstore-fd880f1d7896439a1f4085b003961e52.json deleted file mode 100644 index 22b8f88c70..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-fd880f1d7896439a1f4085b003961e52.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-b627c832a1f77c6bd67b3f67116e04eb-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-fed5770f608dd2a2a26b956dd6c5ab02.json b/.cache/caches/gatsby-transformer-remark/diskstore-fed5770f608dd2a2a26b956dd6c5ab02.json deleted file mode 100644 index a90d631174..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-fed5770f608dd2a2a26b956dd6c5ab02.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-0b8b19ff19f6a64f7b2cae67200ccd88-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/commonjs/api-runner-browser-plugins.js b/.cache/commonjs/api-runner-browser-plugins.js deleted file mode 100644 index 856ca4608f..0000000000 --- a/.cache/commonjs/api-runner-browser-plugins.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -// During bootstrap, we write requires at top of this file which looks -// basically like: -// module.exports = [ -// { -// plugin: require("/path/to/plugin1/gatsby-browser.js"), -// options: { ... }, -// }, -// { -// plugin: require("/path/to/plugin2/gatsby-browser.js"), -// options: { ... }, -// }, -// ] -module.exports = []; \ No newline at end of file diff --git a/.cache/commonjs/api-runner-browser.js b/.cache/commonjs/api-runner-browser.js deleted file mode 100644 index fb76cb89a6..0000000000 --- a/.cache/commonjs/api-runner-browser.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; - -const plugins = require(`./api-runner-browser-plugins`); - -const { - getResourcesForPathname, - getResourcesForPathnameSync, - getResourceURLsForPathname, - loadPage, - loadPageSync -} = require(`./loader`).publicLoader; - -exports.apiRunner = (api, args = {}, defaultReturn, argTransform) => { - // Hooks for gatsby-cypress's API handler - if (process.env.CYPRESS_SUPPORT) { - if (window.___apiHandler) { - window.___apiHandler(api); - } else if (window.___resolvedAPIs) { - window.___resolvedAPIs.push(api); - } else { - window.___resolvedAPIs = [api]; - } - } - - let results = plugins.map(plugin => { - if (!plugin.plugin[api]) { - return undefined; - } // Deprecated April 2019. Use `loadPageSync` instead - - - args.getResourcesForPathnameSync = getResourcesForPathnameSync; // Deprecated April 2019. Use `loadPage` instead - - args.getResourcesForPathname = getResourcesForPathname; - args.getResourceURLsForPathname = getResourceURLsForPathname; - args.loadPage = loadPage; - args.loadPageSync = loadPageSync; - const result = plugin.plugin[api](args, plugin.options); - - if (result && argTransform) { - args = argTransform({ - args, - result, - plugin - }); - } - - return result; - }); // Filter out undefined results. - - results = results.filter(result => typeof result !== `undefined`); - - if (results.length > 0) { - return results; - } else if (defaultReturn) { - return [defaultReturn]; - } else { - return []; - } -}; - -exports.apiRunnerAsync = (api, args, defaultReturn) => plugins.reduce((previous, next) => next.plugin[api] ? previous.then(() => next.plugin[api](args, next.options)) : previous, Promise.resolve()); \ No newline at end of file diff --git a/.cache/commonjs/api-runner-ssr.js b/.cache/commonjs/api-runner-ssr.js deleted file mode 100644 index ba6125debe..0000000000 --- a/.cache/commonjs/api-runner-ssr.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -// During bootstrap, we write requires at top of this file which looks like: -// var plugins = [ -// { -// plugin: require("/path/to/plugin1/gatsby-ssr.js"), -// options: { ... }, -// }, -// { -// plugin: require("/path/to/plugin2/gatsby-ssr.js"), -// options: { ... }, -// }, -// ] -const apis = require(`./api-ssr-docs`); // Run the specified API in any plugins that have implemented it - - -module.exports = (api, args, defaultReturn, argTransform) => { - if (!apis[api]) { - console.log(`This API doesn't exist`, api); - } // Run each plugin in series. - // eslint-disable-next-line no-undef - - - let results = plugins.map(plugin => { - if (!plugin.plugin[api]) { - return undefined; - } - - const result = plugin.plugin[api](args, plugin.options); - - if (result && argTransform) { - args = argTransform({ - args, - result - }); - } - - return result; - }); // Filter out undefined results. - - results = results.filter(result => typeof result !== `undefined`); - - if (results.length > 0) { - return results; - } else { - return [defaultReturn]; - } -}; \ No newline at end of file diff --git a/.cache/commonjs/api-ssr-docs.js b/.cache/commonjs/api-ssr-docs.js deleted file mode 100644 index d1c15c4174..0000000000 --- a/.cache/commonjs/api-ssr-docs.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -/** - * Object containing options defined in `gatsby-config.js` - * @typedef {object} pluginOptions - */ - -/** - * Replace the default server renderer. This is useful for integration with - * Redux, css-in-js libraries, etc. that need custom setups for server - * rendering. - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {function} $0.replaceBodyHTMLString Call this with the HTML string - * you render. **WARNING** if multiple plugins implement this API it's the - * last plugin that "wins". TODO implement an automated warning against this. - * @param {function} $0.setHeadComponents Takes an array of components as its - * first argument which are added to the `headComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setHtmlAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setBodyAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setPreBodyComponents Takes an array of components as its - * first argument which are added to the `preBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setPostBodyComponents Takes an array of components as its - * first argument which are added to the `postBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setBodyProps Takes an object of data which - * is merged with other body props and passed to `html.js` as `bodyProps`. - * @param {pluginOptions} pluginOptions - * @example - * // From gatsby-plugin-glamor - * const { renderToString } = require("react-dom/server") - * const inline = require("glamor-inline") - * - * exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => { - * const bodyHTML = renderToString(bodyComponent) - * const inlinedHTML = inline(bodyHTML) - * - * replaceBodyHTMLString(inlinedHTML) - * } - */ -exports.replaceRenderer = true; -/** - * Called after every page Gatsby server renders while building HTML so you can - * set head and body components to be rendered in your `html.js`. - * - * Gatsby does a two-pass render for HTML. It loops through your pages first - * rendering only the body and then takes the result body HTML string and - * passes it as the `body` prop to your `html.js` to complete the render. - * - * It's often handy to be able to send custom components to your `html.js`. - * For example, it's a very common pattern for React.js libraries that - * support server rendering to pull out data generated during the render to - * add to your HTML. - * - * Using this API over [`replaceRenderer`](#replaceRenderer) is preferable as - * multiple plugins can implement this API where only one plugin can take - * over server rendering. However, if your plugin requires taking over server - * rendering then that's the one to - * use - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {function} $0.setHeadComponents Takes an array of components as its - * first argument which are added to the `headComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setHtmlAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setBodyAttributes Takes an object of props which will - * spread into the `` component. - * @param {function} $0.setPreBodyComponents Takes an array of components as its - * first argument which are added to the `preBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setPostBodyComponents Takes an array of components as its - * first argument which are added to the `postBodyComponents` array which is passed - * to the `html.js` component. - * @param {function} $0.setBodyProps Takes an object of data which - * is merged with other body props and passed to `html.js` as `bodyProps`. - * @param {pluginOptions} pluginOptions - * @example - * const { Helmet } = require("react-helmet") - * - * exports.onRenderBody = ( - * { setHeadComponents, setHtmlAttributes, setBodyAttributes }, - * pluginOptions - * ) => { - * const helmet = Helmet.renderStatic() - * setHtmlAttributes(helmet.htmlAttributes.toComponent()) - * setBodyAttributes(helmet.bodyAttributes.toComponent()) - * setHeadComponents([ - * helmet.title.toComponent(), - * helmet.link.toComponent(), - * helmet.meta.toComponent(), - * helmet.noscript.toComponent(), - * helmet.script.toComponent(), - * helmet.style.toComponent(), - * ]) - * } - */ - -exports.onRenderBody = true; -/** - * Called after every page Gatsby server renders while building HTML so you can - * replace head components to be rendered in your `html.js`. This is useful if - * you need to reorder scripts or styles added by other plugins. - * @param {object} $0 - * @param {string} $0.pathname The pathname of the page currently being rendered. - * @param {Array} $0.getHeadComponents Returns the current `headComponents` array. - * @param {function} $0.replaceHeadComponents Takes an array of components as its - * first argument which replace the `headComponents` array which is passed - * to the `html.js` component. **WARNING** if multiple plugins implement this - * API it's the last plugin that "wins". - * @param {Array} $0.getPreBodyComponents Returns the current `preBodyComponents` array. - * @param {function} $0.replacePreBodyComponents Takes an array of components as its - * first argument which replace the `preBodyComponents` array which is passed - * to the `html.js` component. **WARNING** if multiple plugins implement this - * API it's the last plugin that "wins". - * @param {Array} $0.getPostBodyComponents Returns the current `postBodyComponents` array. - * @param {function} $0.replacePostBodyComponents Takes an array of components as its - * first argument which replace the `postBodyComponents` array which is passed - * to the `html.js` component. **WARNING** if multiple plugins implement this - * API it's the last plugin that "wins". - * @param {pluginOptions} pluginOptions - * @example - * // Move Typography.js styles to the top of the head section so they're loaded first. - * exports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => { - * const headComponents = getHeadComponents() - * headComponents.sort((x, y) => { - * if (x.key === 'TypographyStyle') { - * return -1 - * } else if (y.key === 'TypographyStyle') { - * return 1 - * } - * return 0 - * }) - * replaceHeadComponents(headComponents) - * } - */ - -exports.onPreRenderHTML = true; -/** - * Allow a plugin to wrap the page element. - * - * This is useful for setting wrapper components around pages that won't get - * unmounted on page changes. For setting Provider components, use [wrapRootElement](#wrapRootElement). - * - * _Note:_ - * There is an equivalent hook in Gatsby's [Browser API](/docs/browser-apis/#wrapPageElement). - * It is recommended to use both APIs together. - * For example usage, check out [Using i18n](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n). - * @param {object} $0 - * @param {ReactNode} $0.element The "Page" React Element built by Gatsby. - * @param {object} $0.props Props object used by page. - * @param {pluginOptions} pluginOptions - * @returns {ReactNode} Wrapped element - * @example - * const React = require("react") - * const Layout = require("./src/components/layout").default - * - * exports.wrapPageElement = ({ element, props }) => { - * // props provide same data to Layout as Page element will get - * // including location, data, etc - you don't need to pass it - * return {element} - * } - */ - -exports.wrapPageElement = true; -/** - * Allow a plugin to wrap the root element. - * - * This is useful to set up any Provider components that will wrap your application. - * For setting persistent UI elements around pages use [wrapPageElement](#wrapPageElement). - * - * _Note:_ - * There is an equivalent hook in Gatsby's [Browser API](/docs/browser-apis/#wrapRootElement). - * It is recommended to use both APIs together. - * For example usage, check out [Using redux](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-redux). - * @param {object} $0 - * @param {ReactNode} $0.element The "Root" React Element built by Gatsby. - * @param {pluginOptions} pluginOptions - * @returns {ReactNode} Wrapped element - * @example - * const React = require("react") - * const { Provider } = require("react-redux") - * - * const createStore = require("./src/state/createStore") - * const store = createStore() - * - * exports.wrapRootElement = ({ element }) => { - * return ( - * - * {element} - * - * ) - * } - */ - -exports.wrapRootElement = true; \ No newline at end of file diff --git a/.cache/commonjs/app.js b/.cache/commonjs/app.js deleted file mode 100644 index 59707c697b..0000000000 --- a/.cache/commonjs/app.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -var _react = _interopRequireDefault(require("react")); - -var _reactDom = _interopRequireDefault(require("react-dom")); - -var _domready = _interopRequireDefault(require("@mikaelkristiansson/domready")); - -var _socketIo = _interopRequireDefault(require("./socketIo")); - -var _emitter = _interopRequireDefault(require("./emitter")); - -var _apiRunnerBrowser = require("./api-runner-browser"); - -var _loader = require("./loader"); - -var _devLoader = _interopRequireDefault(require("./dev-loader")); - -var _syncRequires = _interopRequireDefault(require("./sync-requires")); - -var _matchPaths = _interopRequireDefault(require("./match-paths.json")); - -// Generated during bootstrap -window.___emitter = _emitter.default; -const loader = new _devLoader.default(_syncRequires.default, _matchPaths.default); -(0, _loader.setLoader)(loader); -loader.setApiRunner(_apiRunnerBrowser.apiRunner); -window.___loader = _loader.publicLoader; // Let the site/plugins run code very early. - -(0, _apiRunnerBrowser.apiRunnerAsync)(`onClientEntry`).then(() => { - // Hook up the client to socket.io on server - const socket = (0, _socketIo.default)(); - - if (socket) { - socket.on(`reload`, () => { - window.location.reload(); - }); - } - /** - * Service Workers are persistent by nature. They stick around, - * serving a cached version of the site if they aren't removed. - * This is especially frustrating when you need to test the - * production build on your local machine. - * - * Let's warn if we find service workers in development. - */ - - - if (`serviceWorker` in navigator) { - navigator.serviceWorker.getRegistrations().then(registrations => { - if (registrations.length > 0) console.warn(`Warning: found one or more service workers present.`, `If your site isn't behaving as expected, you might want to remove these.`, registrations); - }); - } - - const rootElement = document.getElementById(`___gatsby`); - const renderer = (0, _apiRunnerBrowser.apiRunner)(`replaceHydrateFunction`, undefined, _reactDom.default.render)[0]; - Promise.all([loader.loadPage(`/dev-404-page/`), loader.loadPage(`/404.html`), loader.loadPage(window.location.pathname)]).then(() => { - const preferDefault = m => m && m.default || m; - - let Root = preferDefault(require(`./root`)); - (0, _domready.default)(() => { - renderer(_react.default.createElement(Root, null), rootElement, () => { - (0, _apiRunnerBrowser.apiRunner)(`onInitialClientRender`); - }); - }); - }); -}); \ No newline at end of file diff --git a/.cache/commonjs/create-react-context.js b/.cache/commonjs/create-react-context.js deleted file mode 100644 index d8f31c4c3a..0000000000 --- a/.cache/commonjs/create-react-context.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _default = _react.default.createContext; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/default-html.js b/.cache/commonjs/default-html.js deleted file mode 100644 index bb6e0bf77e..0000000000 --- a/.cache/commonjs/default-html.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = HTML; - -var _react = _interopRequireDefault(require("react")); - -var _propTypes = _interopRequireDefault(require("prop-types")); - -function HTML(props) { - return _react.default.createElement("html", props.htmlAttributes, _react.default.createElement("head", null, _react.default.createElement("meta", { - charSet: "utf-8" - }), _react.default.createElement("meta", { - httpEquiv: "x-ua-compatible", - content: "ie=edge" - }), _react.default.createElement("meta", { - name: "viewport", - content: "width=device-width, initial-scale=1, shrink-to-fit=no" - }), props.headComponents), _react.default.createElement("body", props.bodyAttributes, props.preBodyComponents, _react.default.createElement("noscript", { - key: "noscript", - id: "gatsby-noscript" - }, "This app works best with JavaScript enabled."), _react.default.createElement("div", { - key: `body`, - id: "___gatsby", - dangerouslySetInnerHTML: { - __html: props.body - } - }), props.postBodyComponents)); -} - -HTML.propTypes = { - htmlAttributes: _propTypes.default.object, - headComponents: _propTypes.default.array, - bodyAttributes: _propTypes.default.object, - preBodyComponents: _propTypes.default.array, - body: _propTypes.default.string, - postBodyComponents: _propTypes.default.array -}; \ No newline at end of file diff --git a/.cache/commonjs/dev-loader.js b/.cache/commonjs/dev-loader.js deleted file mode 100644 index e122372a0e..0000000000 --- a/.cache/commonjs/dev-loader.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = void 0; - -var _loader = require("./loader"); - -var _findPath = require("./find-path"); - -class DevLoader extends _loader.BaseLoader { - constructor(syncRequires, matchPaths) { - const loadComponent = chunkName => Promise.resolve(syncRequires.components[chunkName]); - - super(loadComponent, matchPaths); - } - - loadPage(pagePath) { - const realPath = (0, _findPath.findPath)(pagePath); - return super.loadPage(realPath).then(result => require(`./socketIo`).getPageData(realPath).then(() => result)); - } - - loadPageDataJson(rawPath) { - return super.loadPageDataJson(rawPath).then(data => { - // when we can't find a proper 404.html we fallback to dev-404-page - // we need to make sure to mark it as not found. - if (data.status === `failure`) { - return this.loadPageDataJson(`/dev-404-page/`).then(result => Object.assign({}, data, result)); - } - - return data; - }); - } - - doPrefetch(pagePath) { - return Promise.resolve(require(`./socketIo`).getPageData(pagePath)); - } - -} - -var _default = DevLoader; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/develop-static-entry.js b/.cache/commonjs/develop-static-entry.js deleted file mode 100644 index 948fea5484..0000000000 --- a/.cache/commonjs/develop-static-entry.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _server = require("react-dom/server"); - -var _lodash = require("lodash"); - -var _apiRunnerSsr = _interopRequireDefault(require("./api-runner-ssr")); - -// import testRequireError from "./test-require-error" -// For some extremely mysterious reason, webpack adds the above module *after* -// this module so that when this code runs, testRequireError is undefined. -// So in the meantime, we'll just inline it. -const testRequireError = (moduleName, err) => { - const regex = new RegExp(`Error: Cannot find module\\s.${moduleName}`); - const firstLine = err.toString().split(`\n`)[0]; - return regex.test(firstLine); -}; - -let Html; - -try { - Html = require(`../src/html`); -} catch (err) { - if (testRequireError(`../src/html`, err)) { - Html = require(`./default-html`); - } else { - console.log(`There was an error requiring "src/html.js"\n\n`, err, `\n\n`); - process.exit(); - } -} - -Html = Html && Html.__esModule ? Html.default : Html; - -var _default = (pagePath, callback) => { - let headComponents = [_react.default.createElement("meta", { - key: "environment", - name: "note", - content: "environment=development" - })]; - let htmlAttributes = {}; - let bodyAttributes = {}; - let preBodyComponents = []; - let postBodyComponents = []; - let bodyProps = {}; - let htmlStr; - - const setHeadComponents = components => { - headComponents = headComponents.concat(components); - }; - - const setHtmlAttributes = attributes => { - htmlAttributes = (0, _lodash.merge)(htmlAttributes, attributes); - }; - - const setBodyAttributes = attributes => { - bodyAttributes = (0, _lodash.merge)(bodyAttributes, attributes); - }; - - const setPreBodyComponents = components => { - preBodyComponents = preBodyComponents.concat(components); - }; - - const setPostBodyComponents = components => { - postBodyComponents = postBodyComponents.concat(components); - }; - - const setBodyProps = props => { - bodyProps = (0, _lodash.merge)({}, bodyProps, props); - }; - - const getHeadComponents = () => headComponents; - - const replaceHeadComponents = components => { - headComponents = components; - }; - - const getPreBodyComponents = () => preBodyComponents; - - const replacePreBodyComponents = components => { - preBodyComponents = components; - }; - - const getPostBodyComponents = () => postBodyComponents; - - const replacePostBodyComponents = components => { - postBodyComponents = components; - }; - - (0, _apiRunnerSsr.default)(`onRenderBody`, { - setHeadComponents, - setHtmlAttributes, - setBodyAttributes, - setPreBodyComponents, - setPostBodyComponents, - setBodyProps, - pathname: pagePath - }); - (0, _apiRunnerSsr.default)(`onPreRenderHTML`, { - getHeadComponents, - replaceHeadComponents, - getPreBodyComponents, - replacePreBodyComponents, - getPostBodyComponents, - replacePostBodyComponents, - pathname: pagePath - }); - - const htmlElement = _react.default.createElement(Html, Object.assign({}, bodyProps, { - body: ``, - headComponents: headComponents.concat([_react.default.createElement("script", { - key: `io`, - src: "/socket.io/socket.io.js" - })]), - htmlAttributes, - bodyAttributes, - preBodyComponents, - postBodyComponents: postBodyComponents.concat([_react.default.createElement("script", { - key: `commons`, - src: "/commons.js" - })]) - })); - - htmlStr = (0, _server.renderToStaticMarkup)(htmlElement); - htmlStr = `${htmlStr}`; - callback(null, htmlStr); -}; - -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/emitter.js b/.cache/commonjs/emitter.js deleted file mode 100644 index eaac98b5f3..0000000000 --- a/.cache/commonjs/emitter.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _mitt = _interopRequireDefault(require("mitt")); - -const emitter = (0, _mitt.default)(); -var _default = emitter; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/ensure-resources.js b/.cache/commonjs/ensure-resources.js deleted file mode 100644 index b6dcecc354..0000000000 --- a/.cache/commonjs/ensure-resources.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _loader = _interopRequireDefault(require("./loader")); - -var _shallowCompare = _interopRequireDefault(require("shallow-compare")); - -class EnsureResources extends _react.default.Component { - constructor(props) { - super(); - const { - location, - pageResources - } = props; - this.state = { - location: Object.assign({}, location), - pageResources: pageResources || _loader.default.loadPageSync(location.pathname) - }; - } - - static getDerivedStateFromProps({ - location - }, prevState) { - if (prevState.location.href !== location.href) { - const pageResources = _loader.default.loadPageSync(location.pathname); - - return { - pageResources, - location: Object.assign({}, location) - }; - } - - return { - location: Object.assign({}, location) - }; - } - - loadResources(rawPath) { - _loader.default.loadPage(rawPath).then(pageResources => { - if (pageResources && pageResources.status !== `error`) { - this.setState({ - location: Object.assign({}, window.location), - pageResources - }); - } else { - window.history.replaceState({}, ``, location.href); - window.location = rawPath; - } - }); - } - - shouldComponentUpdate(nextProps, nextState) { - // Always return false if we're missing resources. - if (!nextState.pageResources) { - this.loadResources(nextProps.location.pathname); - return false; - } // Check if the component or json have changed. - - - if (this.state.pageResources !== nextState.pageResources) { - return true; - } - - if (this.state.pageResources.component !== nextState.pageResources.component) { - return true; - } - - if (this.state.pageResources.json !== nextState.pageResources.json) { - return true; - } // Check if location has changed on a page using internal routing - // via matchPath configuration. - - - if (this.state.location.key !== nextState.location.key && nextState.pageResources.page && (nextState.pageResources.page.matchPath || nextState.pageResources.page.path)) { - return true; - } - - return (0, _shallowCompare.default)(this, nextProps, nextState); - } - - render() { - return this.props.children(this.state); - } - -} - -var _default = EnsureResources; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/error-overlay-handler.js b/.cache/commonjs/error-overlay-handler.js deleted file mode 100644 index 41785a572d..0000000000 --- a/.cache/commonjs/error-overlay-handler.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); - -exports.__esModule = true; -exports.errorMap = exports.reportError = exports.clearError = void 0; - -var ErrorOverlay = _interopRequireWildcard(require("react-error-overlay")); - -// Report runtime errors -ErrorOverlay.startReportingRuntimeErrors({ - onError: () => {}, - filename: `/commons.js` -}); -ErrorOverlay.setEditorHandler(errorLocation => window.fetch(`/__open-stack-frame-in-editor?fileName=` + window.encodeURIComponent(errorLocation.fileName) + `&lineNumber=` + window.encodeURIComponent(errorLocation.lineNumber || 1))); -const errorMap = {}; -exports.errorMap = errorMap; - -function flat(arr) { - return Array.prototype.flat ? arr.flat() : [].concat(...arr); -} - -const handleErrorOverlay = () => { - const errors = Object.values(errorMap); - let errorStringsToDisplay = []; - - if (errors.length > 0) { - errorStringsToDisplay = flat(errors).map(error => { - if (typeof error === `string`) { - return error; - } else if (typeof error === `object`) { - const errorStrBuilder = [error.text]; - - if (error.filePath) { - errorStrBuilder.push(`File: ${error.filePath}`); - } - - return errorStrBuilder.join(`\n\n`); - } - - return null; - }).filter(Boolean); - } - - if (errorStringsToDisplay.length > 0) { - ErrorOverlay.reportBuildError(errorStringsToDisplay.join(`\n\n`)); - } else { - ErrorOverlay.dismissBuildError(); - } -}; - -const clearError = errorID => { - delete errorMap[errorID]; - handleErrorOverlay(); -}; - -exports.clearError = clearError; - -const reportError = (errorID, error) => { - if (error) { - errorMap[errorID] = error; - } - - handleErrorOverlay(); -}; - -exports.reportError = reportError; \ No newline at end of file diff --git a/.cache/commonjs/find-path.js b/.cache/commonjs/find-path.js deleted file mode 100644 index f4a2c05af5..0000000000 --- a/.cache/commonjs/find-path.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.cleanPath = exports.findPath = exports.findMatchPath = exports.setMatchPaths = void 0; - -var _utils = require("@reach/router/lib/utils"); - -var _stripPrefix = _interopRequireDefault(require("./strip-prefix")); - -var _normalizePagePath = _interopRequireDefault(require("./normalize-page-path")); - -const pathCache = new Map(); -let matchPaths = []; - -const trimPathname = rawPathname => { - let pathname = decodeURIComponent(rawPathname); // Remove the pathPrefix from the pathname. - - let trimmedPathname = (0, _stripPrefix.default)(pathname, __BASE_PATH__) // Remove any hashfragment - .split(`#`)[0] // Remove search query - .split(`?`)[0]; - return trimmedPathname; -}; -/** - * Set list of matchPaths - * - * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths - */ - - -const setMatchPaths = value => { - matchPaths = value; -}; -/** - * Return a matchpath url - * if `match-paths.json` contains `{ "/foo*": "/page1", ...}`, then - * `/foo?bar=far` => `/page1` - * - * @param {string} rawPathname A raw pathname - * @return {string|null} - */ - - -exports.setMatchPaths = setMatchPaths; - -const findMatchPath = rawPathname => { - const trimmedPathname = cleanPath(rawPathname); - - for (const { - matchPath, - path - } of matchPaths) { - if ((0, _utils.match)(matchPath, trimmedPathname)) { - return (0, _normalizePagePath.default)(path); - } - } - - return null; -}; // Given a raw URL path, returns the cleaned version of it (trim off -// `#` and query params), or if it matches an entry in -// `match-paths.json`, its matched path is returned -// -// E.g `/foo?bar=far` => `/foo` -// -// Or if `match-paths.json` contains `{ "/foo*": "/page1", ...}`, then -// `/foo?bar=far` => `/page1` - - -exports.findMatchPath = findMatchPath; - -const findPath = rawPathname => { - const trimmedPathname = trimPathname(rawPathname); - - if (pathCache.has(trimmedPathname)) { - return pathCache.get(trimmedPathname); - } - - let foundPath = findMatchPath(trimmedPathname); - - if (!foundPath) { - foundPath = cleanPath(rawPathname); - } - - pathCache.set(trimmedPathname, foundPath); - return foundPath; -}; -/** - * Clean a url and converts /index.html => / - * E.g `/foo?bar=far` => `/foo` - * - * @param {string} rawPathname A raw pathname - * @return {string} - */ - - -exports.findPath = findPath; - -const cleanPath = rawPathname => { - const trimmedPathname = trimPathname(rawPathname); - let foundPath = trimmedPathname; - - if (foundPath === `/index.html`) { - foundPath = `/`; - } - - foundPath = (0, _normalizePagePath.default)(foundPath); - return foundPath; -}; - -exports.cleanPath = cleanPath; \ No newline at end of file diff --git a/.cache/commonjs/gatsby-browser-entry.js b/.cache/commonjs/gatsby-browser-entry.js deleted file mode 100644 index d2dc9823f4..0000000000 --- a/.cache/commonjs/gatsby-browser-entry.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; - -var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.graphql = graphql; -exports.prefetchPathname = exports.useStaticQuery = exports.StaticQuery = exports.StaticQueryContext = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _propTypes = _interopRequireDefault(require("prop-types")); - -var _gatsbyLink = _interopRequireWildcard(require("gatsby-link")); - -exports.Link = _gatsbyLink.default; -exports.withPrefix = _gatsbyLink.withPrefix; -exports.withAssetPrefix = _gatsbyLink.withAssetPrefix; -exports.navigate = _gatsbyLink.navigate; -exports.push = _gatsbyLink.push; -exports.replace = _gatsbyLink.replace; -exports.navigateTo = _gatsbyLink.navigateTo; -exports.parsePath = _gatsbyLink.parsePath; - -var _publicPageRenderer = _interopRequireDefault(require("./public-page-renderer")); - -exports.PageRenderer = _publicPageRenderer.default; - -var _loader = _interopRequireDefault(require("./loader")); - -const prefetchPathname = _loader.default.enqueue; -exports.prefetchPathname = prefetchPathname; - -const StaticQueryContext = _react.default.createContext({}); - -exports.StaticQueryContext = StaticQueryContext; - -function StaticQueryDataRenderer({ - staticQueryData, - data, - query, - render -}) { - const finalData = data ? data.data : staticQueryData[query] && staticQueryData[query].data; - return _react.default.createElement(_react.default.Fragment, null, finalData && render(finalData), !finalData && _react.default.createElement("div", null, "Loading (StaticQuery)")); -} - -const StaticQuery = props => { - const { - data, - query, - render, - children - } = props; - return _react.default.createElement(StaticQueryContext.Consumer, null, staticQueryData => _react.default.createElement(StaticQueryDataRenderer, { - data: data, - query: query, - render: render || children, - staticQueryData: staticQueryData - })); -}; - -exports.StaticQuery = StaticQuery; - -const useStaticQuery = query => { - if (typeof _react.default.useContext !== `function` && process.env.NODE_ENV === `development`) { - throw new Error(`You're likely using a version of React that doesn't support Hooks\n` + `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`); - } - - const context = _react.default.useContext(StaticQueryContext); - - if (context[query] && context[query].data) { - return context[query].data; - } else { - throw new Error(`The result of this StaticQuery could not be fetched.\n\n` + `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` + `please open an issue in https://github.com/gatsbyjs/gatsby/issues`); - } -}; - -exports.useStaticQuery = useStaticQuery; -StaticQuery.propTypes = { - data: _propTypes.default.object, - query: _propTypes.default.string.isRequired, - render: _propTypes.default.func, - children: _propTypes.default.func -}; - -function graphql() { - throw new Error(`It appears like Gatsby is misconfigured. Gatsby related \`graphql\` calls ` + `are supposed to only be evaluated at compile time, and then compiled away. ` + `Unfortunately, something went wrong and the query was left in the compiled code.\n\n` + `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`); -} \ No newline at end of file diff --git a/.cache/commonjs/json-store.js b/.cache/commonjs/json-store.js deleted file mode 100644 index 734df1c76f..0000000000 --- a/.cache/commonjs/json-store.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); - -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); - -var _react = _interopRequireDefault(require("react")); - -var _pageRenderer = _interopRequireDefault(require("./page-renderer")); - -var _normalizePagePath = _interopRequireDefault(require("./normalize-page-path")); - -var _gatsby = require("gatsby"); - -var _socketIo = require("./socketIo"); - -if (process.env.NODE_ENV === `production`) { - throw new Error(`It appears like Gatsby is misconfigured. JSONStore is Gatsby internal ` + `development-only component and should never be used in production.\n\n` + `Unless your site has a complex or custom webpack/Gatsby ` + `configuration this is likely a bug in Gatsby. ` + `Please report this at https://github.com/gatsbyjs/gatsby/issues ` + `with steps to reproduce this error.`); -} - -const getPathFromProps = props => props.pageResources && props.pageResources.page ? (0, _normalizePagePath.default)(props.pageResources.page.path) : undefined; - -class JSONStore extends _react.default.Component { - constructor(props) { - super(props); - (0, _defineProperty2.default)(this, "handleMittEvent", (type, event) => { - this.setState({ - staticQueryData: (0, _socketIo.getStaticQueryData)(), - pageQueryData: (0, _socketIo.getPageQueryData)() - }); - }); - this.state = { - staticQueryData: (0, _socketIo.getStaticQueryData)(), - pageQueryData: (0, _socketIo.getPageQueryData)(), - path: null - }; - } - - componentDidMount() { - (0, _socketIo.registerPath)(getPathFromProps(this.props)); - - ___emitter.on(`*`, this.handleMittEvent); - } - - componentWillUnmount() { - (0, _socketIo.unregisterPath)(this.state.path); - - ___emitter.off(`*`, this.handleMittEvent); - } - - static getDerivedStateFromProps(props, state) { - const newPath = getPathFromProps(props); - - if (newPath !== state.path) { - (0, _socketIo.unregisterPath)(state.path); - (0, _socketIo.registerPath)(newPath); - return { - path: newPath - }; - } - - return null; - } - - shouldComponentUpdate(nextProps, nextState) { - // We want to update this component when: - // - location changed - // - page data for path changed - // - static query results changed - return this.props.location !== nextProps.location || this.state.path !== nextState.path || this.state.pageQueryData[(0, _normalizePagePath.default)(nextState.path)] !== nextState.pageQueryData[(0, _normalizePagePath.default)(nextState.path)] || this.state.staticQueryData !== nextState.staticQueryData; - } - - render() { - const data = this.state.pageQueryData[getPathFromProps(this.props)]; // eslint-disable-next-line - - if (!data) { - return _react.default.createElement("div", null); - } - - return _react.default.createElement(_gatsby.StaticQueryContext.Provider, { - value: this.state.staticQueryData - }, _react.default.createElement(_pageRenderer.default, (0, _extends2.default)({}, this.props, data))); - } - -} - -var _default = JSONStore; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/loader.js b/.cache/commonjs/loader.js deleted file mode 100644 index d5150faa0b..0000000000 --- a/.cache/commonjs/loader.js +++ /dev/null @@ -1,434 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = exports.publicLoader = exports.setLoader = exports.ProdLoader = exports.BaseLoader = void 0; - -var _prefetch = _interopRequireDefault(require("./prefetch")); - -var _emitter = _interopRequireDefault(require("./emitter")); - -var _findPath = require("./find-path"); - -const preferDefault = m => m && m.default || m; - -const stripSurroundingSlashes = s => { - s = s[0] === `/` ? s.slice(1) : s; - s = s.endsWith(`/`) ? s.slice(0, -1) : s; - return s; -}; - -const createPageDataUrl = path => { - const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path); - return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`; -}; - -const doFetch = (url, method = `GET`) => new Promise((resolve, reject) => { - const req = new XMLHttpRequest(); - req.open(method, url, true); - - req.onreadystatechange = () => { - if (req.readyState == 4) { - resolve(req); - } - }; - - req.send(null); -}); - -const loadPageDataJson = loadObj => { - const { - pagePath, - retries = 0 - } = loadObj; - const url = createPageDataUrl(pagePath); - return doFetch(url).then(req => { - const { - status, - responseText - } = req; // Handle 200 - - if (status === 200) { - try { - const jsonPayload = JSON.parse(responseText); - - if (jsonPayload.path === undefined) { - throw new Error(`not a valid pageData response`); - } - - return Object.assign(loadObj, { - status: `success`, - payload: jsonPayload - }); - } catch (err) {// continue regardless of error - } - } // Handle 404 - - - if (status === 404 || status === 200) { - // If the request was for a 404 page and it doesn't exist, we're done - if (pagePath === `/404.html`) { - return Object.assign(loadObj, { - status: `failure` - }); - } // Need some code here to cache the 404 request. In case - // multiple loadPageDataJsons result in 404s - - - return loadPageDataJson(Object.assign(loadObj, { - pagePath: `/404.html`, - notFound: true - })); - } // handle 500 response (Unrecoverable) - - - if (status === 500) { - return Object.assign(loadObj, { - status: `error` - }); - } // Handle everything else, including status === 0, and 503s. Should retry - - - if (retries < 3) { - return loadPageDataJson(Object.assign(loadObj, { - retries: retries + 1 - })); - } // Retried 3 times already, result is a failure. - - - return Object.assign(loadObj, { - status: `error` - }); - }); -}; - -const doesConnectionSupportPrefetch = () => { - if (`connection` in navigator && typeof navigator.connection !== `undefined`) { - if ((navigator.connection.effectiveType || ``).includes(`2g`)) { - return false; - } - - if (navigator.connection.saveData) { - return false; - } - } - - return true; -}; - -const toPageResources = (pageData, component = null) => { - const page = { - componentChunkName: pageData.componentChunkName, - path: pageData.path, - webpackCompilationHash: pageData.webpackCompilationHash, - matchPath: pageData.matchPath - }; - return { - component, - json: pageData.result, - page - }; -}; - -class BaseLoader { - constructor(loadComponent, matchPaths) { - // Map of pagePath -> Page. Where Page is an object with: { - // status: `success` || `error`, - // payload: PageResources, // undefined if `error` - // } - // PageResources is { - // component, - // json: pageData.result, - // page: { - // componentChunkName, - // path, - // webpackCompilationHash, - // } - // } - this.pageDb = new Map(); - this.inFlightDb = new Map(); - this.pageDataDb = new Map(); - this.prefetchTriggered = new Set(); - this.prefetchCompleted = new Set(); - this.loadComponent = loadComponent; - (0, _findPath.setMatchPaths)(matchPaths); - } - - setApiRunner(apiRunner) { - this.apiRunner = apiRunner; - this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a); - } - - loadPageDataJson(rawPath) { - const pagePath = (0, _findPath.findPath)(rawPath); - - if (this.pageDataDb.has(pagePath)) { - return Promise.resolve(this.pageDataDb.get(pagePath)); - } - - return loadPageDataJson({ - pagePath - }).then(pageData => { - this.pageDataDb.set(pagePath, pageData); - return pageData; - }); - } - - findMatchPath(rawPath) { - return (0, _findPath.findMatchPath)(rawPath); - } // TODO check all uses of this and whether they use undefined for page resources not exist - - - loadPage(rawPath) { - const pagePath = (0, _findPath.findPath)(rawPath); - - if (this.pageDb.has(pagePath)) { - const page = this.pageDb.get(pagePath); - return Promise.resolve(page.payload); - } - - if (this.inFlightDb.has(pagePath)) { - return this.inFlightDb.get(pagePath); - } - - const inFlight = Promise.all([this.loadAppData(), this.loadPageDataJson(pagePath)]).then(allData => { - const result = allData[1]; - - if (result.status === `error`) { - return { - status: `error` - }; - } - - if (result.status === `failure`) { - // throw an error so error trackers can pick this up - throw new Error(`404 page could not be found. Checkout https://www.gatsbyjs.org/docs/add-404-page/`); - } - - let pageData = result.payload; - const { - componentChunkName - } = pageData; - return this.loadComponent(componentChunkName).then(component => { - const finalResult = { - createdAt: new Date() - }; - let pageResources; - - if (!component) { - finalResult.status = `error`; - } else { - finalResult.status = `success`; - - if (result.notFound === true) { - finalResult.notFound = true; - } - - pageData = Object.assign(pageData, { - webpackCompilationHash: allData[0] ? allData[0].webpackCompilationHash : `` - }); - pageResources = toPageResources(pageData, component); - finalResult.payload = pageResources; - - _emitter.default.emit(`onPostLoadPageResources`, { - page: pageResources, - pageResources - }); - } - - this.pageDb.set(pagePath, finalResult); // undefined if final result is an error - - return pageResources; - }); - }) // prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox - .then(response => { - this.inFlightDb.delete(pagePath); - return response; - }).catch(err => { - this.inFlightDb.delete(pagePath); - throw err; - }); - this.inFlightDb.set(pagePath, inFlight); - return inFlight; - } // returns undefined if loading page ran into errors - - - loadPageSync(rawPath) { - const pagePath = (0, _findPath.findPath)(rawPath); - - if (this.pageDb.has(pagePath)) { - return this.pageDb.get(pagePath).payload; - } - - return undefined; - } - - shouldPrefetch(pagePath) { - // Skip prefetching if we know user is on slow or constrained connection - if (!doesConnectionSupportPrefetch()) { - return false; - } // Check if the page exists. - - - if (this.pageDb.has(pagePath)) { - return false; - } - - return true; - } - - prefetch(pagePath) { - if (!this.shouldPrefetch(pagePath)) { - return false; - } // Tell plugins with custom prefetching logic that they should start - // prefetching this path. - - - if (!this.prefetchTriggered.has(pagePath)) { - this.apiRunner(`onPrefetchPathname`, { - pathname: pagePath - }); - this.prefetchTriggered.add(pagePath); - } // If a plugin has disabled core prefetching, stop now. - - - if (this.prefetchDisabled) { - return false; - } - - const realPath = (0, _findPath.findPath)(pagePath); // Todo make doPrefetch logic cacheable - // eslint-disable-next-line consistent-return - - this.doPrefetch(realPath).then(() => { - if (!this.prefetchCompleted.has(pagePath)) { - this.apiRunner(`onPostPrefetchPathname`, { - pathname: pagePath - }); - this.prefetchCompleted.add(pagePath); - } - }); - return true; - } - - doPrefetch(pagePath) { - throw new Error(`doPrefetch not implemented`); - } - - hovering(rawPath) { - this.loadPage(rawPath); - } - - getResourceURLsForPathname(rawPath) { - const pagePath = (0, _findPath.findPath)(rawPath); - const page = this.pageDataDb.get(pagePath); - - if (page) { - const pageResources = toPageResources(page.payload); - return [...createComponentUrls(pageResources.page.componentChunkName), createPageDataUrl(pagePath)]; - } else { - return null; - } - } - - isPageNotFound(rawPath) { - const pagePath = (0, _findPath.findPath)(rawPath); - const page = this.pageDb.get(pagePath); - return page && page.notFound === true; - } - - loadAppData(retries = 0) { - return doFetch(`${__PATH_PREFIX__}/page-data/app-data.json`).then(req => { - const { - status, - responseText - } = req; - let appData; - - if (status !== 200 && retries < 3) { - // Retry 3 times incase of failures - return this.loadAppData(retries + 1); - } // Handle 200 - - - if (status === 200) { - try { - const jsonPayload = JSON.parse(responseText); - - if (jsonPayload.webpackCompilationHash === undefined) { - throw new Error(`not a valid app-data response`); - } - - appData = jsonPayload; - } catch (err) {// continue regardless of error - } - } - - return appData; - }); - } - -} - -exports.BaseLoader = BaseLoader; - -const createComponentUrls = componentChunkName => window.___chunkMapping[componentChunkName].map(chunk => __PATH_PREFIX__ + chunk); - -class ProdLoader extends BaseLoader { - constructor(asyncRequires, matchPaths) { - const loadComponent = chunkName => asyncRequires.components[chunkName]().then(preferDefault); - - super(loadComponent, matchPaths); - } - - doPrefetch(pagePath) { - const pageDataUrl = createPageDataUrl(pagePath); - return (0, _prefetch.default)(pageDataUrl).then(() => // This was just prefetched, so will return a response from - // the cache instead of making another request to the server - this.loadPageDataJson(pagePath)).then(result => { - if (result.status !== `success`) { - return Promise.resolve(); - } - - const pageData = result.payload; - const chunkName = pageData.componentChunkName; - const componentUrls = createComponentUrls(chunkName); - return Promise.all(componentUrls.map(_prefetch.default)).then(() => pageData); - }); - } - -} - -exports.ProdLoader = ProdLoader; -let instance; - -const setLoader = _loader => { - instance = _loader; -}; - -exports.setLoader = setLoader; -const publicLoader = { - // Deprecated methods. As far as we're aware, these are only used by - // core gatsby and the offline plugin, however there's a very small - // chance they're called by others. - getResourcesForPathname: rawPath => { - console.warn(`Warning: getResourcesForPathname is deprecated. Use loadPage instead`); - return instance.i.loadPage(rawPath); - }, - getResourcesForPathnameSync: rawPath => { - console.warn(`Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`); - return instance.i.loadPageSync(rawPath); - }, - enqueue: rawPath => instance.prefetch(rawPath), - // Real methods - getResourceURLsForPathname: rawPath => instance.getResourceURLsForPathname(rawPath), - loadPage: rawPath => instance.loadPage(rawPath), - loadPageSync: rawPath => instance.loadPageSync(rawPath), - prefetch: rawPath => instance.prefetch(rawPath), - isPageNotFound: rawPath => instance.isPageNotFound(rawPath), - hovering: rawPath => instance.hovering(rawPath), - loadAppData: () => instance.loadAppData() -}; -exports.publicLoader = publicLoader; -var _default = publicLoader; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/navigation.js b/.cache/commonjs/navigation.js deleted file mode 100644 index b6157c0fd6..0000000000 --- a/.cache/commonjs/navigation.js +++ /dev/null @@ -1,233 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.init = init; -exports.shouldUpdateScroll = shouldUpdateScroll; -exports.RouteUpdates = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _propTypes = _interopRequireDefault(require("prop-types")); - -var _loader = _interopRequireDefault(require("./loader")); - -var _redirects = _interopRequireDefault(require("./redirects.json")); - -var _apiRunnerBrowser = require("./api-runner-browser"); - -var _emitter = _interopRequireDefault(require("./emitter")); - -var _router = require("@reach/router"); - -var _gatsbyLink = require("gatsby-link"); - -const redirectMap = _redirects.default.reduce((map, redirect) => { - map[redirect.fromPath] = redirect; - return map; -}, {}); - -function maybeRedirect(pathname) { - const redirect = redirectMap[pathname]; - - if (redirect != null) { - if (process.env.NODE_ENV !== `production`) { - const pageResources = _loader.default.loadPageSync(pathname); - - if (pageResources != null) { - console.error(`The route "${pathname}" matches both a page and a redirect; this is probably not intentional.`); - } - } - - window.___replace(redirect.toPath); - - return true; - } else { - return false; - } -} - -const onPreRouteUpdate = (location, prevLocation) => { - if (!maybeRedirect(location.pathname)) { - (0, _apiRunnerBrowser.apiRunner)(`onPreRouteUpdate`, { - location, - prevLocation - }); - } -}; - -const onRouteUpdate = (location, prevLocation) => { - if (!maybeRedirect(location.pathname)) { - (0, _apiRunnerBrowser.apiRunner)(`onRouteUpdate`, { - location, - prevLocation - }); // Temp hack while awaiting https://github.com/reach/router/issues/119 - - window.__navigatingToLink = false; - } -}; - -const navigate = (to, options = {}) => { - // Temp hack while awaiting https://github.com/reach/router/issues/119 - if (!options.replace) { - window.__navigatingToLink = true; - } - - let { - pathname - } = (0, _gatsbyLink.parsePath)(to); - const redirect = redirectMap[pathname]; // If we're redirecting, just replace the passed in pathname - // to the one we want to redirect to. - - if (redirect) { - to = redirect.toPath; - pathname = (0, _gatsbyLink.parsePath)(to).pathname; - } // If we had a service worker update, no matter the path, reload window and - // reset the pathname whitelist - - - if (window.___swUpdated) { - window.location = pathname; - return; - } // Start a timer to wait for a second before transitioning and showing a - // loader in case resources aren't around yet. - - - const timeoutId = setTimeout(() => { - _emitter.default.emit(`onDelayedLoadPageResources`, { - pathname - }); - - (0, _apiRunnerBrowser.apiRunner)(`onRouteUpdateDelayed`, { - location: window.location - }); - }, 1000); - - _loader.default.loadPage(pathname).then(pageResources => { - // If no page resources, then refresh the page - // Do this, rather than simply `window.location.reload()`, so that - // pressing the back/forward buttons work - otherwise when pressing - // back, the browser will just change the URL and expect JS to handle - // the change, which won't always work since it might not be a Gatsby - // page. - if (!pageResources || pageResources.status === `error`) { - window.history.replaceState({}, ``, location.href); - window.location = pathname; - } // If the loaded page has a different compilation hash to the - // window, then a rebuild has occurred on the server. Reload. - - - if (process.env.NODE_ENV === `production` && pageResources) { - if (pageResources.page.webpackCompilationHash !== window.___webpackCompilationHash) { - // Purge plugin-offline cache - if (`serviceWorker` in navigator && navigator.serviceWorker.controller !== null && navigator.serviceWorker.controller.state === `activated`) { - navigator.serviceWorker.controller.postMessage({ - gatsbyApi: `clearPathResources` - }); - } - - console.log(`Site has changed on server. Reloading browser`); - window.location = pathname; - } - } - - (0, _router.navigate)(to, options); - clearTimeout(timeoutId); - }); -}; - -function shouldUpdateScroll(prevRouterProps, { - location -}) { - const { - pathname, - hash - } = location; - const results = (0, _apiRunnerBrowser.apiRunner)(`shouldUpdateScroll`, { - prevRouterProps, - // `pathname` for backwards compatibility - pathname, - routerProps: { - location - }, - getSavedScrollPosition: args => this._stateStorage.read(args) - }); - - if (results.length > 0) { - // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration - // @see https://github.com/gatsbyjs/gatsby/issues/12038 - return results[results.length - 1]; - } - - if (prevRouterProps) { - const { - location: { - pathname: oldPathname - } - } = prevRouterProps; - - if (oldPathname === pathname) { - // Scroll to element if it exists, if it doesn't, or no hash is provided, - // scroll to top. - return hash ? hash.slice(1) : [0, 0]; - } - } - - return true; -} - -function init() { - // Temp hack while awaiting https://github.com/reach/router/issues/119 - window.__navigatingToLink = false; - - window.___push = to => navigate(to, { - replace: false - }); - - window.___replace = to => navigate(to, { - replace: true - }); - - window.___navigate = (to, options) => navigate(to, options); // Check for initial page-load redirect - - - maybeRedirect(window.location.pathname); -} // Fire on(Pre)RouteUpdate APIs - - -class RouteUpdates extends _react.default.Component { - constructor(props) { - super(props); - onPreRouteUpdate(props.location, null); - } - - componentDidMount() { - onRouteUpdate(this.props.location, null); - } - - componentDidUpdate(prevProps, prevState, shouldFireRouteUpdate) { - if (shouldFireRouteUpdate) { - onRouteUpdate(this.props.location, prevProps.location); - } - } - - getSnapshotBeforeUpdate(prevProps) { - if (this.props.location.pathname !== prevProps.location.pathname) { - onPreRouteUpdate(this.props.location, prevProps.location); - return true; - } - - return false; - } - - render() { - return this.props.children; - } - -} - -exports.RouteUpdates = RouteUpdates; -RouteUpdates.propTypes = { - location: _propTypes.default.object.isRequired -}; \ No newline at end of file diff --git a/.cache/commonjs/normalize-page-path.js b/.cache/commonjs/normalize-page-path.js deleted file mode 100644 index 1311e3902c..0000000000 --- a/.cache/commonjs/normalize-page-path.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = void 0; - -var _default = path => { - if (path === undefined) { - return path; - } - - if (path === `/`) { - return `/`; - } - - if (path.charAt(path.length - 1) === `/`) { - return path.slice(0, -1); - } - - return path; -}; - -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/page-renderer.js b/.cache/commonjs/page-renderer.js deleted file mode 100644 index fe83e7cc64..0000000000 --- a/.cache/commonjs/page-renderer.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); - -exports.__esModule = true; -exports.default = void 0; - -var _react = _interopRequireWildcard(require("react")); - -var _propTypes = _interopRequireDefault(require("prop-types")); - -var _loader = require("./loader"); - -var _apiRunnerBrowser = require("./api-runner-browser"); - -class PageRenderer extends _react.default.Component { - render() { - const props = Object.assign({}, this.props, { - pathContext: this.props.pageContext - }); - const [replacementElement] = (0, _apiRunnerBrowser.apiRunner)(`replaceComponentRenderer`, { - props: this.props, - loader: _loader.publicLoader - }); - const pageElement = replacementElement || (0, _react.createElement)(this.props.pageResources.component, Object.assign({}, props, { - key: this.props.path || this.props.pageResources.page.path - })); - const wrappedPage = (0, _apiRunnerBrowser.apiRunner)(`wrapPageElement`, { - element: pageElement, - props - }, pageElement, ({ - result - }) => { - return { - element: result, - props - }; - }).pop(); - return wrappedPage; - } - -} - -PageRenderer.propTypes = { - location: _propTypes.default.object.isRequired, - pageResources: _propTypes.default.object.isRequired, - data: _propTypes.default.object, - pageContext: _propTypes.default.object.isRequired -}; -var _default = PageRenderer; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/prefetch.js b/.cache/commonjs/prefetch.js deleted file mode 100644 index a71ac166f5..0000000000 --- a/.cache/commonjs/prefetch.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = void 0; - -const support = function (feature) { - if (typeof document === `undefined`) { - return false; - } - - const fakeLink = document.createElement(`link`); - - try { - if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) { - return fakeLink.relList.supports(feature); - } - } catch (err) { - return false; - } - - return false; -}; - -const linkPrefetchStrategy = function (url) { - return new Promise((resolve, reject) => { - if (typeof document === `undefined`) { - reject(); - return; - } - - const link = document.createElement(`link`); - link.setAttribute(`rel`, `prefetch`); - link.setAttribute(`href`, url); - link.onload = resolve; - link.onerror = reject; - const parentElement = document.getElementsByTagName(`head`)[0] || document.getElementsByName(`script`)[0].parentNode; - parentElement.appendChild(link); - }); -}; - -const xhrPrefetchStrategy = function (url) { - return new Promise((resolve, reject) => { - const req = new XMLHttpRequest(); - req.open(`GET`, url, true); - - req.onload = () => { - if (req.status === 200) { - resolve(); - } else { - reject(); - } - }; - - req.send(null); - }); -}; - -const supportedPrefetchStrategy = support(`prefetch`) ? linkPrefetchStrategy : xhrPrefetchStrategy; -const preFetched = {}; - -const prefetch = function (url) { - return new Promise(resolve => { - if (preFetched[url]) { - resolve(); - return; - } - - supportedPrefetchStrategy(url).then(() => { - resolve(); - preFetched[url] = true; - }).catch(() => {}); // 404s are logged to the console anyway - }); -}; - -var _default = prefetch; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/production-app.js b/.cache/commonjs/production-app.js deleted file mode 100644 index cf37e826cd..0000000000 --- a/.cache/commonjs/production-app.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); - -var _apiRunnerBrowser = require("./api-runner-browser"); - -var _react = _interopRequireDefault(require("react")); - -var _reactDom = _interopRequireDefault(require("react-dom")); - -var _router = require("@reach/router"); - -var _gatsbyReactRouterScroll = require("gatsby-react-router-scroll"); - -var _domready = _interopRequireDefault(require("@mikaelkristiansson/domready")); - -var _navigation = require("./navigation"); - -var _emitter = _interopRequireDefault(require("./emitter")); - -var _pageRenderer = _interopRequireDefault(require("./page-renderer")); - -var _asyncRequires = _interopRequireDefault(require("./async-requires")); - -var _loader = require("./loader"); - -var _ensureResources = _interopRequireDefault(require("./ensure-resources")); - -var _stripPrefix = _interopRequireDefault(require("./strip-prefix")); - -var _matchPaths = _interopRequireDefault(require("./match-paths.json")); - -// Generated during bootstrap -const loader = new _loader.ProdLoader(_asyncRequires.default, _matchPaths.default); -(0, _loader.setLoader)(loader); -loader.setApiRunner(_apiRunnerBrowser.apiRunner); -window.asyncRequires = _asyncRequires.default; -window.___emitter = _emitter.default; -window.___loader = _loader.publicLoader; -(0, _navigation.init)(); -(0, _apiRunnerBrowser.apiRunnerAsync)(`onClientEntry`).then(() => { - // Let plugins register a service worker. The plugin just needs - // to return true. - if ((0, _apiRunnerBrowser.apiRunner)(`registerServiceWorker`).length > 0) { - require(`./register-service-worker`); - } // In gatsby v2 if Router is used in page using matchPaths - // paths need to contain full path. - // For example: - // - page have `/app/*` matchPath - // - inside template user needs to use `/app/xyz` as path - // Resetting `basepath`/`baseuri` keeps current behaviour - // to not introduce breaking change. - // Remove this in v3 - - - const RouteHandler = props => _react.default.createElement(_router.BaseContext.Provider, { - value: { - baseuri: `/`, - basepath: `/` - } - }, _react.default.createElement(_pageRenderer.default, props)); - - class LocationHandler extends _react.default.Component { - render() { - const { - location - } = this.props; - return _react.default.createElement(_ensureResources.default, { - location: location - }, ({ - pageResources, - location - }) => _react.default.createElement(_navigation.RouteUpdates, { - location: location - }, _react.default.createElement(_gatsbyReactRouterScroll.ScrollContext, { - location: location, - shouldUpdateScroll: _navigation.shouldUpdateScroll - }, _react.default.createElement(_router.Router, { - basepath: __BASE_PATH__, - location: location, - id: "gatsby-focus-wrapper" - }, _react.default.createElement(RouteHandler, (0, _extends2.default)({ - path: encodeURI(pageResources.page.path === `/404.html` ? (0, _stripPrefix.default)(location.pathname, __BASE_PATH__) : pageResources.page.matchPath || pageResources.page.path) - }, this.props, { - location: location, - pageResources: pageResources - }, pageResources.json)))))); - } - - } - - const { - pagePath, - location: browserLoc - } = window; // Explicitly call navigate if the canonical path (window.pagePath) - // is different to the browser path (window.location.pathname). But - // only if NONE of the following conditions hold: - // - // - The url matches a client side route (page.matchPath) - // - it's a 404 page - // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/) - - if (pagePath && __BASE_PATH__ + pagePath !== browserLoc.pathname && !(loader.findMatchPath((0, _stripPrefix.default)(browserLoc.pathname, __BASE_PATH__)) || pagePath === `/404.html` || pagePath.match(/^\/404\/?$/) || pagePath.match(/^\/offline-plugin-app-shell-fallback\/?$/))) { - (0, _router.navigate)(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, { - replace: true - }); - } - - _loader.publicLoader.loadPage(browserLoc.pathname).then(page => { - if (!page || page.status === `error`) { - throw new Error(`page resources for ${browserLoc.pathname} not found. Not rendering React`); - } - - window.___webpackCompilationHash = page.page.webpackCompilationHash; - - const Root = () => _react.default.createElement(_router.Location, null, locationContext => _react.default.createElement(LocationHandler, locationContext)); - - const WrappedRoot = (0, _apiRunnerBrowser.apiRunner)(`wrapRootElement`, { - element: _react.default.createElement(Root, null) - }, _react.default.createElement(Root, null), ({ - result - }) => { - return { - element: result - }; - }).pop(); - - let NewRoot = () => WrappedRoot; - - const renderer = (0, _apiRunnerBrowser.apiRunner)(`replaceHydrateFunction`, undefined, _reactDom.default.hydrate)[0]; - (0, _domready.default)(() => { - renderer(_react.default.createElement(NewRoot, null), typeof window !== `undefined` ? document.getElementById(`___gatsby`) : void 0, () => { - (0, _apiRunnerBrowser.apiRunner)(`onInitialClientRender`); - }); - }); - }); -}); \ No newline at end of file diff --git a/.cache/commonjs/public-page-renderer-dev.js b/.cache/commonjs/public-page-renderer-dev.js deleted file mode 100644 index 1f2ad92aca..0000000000 --- a/.cache/commonjs/public-page-renderer-dev.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _propTypes = _interopRequireDefault(require("prop-types")); - -var _loader = _interopRequireDefault(require("./loader")); - -var _jsonStore = _interopRequireDefault(require("./json-store")); - -const DevPageRenderer = ({ - location -}) => { - const pageResources = _loader.default.loadPageSync(location.pathname); - - return _react.default.createElement(_jsonStore.default, { - location, - pageResources - }); -}; - -DevPageRenderer.propTypes = { - location: _propTypes.default.shape({ - pathname: _propTypes.default.string.isRequired - }).isRequired -}; -var _default = DevPageRenderer; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/public-page-renderer-prod.js b/.cache/commonjs/public-page-renderer-prod.js deleted file mode 100644 index b0da15eab0..0000000000 --- a/.cache/commonjs/public-page-renderer-prod.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _react = _interopRequireDefault(require("react")); - -var _propTypes = _interopRequireDefault(require("prop-types")); - -var _pageRenderer = _interopRequireDefault(require("./page-renderer")); - -const ProdPageRenderer = ({ - location, - pageResources -}) => { - if (!pageResources) { - return null; - } - - return _react.default.createElement(_pageRenderer.default, Object.assign({ - location, - pageResources - }, pageResources.json)); -}; - -ProdPageRenderer.propTypes = { - location: _propTypes.default.shape({ - pathname: _propTypes.default.string.isRequired - }).isRequired -}; -var _default = ProdPageRenderer; -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/public-page-renderer.js b/.cache/commonjs/public-page-renderer.js deleted file mode 100644 index 589fe20c2a..0000000000 --- a/.cache/commonjs/public-page-renderer.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -const preferDefault = m => m && m.default || m; - -if (process.env.BUILD_STAGE === `develop`) { - module.exports = preferDefault(require(`./public-page-renderer-dev`)); -} else if (process.env.BUILD_STAGE === `build-javascript`) { - module.exports = preferDefault(require(`./public-page-renderer-prod`)); -} else { - module.exports = () => null; -} \ No newline at end of file diff --git a/.cache/commonjs/react-lifecycles-compat.js b/.cache/commonjs/react-lifecycles-compat.js deleted file mode 100644 index ebf5374734..0000000000 --- a/.cache/commonjs/react-lifecycles-compat.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -exports.polyfill = Component => Component; \ No newline at end of file diff --git a/.cache/commonjs/register-service-worker.js b/.cache/commonjs/register-service-worker.js deleted file mode 100644 index 9551aadefc..0000000000 --- a/.cache/commonjs/register-service-worker.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -var _apiRunnerBrowser = require("./api-runner-browser"); - -if (window.location.protocol !== `https:` && window.location.hostname !== `localhost`) { - console.error(`Service workers can only be used over HTTPS, or on localhost for development`); -} else if (`serviceWorker` in navigator) { - navigator.serviceWorker.register(`${__BASE_PATH__}/sw.js`).then(function (reg) { - reg.addEventListener(`updatefound`, () => { - (0, _apiRunnerBrowser.apiRunner)(`onServiceWorkerUpdateFound`, { - serviceWorker: reg - }); // The updatefound event implies that reg.installing is set; see - // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event - - const installingWorker = reg.installing; - console.log(`installingWorker`, installingWorker); - installingWorker.addEventListener(`statechange`, () => { - switch (installingWorker.state) { - case `installed`: - if (navigator.serviceWorker.controller) { - // At this point, the old content will have been purged and the fresh content will - // have been added to the cache. - // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt - window.___swUpdated = true; // We call the onServiceWorkerUpdateReady API so users can show update prompts. - - (0, _apiRunnerBrowser.apiRunner)(`onServiceWorkerUpdateReady`, { - serviceWorker: reg - }); // If resources failed for the current page, reload. - - if (window.___failedResources) { - console.log(`resources failed, SW updated - reloading`); - window.location.reload(); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a "Content is cached for offline use." message. - console.log(`Content is now available offline!`); // Post to service worker that install is complete. - // Delay to allow time for the event listener to be added -- - // otherwise fetch is called too soon and resources aren't cached. - - (0, _apiRunnerBrowser.apiRunner)(`onServiceWorkerInstalled`, { - serviceWorker: reg - }); - } - - break; - - case `redundant`: - console.error(`The installing service worker became redundant.`); - (0, _apiRunnerBrowser.apiRunner)(`onServiceWorkerRedundant`, { - serviceWorker: reg - }); - break; - - case `activated`: - (0, _apiRunnerBrowser.apiRunner)(`onServiceWorkerActive`, { - serviceWorker: reg - }); - break; - } - }); - }); - }).catch(function (e) { - console.error(`Error during service worker registration:`, e); - }); -} \ No newline at end of file diff --git a/.cache/commonjs/root.js b/.cache/commonjs/root.js deleted file mode 100644 index a7ff0da14b..0000000000 --- a/.cache/commonjs/root.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = void 0; - -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); - -var _react = _interopRequireDefault(require("react")); - -var _router = require("@reach/router"); - -var _gatsbyReactRouterScroll = require("gatsby-react-router-scroll"); - -var _navigation = require("./navigation"); - -var _apiRunnerBrowser = require("./api-runner-browser"); - -var _loader = _interopRequireDefault(require("./loader")); - -var _jsonStore = _interopRequireDefault(require("./json-store")); - -var _ensureResources = _interopRequireDefault(require("./ensure-resources")); - -var _errorOverlayHandler = require("./error-overlay-handler"); - -if (window.__webpack_hot_middleware_reporter__ !== undefined) { - const overlayErrorID = `webpack`; // Report build errors - - window.__webpack_hot_middleware_reporter__.useCustomOverlay({ - showProblems(type, obj) { - if (type !== `errors`) { - (0, _errorOverlayHandler.clearError)(overlayErrorID); - return; - } - - (0, _errorOverlayHandler.reportError)(overlayErrorID, obj[0]); - }, - - clear() { - (0, _errorOverlayHandler.clearError)(overlayErrorID); - } - - }); -} - -(0, _navigation.init)(); // In gatsby v2 if Router is used in page using matchPaths -// paths need to contain full path. -// For example: -// - page have `/app/*` matchPath -// - inside template user needs to use `/app/xyz` as path -// Resetting `basepath`/`baseuri` keeps current behaviour -// to not introduce breaking change. -// Remove this in v3 - -const RouteHandler = props => _react.default.createElement(_router.BaseContext.Provider, { - value: { - baseuri: `/`, - basepath: `/` - } -}, _react.default.createElement(_jsonStore.default, props)); - -class LocationHandler extends _react.default.Component { - render() { - let { - location - } = this.props; - - if (!_loader.default.isPageNotFound(location.pathname)) { - return _react.default.createElement(_ensureResources.default, { - location: location - }, locationAndPageResources => _react.default.createElement(_navigation.RouteUpdates, { - location: location - }, _react.default.createElement(_gatsbyReactRouterScroll.ScrollContext, { - location: location, - shouldUpdateScroll: _navigation.shouldUpdateScroll - }, _react.default.createElement(_router.Router, { - basepath: __BASE_PATH__, - location: location, - id: "gatsby-focus-wrapper" - }, _react.default.createElement(RouteHandler, (0, _extends2.default)({ - path: encodeURI(locationAndPageResources.pageResources.page.matchPath || locationAndPageResources.pageResources.page.path) - }, this.props, locationAndPageResources)))))); - } - - const dev404PageResources = _loader.default.loadPageSync(`/dev-404-page`); - - const real404PageResources = _loader.default.loadPageSync(`/404.html`); - - let custom404; - - if (real404PageResources) { - custom404 = _react.default.createElement(_jsonStore.default, (0, _extends2.default)({}, this.props, { - pageResources: real404PageResources - })); - } - - return _react.default.createElement(_navigation.RouteUpdates, { - location: location - }, _react.default.createElement(_router.Router, { - basepath: __BASE_PATH__, - location: location, - id: "gatsby-focus-wrapper" - }, _react.default.createElement(RouteHandler, { - path: location.pathname, - location: location, - pageResources: dev404PageResources, - custom404: custom404 - }))); - } - -} - -const Root = () => _react.default.createElement(_router.Location, null, locationContext => _react.default.createElement(LocationHandler, locationContext)); // Let site, plugins wrap the site e.g. for Redux. - - -const WrappedRoot = (0, _apiRunnerBrowser.apiRunner)(`wrapRootElement`, { - element: _react.default.createElement(Root, null) -}, _react.default.createElement(Root, null), ({ - result, - plugin -}) => { - return { - element: result - }; -}).pop(); - -var _default = () => WrappedRoot; - -exports.default = _default; \ No newline at end of file diff --git a/.cache/commonjs/socketIo.js b/.cache/commonjs/socketIo.js deleted file mode 100644 index fb18ce9ba6..0000000000 --- a/.cache/commonjs/socketIo.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = socketIo; -exports.getPageData = getPageData; -exports.registerPath = registerPath; -exports.unregisterPath = unregisterPath; -exports.getIsInitialized = exports.getPageQueryData = exports.getStaticQueryData = void 0; - -var _errorOverlayHandler = require("./error-overlay-handler"); - -var _normalizePagePath = _interopRequireDefault(require("./normalize-page-path")); - -let socket = null; -let staticQueryData = {}; -let pageQueryData = {}; -let isInitialized = false; - -const getStaticQueryData = () => staticQueryData; - -exports.getStaticQueryData = getStaticQueryData; - -const getPageQueryData = () => pageQueryData; - -exports.getPageQueryData = getPageQueryData; - -const getIsInitialized = () => isInitialized; - -exports.getIsInitialized = getIsInitialized; - -function socketIo() { - if (process.env.NODE_ENV !== `production`) { - if (!socket) { - // Try to initialize web socket if we didn't do it already - try { - // eslint-disable-next-line no-undef - socket = io(); - - const didDataChange = (msg, queryData) => { - const id = msg.type === `staticQueryResult` ? msg.payload.id : (0, _normalizePagePath.default)(msg.payload.id); - return !(id in queryData) || JSON.stringify(msg.payload.result) !== JSON.stringify(queryData[id]); - }; - - socket.on(`message`, msg => { - if (msg.type === `staticQueryResult`) { - if (didDataChange(msg, staticQueryData)) { - staticQueryData = Object.assign({}, staticQueryData, { - [msg.payload.id]: msg.payload.result - }); - } - } else if (msg.type === `pageQueryResult`) { - if (didDataChange(msg, pageQueryData)) { - pageQueryData = Object.assign({}, pageQueryData, { - [(0, _normalizePagePath.default)(msg.payload.id)]: msg.payload.result - }); - } - } else if (msg.type === `overlayError`) { - if (msg.payload.message) { - (0, _errorOverlayHandler.reportError)(msg.payload.id, msg.payload.message); - } else { - (0, _errorOverlayHandler.clearError)(msg.payload.id); - } - } - - if (msg.type && msg.payload) { - ___emitter.emit(msg.type, msg.payload); - } - }); - } catch (err) { - console.error(`Could not connect to socket.io on dev server.`); - } - } - - return socket; - } else { - return null; - } -} - -const inFlightGetPageDataPromiseCache = {}; - -function getPageData(pathname) { - pathname = (0, _normalizePagePath.default)(pathname); - - if (inFlightGetPageDataPromiseCache[pathname]) { - return inFlightGetPageDataPromiseCache[pathname]; - } else { - inFlightGetPageDataPromiseCache[pathname] = new Promise(resolve => { - if (pageQueryData[pathname]) { - delete inFlightGetPageDataPromiseCache[pathname]; - resolve(pageQueryData[pathname]); - } else { - const onPageDataCallback = msg => { - if (msg.type === `pageQueryResult` && (0, _normalizePagePath.default)(msg.payload.id) === pathname) { - socket.off(`message`, onPageDataCallback); - delete inFlightGetPageDataPromiseCache[pathname]; - resolve(pageQueryData[pathname]); - } - }; - - socket.on(`message`, onPageDataCallback); - socket.emit(`getDataForPath`, pathname); - } - }); - } - - return inFlightGetPageDataPromiseCache[pathname]; -} // Tell websocket-manager.js the new path we're on. -// This will help the backend prioritize queries for this -// path. - - -function registerPath(path) { - socket.emit(`registerPath`, path); -} // Unregister the former path - - -function unregisterPath(path) { - socket.emit(`unregisterPath`, path); -} \ No newline at end of file diff --git a/.cache/commonjs/static-entry.js b/.cache/commonjs/static-entry.js deleted file mode 100644 index f3cc396a25..0000000000 --- a/.cache/commonjs/static-entry.js +++ /dev/null @@ -1,406 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -exports.__esModule = true; -exports.default = exports.sanitizeComponents = void 0; - -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); - -const React = require(`react`); - -const fs = require(`fs`); - -const { - join -} = require(`path`); - -const { - renderToString, - renderToStaticMarkup -} = require(`react-dom/server`); - -const { - ServerLocation, - Router, - isRedirect -} = require(`@reach/router`); - -const { - get, - merge, - isObject, - flatten, - uniqBy, - flattenDeep, - replace -} = require(`lodash`); - -const apiRunner = require(`./api-runner-ssr`); - -const syncRequires = require(`./sync-requires`); - -const { - version: gatsbyVersion -} = require(`gatsby/package.json`); - -const stats = JSON.parse(fs.readFileSync(`${process.cwd()}/public/webpack.stats.json`, `utf-8`)); -const chunkMapping = JSON.parse(fs.readFileSync(`${process.cwd()}/public/chunk-map.json`, `utf-8`)); // const testRequireError = require("./test-require-error") -// For some extremely mysterious reason, webpack adds the above module *after* -// this module so that when this code runs, testRequireError is undefined. -// So in the meantime, we'll just inline it. - -const testRequireError = (moduleName, err) => { - const regex = new RegExp(`Error: Cannot find module\\s.${moduleName}`); - const firstLine = err.toString().split(`\n`)[0]; - return regex.test(firstLine); -}; - -let Html; - -try { - Html = require(`../src/html`); -} catch (err) { - if (testRequireError(`../src/html`, err)) { - Html = require(`./default-html`); - } else { - throw err; - } -} - -Html = Html && Html.__esModule ? Html.default : Html; - -const getPageDataPath = path => { - const fixedPagePath = path === `/` ? `index` : path; - return join(`page-data`, fixedPagePath, `page-data.json`); -}; - -const getPageDataUrl = pagePath => { - const pageDataPath = getPageDataPath(pagePath); - return `${__PATH_PREFIX__}/${pageDataPath}`; -}; - -const getPageDataFile = pagePath => { - const pageDataPath = getPageDataPath(pagePath); - return join(process.cwd(), `public`, pageDataPath); -}; - -const loadPageDataSync = pagePath => { - const pageDataPath = getPageDataPath(pagePath); - const pageDataFile = join(process.cwd(), `public`, pageDataPath); - - try { - const pageDataJson = fs.readFileSync(pageDataFile); - return JSON.parse(pageDataJson); - } catch (error) { - // not an error if file is not found. There's just no page data - return null; - } -}; - -const createElement = React.createElement; - -const sanitizeComponents = components => { - const componentsArray = ensureArray(components); - return componentsArray.map(component => { - // Ensure manifest is always loaded from content server - // And not asset server when an assetPrefix is used - if (__ASSET_PREFIX__ && component.props.rel === `manifest`) { - return React.cloneElement(component, { - href: replace(component.props.href, __ASSET_PREFIX__, ``) - }); - } - - return component; - }); -}; - -exports.sanitizeComponents = sanitizeComponents; - -const ensureArray = components => { - if (Array.isArray(components)) { - // remove falsy items and flatten - return flattenDeep(components.filter(val => Array.isArray(val) ? val.length > 0 : val)); - } else { - // we also accept single components, so we need to handle this case as well - return components ? [components] : []; - } -}; - -var _default = (pagePath, callback) => { - let bodyHtml = ``; - let headComponents = [React.createElement("meta", { - name: "generator", - content: `Gatsby ${gatsbyVersion}`, - key: `generator-${gatsbyVersion}` - })]; - let htmlAttributes = {}; - let bodyAttributes = {}; - let preBodyComponents = []; - let postBodyComponents = []; - let bodyProps = {}; - - const replaceBodyHTMLString = body => { - bodyHtml = body; - }; - - const setHeadComponents = components => { - headComponents = headComponents.concat(sanitizeComponents(components)); - }; - - const setHtmlAttributes = attributes => { - htmlAttributes = merge(htmlAttributes, attributes); - }; - - const setBodyAttributes = attributes => { - bodyAttributes = merge(bodyAttributes, attributes); - }; - - const setPreBodyComponents = components => { - preBodyComponents = preBodyComponents.concat(sanitizeComponents(components)); - }; - - const setPostBodyComponents = components => { - postBodyComponents = postBodyComponents.concat(sanitizeComponents(components)); - }; - - const setBodyProps = props => { - bodyProps = merge({}, bodyProps, props); - }; - - const getHeadComponents = () => headComponents; - - const replaceHeadComponents = components => { - headComponents = sanitizeComponents(components); - }; - - const getPreBodyComponents = () => preBodyComponents; - - const replacePreBodyComponents = components => { - preBodyComponents = sanitizeComponents(components); - }; - - const getPostBodyComponents = () => postBodyComponents; - - const replacePostBodyComponents = components => { - postBodyComponents = sanitizeComponents(components); - }; - - const pageDataRaw = fs.readFileSync(getPageDataFile(pagePath)); - const pageData = JSON.parse(pageDataRaw); - const pageDataUrl = getPageDataUrl(pagePath); - const { - componentChunkName - } = pageData; - - class RouteHandler extends React.Component { - render() { - const props = Object.assign({}, this.props, {}, pageData.result, { - // pathContext was deprecated in v2. Renamed to pageContext - pathContext: pageData.result ? pageData.result.pageContext : undefined - }); - const pageElement = createElement(syncRequires.components[componentChunkName], props); - const wrappedPage = apiRunner(`wrapPageElement`, { - element: pageElement, - props - }, pageElement, ({ - result - }) => { - return { - element: result, - props - }; - }).pop(); - return wrappedPage; - } - - } - - const routerElement = createElement(ServerLocation, { - url: `${__BASE_PATH__}${pagePath}` - }, createElement(Router, { - id: `gatsby-focus-wrapper`, - baseuri: `${__BASE_PATH__}` - }, createElement(RouteHandler, { - path: `/*` - }))); - const bodyComponent = apiRunner(`wrapRootElement`, { - element: routerElement, - pathname: pagePath - }, routerElement, ({ - result - }) => { - return { - element: result, - pathname: pagePath - }; - }).pop(); // Let the site or plugin render the page component. - - apiRunner(`replaceRenderer`, { - bodyComponent, - replaceBodyHTMLString, - setHeadComponents, - setHtmlAttributes, - setBodyAttributes, - setPreBodyComponents, - setPostBodyComponents, - setBodyProps, - pathname: pagePath, - pathPrefix: __PATH_PREFIX__ - }); // If no one stepped up, we'll handle it. - - if (!bodyHtml) { - try { - bodyHtml = renderToString(bodyComponent); - } catch (e) { - // ignore @reach/router redirect errors - if (!isRedirect(e)) throw e; - } - } // Create paths to scripts - - - let scriptsAndStyles = flatten([`app`, componentChunkName].map(s => { - const fetchKey = `assetsByChunkName[${s}]`; - let chunks = get(stats, fetchKey); - let namedChunkGroups = get(stats, `namedChunkGroups`); - - if (!chunks) { - return null; - } - - chunks = chunks.map(chunk => { - if (chunk === `/`) { - return null; - } - - return { - rel: `preload`, - name: chunk - }; - }); - namedChunkGroups[s].assets.forEach(asset => chunks.push({ - rel: `preload`, - name: asset - })); - const childAssets = namedChunkGroups[s].childAssets; - - for (const rel in childAssets) { - chunks = merge(chunks, childAssets[rel].map(chunk => { - return { - rel, - name: chunk - }; - })); - } - - return chunks; - })).filter(s => isObject(s)).sort((s1, s2) => s1.rel == `preload` ? -1 : 1); // given priority to preload - - scriptsAndStyles = uniqBy(scriptsAndStyles, item => item.name); - const scripts = scriptsAndStyles.filter(script => script.name && script.name.endsWith(`.js`)); - const styles = scriptsAndStyles.filter(style => style.name && style.name.endsWith(`.css`)); - apiRunner(`onRenderBody`, { - setHeadComponents, - setHtmlAttributes, - setBodyAttributes, - setPreBodyComponents, - setPostBodyComponents, - setBodyProps, - pathname: pagePath, - loadPageDataSync, - bodyHtml, - scripts, - styles, - pathPrefix: __PATH_PREFIX__ - }); - scripts.slice(0).reverse().forEach(script => { - // Add preload/prefetch s for scripts. - headComponents.push(React.createElement("link", { - as: "script", - rel: script.rel, - key: script.name, - href: `${__PATH_PREFIX__}/${script.name}` - })); - }); - - if (pageData) { - headComponents.push(React.createElement("link", { - as: "fetch", - rel: "preload", - key: pageDataUrl, - href: pageDataUrl, - crossOrigin: "anonymous" - })); - } - - styles.slice(0).reverse().forEach(style => { - // Add s for styles that should be prefetched - // otherwise, inline as a