Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
4d3aab0
Label street trees on the web and keep label sides across pans
wf9a5m75 Nov 6, 2026
c7fb94d
Point js-sdk-core and react-for-here at the tile-label merges
wf9a5m75 Nov 6, 2026
163bbed
Merge pull request #40 from MapConductor/feat/street-tree-labels
wf9a5m75 Nov 6, 2026
c37967c
build(deps): bump node-forge from 1.4.0 to 1.4.3
dependabot[bot] Nov 6, 2026
b857702
Merge pull request #41 from MapConductor/dependabot/npm_and_yarn/node…
wf9a5m75 Nov 6, 2026
4298c36
Pass image URLs straight to ImageIcon in the samples
wf9a5m75 Nov 6, 2026
2e7ffdb
Point js-sdk-core at the ImageIcon URL merge
wf9a5m75 Nov 6, 2026
a7880a2
Merge pull request #42 from MapConductor/feat/image-icon-url
wf9a5m75 Nov 6, 2026
921a4ad
Bump js-sdk-core, js-sdk-react, react-for-arcgis, react-for-mapkit
wf9a5m75 Nov 7, 2026
bc6f3a8
Merge pull request #43 from MapConductor/chore/bump-sdk-fixes
wf9a5m75 Nov 7, 2026
1504983
Add a Polygons sample page
wf9a5m75 Nov 7, 2026
e2ee879
Add a Boston buildings sample drawn with <Polygons>
wf9a5m75 Nov 7, 2026
daeb4e5
Boston buildings: real footprints in three nested areas, and say what…
wf9a5m75 Nov 7, 2026
ef0d22e
Describe iconScaleCallback as it works on React Native now
wf9a5m75 Nov 7, 2026
8098ebb
Boston sample: city-wide buildings and parcels as a load test
wf9a5m75 Nov 7, 2026
1257225
Boston sample: colour each parcel, picked from its id
wf9a5m75 Nov 7, 2026
8b15e55
Boston sample: colour parcels by land use, and show loading progress
wf9a5m75 Nov 7, 2026
2d08297
Boston sample: show a tapped polygon's data in an InfoBubble at the tap
wf9a5m75 Nov 7, 2026
48ddfbb
Fix example documentation snippets and validate generated code
wf9a5m75 Nov 7, 2026
a98dee7
Merge pull request #44 from MapConductor/fix/example-documentation-sn…
wf9a5m75 Nov 7, 2026
17eee7d
Point the remaining providers at feat/polygon-tiling
wf9a5m75 Nov 7, 2026
283340b
Boston sample: keep the loading overlay up until every polygon's onAd…
wf9a5m75 Nov 7, 2026
53f6285
Boston sample: count onAdded against the list now on the map
wf9a5m75 Nov 7, 2026
4dda279
Fix Mapbox and MapLibre coexistence in demo
wf9a5m75 Nov 7, 2026
95bd0e7
Merge pull request #45 from MapConductor/fix/demo-mapbox-maplibre
wf9a5m75 Nov 7, 2026
d441eb2
Isolate demo Mapbox registry from external renderers
wf9a5m75 Nov 8, 2026
92f4393
Merge pull request #46 from MapConductor/fix/demo-longdo-mapbox
wf9a5m75 Nov 8, 2026
398a850
Template: clear registered strategy markers in clearOverlays()
wf9a5m75 Nov 8, 2026
d63d80e
Point js-sdk-core at develop, which has clearOverlayControllers
wf9a5m75 Nov 8, 2026
01d6c66
Merge pull request #47 from MapConductor/fix/clear-strategy
wf9a5m75 Nov 8, 2026
397a0a1
Point js-sdk-core and react-for-deckgl at the marker click fix
wf9a5m75 Nov 9, 2026
4c390df
CirclePage: drop the circle-click suppression after a marker drag
wf9a5m75 Nov 9, 2026
6f72db9
Point js-sdk-core, react-for-deckgl and react-for-azuremaps at develop
wf9a5m75 Nov 9, 2026
7784da0
Merge pull request #48 from MapConductor/fix/marker-drag-click-leak
wf9a5m75 Nov 9, 2026
4c16142
Boston sample: read the polygons as MCPG v2, without ids
wf9a5m75 Nov 9, 2026
29096aa
Boston sample: bundle the whole city's buildings and parcels, and kee…
wf9a5m75 Nov 9, 2026
27e486b
Boston sample README: name the land-use source, and what the boundary…
wf9a5m75 Nov 9, 2026
d762c6b
Point js-sdk-core at the polygon hole union fix
wf9a5m75 Nov 9, 2026
6e18f97
Merge develop into feat/polygon-tiling
wf9a5m75 Nov 9, 2026
7957d61
Point the submodules at their API surface and HERE comment fixes
wf9a5m75 Nov 9, 2026
246de62
Merge feat/polygon-tiling into feat/overlay-on-added
wf9a5m75 Nov 9, 2026
286d2c9
Point the MapLibre-family providers at the polygon tile stacking test
wf9a5m75 Nov 9, 2026
79b0985
Point the MapLibre-family providers at the polygon tile stacking test
wf9a5m75 Nov 9, 2026
9b02114
Merge pull request #49 from MapConductor/chore/bump-core-hole-union
wf9a5m75 Nov 9, 2026
4dae22d
Merge remote-tracking branch 'origin/develop' into feat/polygon-tiling
wf9a5m75 Nov 9, 2026
de88aab
Merge pull request #50 from MapConductor/feat/polygon-tiling
wf9a5m75 Nov 9, 2026
c26b872
Boston roads: every road of the city with one <Polylines>, tiles or n…
wf9a5m75 Nov 9, 2026
6e14328
Point the submodules at the polyline tiling
wf9a5m75 Nov 9, 2026
ae96238
Boston roads: ?stack=1 overlays to check the stack; a new onAdded rou…
wf9a5m75 Nov 9, 2026
1a1b486
Merge remote-tracking branch 'origin/feat/polygon-tiling' into feat/o…
wf9a5m75 Nov 9, 2026
80fd18a
Merge branch 'feat/overlay-on-added' into feat/polyline-tiling
wf9a5m75 Nov 9, 2026
bab84f2
Merge pull request #51 from MapConductor/feat/polyline-tiling
wf9a5m75 Nov 10, 2026
cc19880
Pin the React Native example to the NDK the CI runner already has
wf9a5m75 Nov 10, 2026
52bb855
Point js-sdk-react at the NDK-from-app change
wf9a5m75 Nov 10, 2026
d33d159
Merge pull request #52 from MapConductor/chore/rn-example-ndk-27-1
wf9a5m75 Nov 10, 2026
9fc643e
Remove camera center alias across React SDK providers
wf9a5m75 Nov 10, 2026
769fca0
Fix template camera test after removing center alias
wf9a5m75 Nov 10, 2026
2d1bdc4
Merge pull request #53 from MapConductor/refactor/remove-camera-center
wf9a5m75 Nov 10, 2026
b84f614
Integrate bulk Circles and nationwide OpenCellID example
wf9a5m75 Nov 11, 2026
81b3860
Merge pull request #54 from MapConductor/feat/circles-bulk-cache
wf9a5m75 Nov 11, 2026
d9397ca
build(deps): bump fast-xml-parser from 5.11.1 to 5.12.0
dependabot[bot] Nov 11, 2026
5a3c593
Merge pull request #55 from MapConductor/dependabot/npm_and_yarn/fast…
wf9a5m75 Nov 11, 2026
7a67edc
Prepare npm 0.4.0 release
wf9a5m75 Nov 11, 2026
b9e4f76
Add node:test suite to reactnative-for-template
wf9a5m75 Nov 11, 2026
89fccba
Merge pull request #57 from MapConductor/test/rn-template-tests
wf9a5m75 Nov 11, 2026
069375b
Include polygon tile zIndex fix in 0.4.0
wf9a5m75 Nov 11, 2026
62168dd
Merge develop; point every package at its develop head for 0.4.0
wf9a5m75 Nov 11, 2026
52c6680
Bump react-for-googlemaps, -here, -leaflet, -openlayers
wf9a5m75 Nov 11, 2026
71230a5
Add a Projected Coordinates sample page
wf9a5m75 Nov 11, 2026
6172bc8
Drop markers at the tapped and round-tripped points
wf9a5m75 Nov 11, 2026
6149e63
Draw the round-tripped marker in front with zIndex 1
wf9a5m75 Nov 11, 2026
172e58f
Merge pull request #58 from MapConductor/chore/bump-rotated-plane-fixes
wf9a5m75 Nov 12, 2026
57aa81b
Merge pull request #59 from MapConductor/feat/map-projected-coordinates
wf9a5m75 Nov 12, 2026
68f1a56
Move submodules to develop after the zIndex and projected-coordinate …
wf9a5m75 Nov 12, 2026
35f5077
Bump react-for-maplibre: tile load failures as warnings
wf9a5m75 Nov 12, 2026
44d5b63
Merge pull request #61 from MapConductor/chore/bump-maplibre-tile-war…
wf9a5m75 Nov 12, 2026
3000f61
Merge develop: keep the tile warning on the 0.4.0 react-for-maplibre
wf9a5m75 Nov 12, 2026
d87e7e4
Move the remaining submodules to develop
wf9a5m75 Nov 12, 2026
d8ac9af
Sync the lockfile with the 0.4.0 packages
wf9a5m75 Nov 12, 2026
6c3082e
Merge pull request #60 from MapConductor/chore/bump-zindex-projected
wf9a5m75 Nov 12, 2026
4abaf82
Merge remote-tracking branch 'origin/develop' into codex/npm-release-…
wf9a5m75 Nov 12, 2026
894b8a0
Point every package at its develop head for 0.4.0
wf9a5m75 Nov 12, 2026
bc99686
Update the lockfile for TomTom Maps SDK 1.0.0
wf9a5m75 Nov 12, 2026
da0a5d2
Merge pull request #56 from MapConductor/codex/npm-release-0.4.0
wf9a5m75 Nov 12, 2026
83ebec8
Update npm-publish.yml
wf9a5m75 Nov 12, 2026
aebd055
Update npm-publish.yml
wf9a5m75 Nov 12, 2026
2d683fb
Read the package version under npm 12 as well
wf9a5m75 Nov 12, 2026
ab5b918
Merge pull request #62 from MapConductor/fix/npm12-pkg-get
wf9a5m75 Nov 12, 2026
2462d39
Load HERE Maps API for JavaScript 3.2 in the example
wf9a5m75 Nov 12, 2026
e2017f5
Bump react-for-here to HERE Maps API for JavaScript 3.2
wf9a5m75 Nov 12, 2026
ab37484
Merge pull request #63 from MapConductor/chore/here-js-3.2
wf9a5m75 Nov 12, 2026
9000e1f
Raise vulnerable transitive dependencies to patched versions
wf9a5m75 Nov 13, 2026
5e9423c
Draw Verizon in orange in the antenna sample
wf9a5m75 Nov 13, 2026
fe88799
Merge pull request #64 from MapConductor/chore/security-deps
wf9a5m75 Nov 13, 2026
5ccbfd6
Merge pull request #65 from MapConductor/fix/antenna-verizon-colour
wf9a5m75 Nov 13, 2026
012da3d
Fit the samples to a phone screen
wf9a5m75 Nov 13, 2026
b70b9cf
Merge pull request #66 from MapConductor/feat/mobile-examples
wf9a5m75 Nov 13, 2026
8a301c1
Show add progress on antenna-horizons
wf9a5m75 Nov 13, 2026
56d4561
Point js-sdk-core at the service-worker restart fix
wf9a5m75 Nov 13, 2026
78a58b1
Merge pull request #68 from MapConductor/chore/core-sw-fix
wf9a5m75 Nov 13, 2026
26aadf7
Show Loading... over the map while the collections are being added
wf9a5m75 Nov 13, 2026
692ff6e
Merge develop; point the submodules at the merged add-progress commits
wf9a5m75 Nov 13, 2026
773b29f
Merge pull request #67 from MapConductor/feat/add-progress
wf9a5m75 Nov 13, 2026
243cfb2
Point js-sdk-core at circle blocks stored by place
wf9a5m75 Nov 13, 2026
7244625
Merge pull request #69 from MapConductor/chore/core-spatial-circles
wf9a5m75 Nov 13, 2026
b36b771
Point js-sdk-core at the merge of MapConductor/js-sdk-core#48
wf9a5m75 Nov 13, 2026
71c5bb4
Merge pull request #70 from MapConductor/chore/core-spatial-circles
wf9a5m75 Nov 13, 2026
3a3cf5e
Point js-sdk-core at the marker tap fix (MapConductor/js-sdk-core#49)
wf9a5m75 Nov 13, 2026
3caa75f
Merge pull request #71 from MapConductor/chore/marker-hit-fix
wf9a5m75 Nov 13, 2026
9e16423
Release 0.4.1
wf9a5m75 Nov 13, 2026
5969f8d
Merge pull request #72 from MapConductor/chore/release-0.4.1
wf9a5m75 Nov 13, 2026
0f63bb6
Point the React Native native code at the Android SDK 1.4.0 artifacts
wf9a5m75 Nov 13, 2026
095e69b
Merge pull request #74 from MapConductor/chore/android-1.4.0-pins
wf9a5m75 Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
registry-url: https://registry.npmjs.org
# cache: npm

# Trusted publishing needs npm 11.5.1 or later; Node 22 ships npm 10.
- name: Update npm
run: npm install -g npm@^11.5.1
run: npm install -g npm@^12.2.2

# Internal packages may not exist in the npm registry yet. Normalize
# their dependency specs temporarily so npm links every dependency from
Expand Down Expand Up @@ -119,12 +119,19 @@ jobs:
echo "::group::${package}"

# Skip previewing when the local version is already on the registry.
local_version="$(npm pkg get version --workspace "${package}" | node -e '
local_version="$(npm pkg get version --workspace "${package}" --json | node -e '
let input = "";
process.stdin.on("data", chunk => input += chunk);
process.stdin.on("end", () => {
// npm 11 prints {"<name>": "<version>"}; npm 12 needs --json and
// prints {"<name>": {"version": "<version>"}}. Accept both.
const parsed = JSON.parse(input);
const version = typeof parsed === "string" ? parsed : Object.values(parsed)[0];
let version = typeof parsed === "string" ? parsed : Object.values(parsed)[0];
if (version && typeof version === "object") version = version.version;
if (typeof version !== "string" || !version) {
console.error(`Could not read the version from: ${input}`);
process.exit(1);
}
process.stdout.write(version);
});
')"
Expand Down Expand Up @@ -164,12 +171,19 @@ jobs:
echo "::group::${package}"

# Skip publishing when the local version is already on the registry.
local_version="$(npm pkg get version --workspace "${package}" | node -e '
local_version="$(npm pkg get version --workspace "${package}" --json | node -e '
let input = "";
process.stdin.on("data", chunk => input += chunk);
process.stdin.on("end", () => {
// npm 11 prints {"<name>": "<version>"}; npm 12 needs --json and
// prints {"<name>": {"version": "<version>"}}. Accept both.
const parsed = JSON.parse(input);
const version = typeof parsed === "string" ? parsed : Object.values(parsed)[0];
let version = typeof parsed === "string" ? parsed : Object.values(parsed)[0];
if (version && typeof version === "object") version = version.version;
if (typeof version !== "string" || !version) {
console.error(`Could not read the version from: ${input}`);
process.exit(1);
}
process.stdout.write(version);
});
')"
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ dist/*
*.mjs
# 雛形の適合テストはバージョン管理する(外部の作者がコピーする出発点なので)。
!react-for-template/test/*.mjs
# サンプルの単体テスト(node --test)。
!examples/basic/test/*.mjs
!examples/basic/server.mjs
!examples/basic/scripts/generate-static.mjs
!examples/basic/scripts/check-snippets.mjs
!examples/basic/scripts/snippet-interactions.mjs
!examples/basic/scripts/vite-maplibre-registry.mjs
!examples/basic/scripts/vite-maplibre-registry.test.mjs
# scripts/ はソースしか置かないので丸ごと追跡する。1 本ずつ negation を足す運用だと
# 足し忘れたスクリプトが `git add -A` で無言のまま無視され、CI のチェックアウトにだけ
# 存在しない状態になる(unlink-local-workspaces.mjs で実際に踏んだ)。
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Tiling happens in the Android core after the marker definitions reach the native

For MapLibre, tiled markers have `entity.marker == null` and are rendered by `MarkerTileRenderer`. Never register their images in the MapLibre Style. `MapLibreMarkerOverlayRenderer.ensureStyleImages()` must only process native marker entities and must deduplicate by icon key; otherwise a style reload can call `style.addImage()` tens of thousands of times and delay the first tile for nearly a minute.

`MarkerTilingOptions.iconScaleCallback(state, zoom)` may depend on priority, category, or other marker state. A global zoom-stop replacement is not API-equivalent. A general RN serialization design for state-dependent callbacks is currently deferred. The React Native post-office example temporarily uses a fixed `ReactNativeImageIcon` scale of `0.4`.
`MarkerTilingOptions.iconScaleCallback(state, zoom)` may depend on priority, category, or other marker state. A global zoom-stop replacement is not API-equivalent. JS functions cannot cross the bridge, so the payload only carries `hasIconScaleCallback`; `NativeMapViewHost` registers the callback through `registerIconScaleCallback` (`js-sdk-react/src/marker/IconScaleBridge.native.ts`) and native calls back into JS for the scale. The callback only affects tiled markers (`MarkerTileRenderer`); markers below `minMarkerCount`, draggable markers, and animated markers are drawn natively and ignore it. The React Native post-office example uses `ReactNativeImageIcon` with `scale: 0.4` as the base icon size and the same zoom-stop `iconScaleCallback` as the web example.

Use the `MCMarkerTrace` tag when profiling marker ingestion. Compare JS batch time, native decoding time, core diff time, provider post-processing, controller completion, first tile request, and tile response separately. A long gap after `CoreSDK ingest end` but before the first tile request is not tile-rendering time and should be traced in controller/style synchronization. GC during RN decoding and GC during tile bitmap/PNG generation are different costs; do not attribute every GC to the bridge.

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,19 @@ Apache License 2.0. See [`LICENSE`](./LICENSE).
- [MapConductor Android SDK](https://github.com/MapConductor/android-sdk)
- [Google Maps JavaScript API](https://developers.google.com/maps/documentation/javascript)
- [MapLibre](https://maplibre.org/)

## Bulk circles and raster tiles

Use `<Circles states={circleStates} />` from `@mapconductor/js-sdk-react` to register a collection without one React effect per circle. Each collection removes only its own IDs.

Web map providers accept `circleTilingOptions`. Use `CircleTilingOptions.Disabled` from `@mapconductor/js-sdk-core` to keep native rendering. For large web collections, `Circles` also accepts a reusable iterable, as shown by the nationwide example.

By default, raster tiling starts above 2,000 tileable circles. Large collections keep their drawing geometry in a disk-backed cache. Circle radius remains a ground distance in metres and stroke width remains a screen distance. Clicks and `onAdded` use the original states. `onAdded` indicates that the tile layer was handed to the map.

Circles crossing the antimeridian, reaching Mercator's latitude limit, or having invalid radii stay native. Circle tiles stack above polygons and below polylines. Web rendering also falls back to native when the service worker cannot draw tiles.

## US antenna horizons example

Choose **US Antenna Horizons** in the example sidebar. It bundles 723,800 OpenCellID records (MCC 310–314), with carrier filters and US and Alaska camera presets. Each estimated cell position is drawn as a 500 m geodesic circle. The radius is a display setting and does not model signal coverage.

Cell tower data from [OpenCellID](https://opencellid.org) · [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
11 changes: 11 additions & 0 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ This project uses Vite's environment variable system. All environment variables
- Never put sensitive secrets that should remain server-side in `VITE_` variables
- For production deployment, set environment variables in your hosting platform

## Validate the displayed code examples

From the workspace root, run `npm run check:snippets --workspace @mapconductor/example-basic`.
This checks the generated TSX for every supported page/provider pair, including imports,
and exercises data preparation and interaction handlers with real SDK state objects.
Provider rendering still requires a browser and any provider-specific credentials.

The snippets are standalone `App.tsx` examples. They include small inline datasets;
the interactive pages may use larger datasets and additional controls. Replace `YOUR_…`
credential placeholders when using a provider that requires authentication.

## Features

- Switch between MapLibre and Google Maps providers
Expand Down
11 changes: 5 additions & 6 deletions examples/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
<title>MapConductor React SDK - Basic Example</title>
<!-- HERE Maps API for JavaScript: loaded from CDN per HERE's own quick-start guide.
@mapconductor/react-for-here expects the `H` global these expose. -->
<script src="https://js.api.here.com/v3/3.1/mapsjs-core.js"></script>
<script src="https://js.api.here.com/v3/3.1/mapsjs-core-legacy.js"></script>
<script src="https://js.api.here.com/v3/3.1/mapsjs-service.js"></script>
<script src="https://js.api.here.com/v3/3.1/mapsjs-ui.js"></script>
<script src="https://js.api.here.com/v3/3.1/mapsjs-mapevents.js"></script>
<link rel="stylesheet" href="https://js.api.here.com/v3/3.1/mapsjs-ui.css" />
<script src="https://js.api.here.com/v3/3.2/mapsjs-core.js"></script>
<script src="https://js.api.here.com/v3/3.2/mapsjs-service.js"></script>
<script src="https://js.api.here.com/v3/3.2/mapsjs-ui.js"></script>
<script src="https://js.api.here.com/v3/3.2/mapsjs-mapevents.js"></script>
<link rel="stylesheet" href="https://js.api.here.com/v3/3.2/mapsjs-ui.css" />
</head>
<body>
<div id="root"></div>
Expand Down
8 changes: 6 additions & 2 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
"private": true,
"description": "Basic example app for MapConductor React SDK",
"scripts": {
"test:maplibre-registry": "node --test scripts/vite-maplibre-registry.test.mjs",
"check:snippets": "node scripts/check-snippets.mjs",
"dev": "vite",
"dev:https": "HTTPS=true vite",
"build": "NODE_OPTIONS=--max-old-space-size=6144 vite build && NODE_OPTIONS=--max-old-space-size=6144 vite build --ssr src/entry-server.tsx --outDir dist/server && node scripts/generate-static.mjs",
"preview": "vite preview --port 4000",
"start": "vite preview --host 0.0.0.0 --port 4000"
"start": "vite preview --host 0.0.0.0 --port 4000",
"test": "node --test \"test/**/*.test.mjs\""
},
"dependencies": {
"@mapconductor/js-sdk-core": "*",
Expand All @@ -34,7 +37,7 @@
"@mapconductor/js-vectorstyle": "*",
"@mapconductor/react-vectortile": "*",
"@zip.js/zip.js": "^2.8.26",
"maplibre-gl": "^6.15.0",
"maplibre-gl": "^6.17.0",
"prism-react-renderer": "^2.4.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
Expand All @@ -46,6 +49,7 @@
"devDependencies": {
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/three": "^0.185.4",
"@vitejs/plugin-react": "^5.2.0",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
Expand Down
Binary file added examples/basic/public/antennas/us-antennas.bin
Binary file not shown.
31 changes: 31 additions & 0 deletions examples/basic/public/antennas/us-antennas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"source": "https://opencellid.org",
"license": "https://creativecommons.org/licenses/by-sa/4.0/",
"attribution": "Cell tower data from OpenCellID \u00b7 CC BY-SA 4.0",
"inputs": [
"310.csv.gz",
"311.csv.gz",
"312.csv.gz",
"313.csv.gz",
"314.csv.gz"
],
"count": 723800,
"carrier_counts": [
199569,
372599,
147164,
4468
],
"mcc_counts": {
"310": 567764,
"311": 150228,
"312": 199,
"313": 5349,
"314": 260
},
"file_sha256": "eda2bc13c14fe4d29ee94b4e6a92d6b8be14566ef04a95cb6aaf2954b456acec",
"bytes": 11580808,
"format": "MCCE + u32 count + records (i32 latitude_e5, i32 longitude_e5, f32 range_m, u32 carrier*1000+MNC), little endian",
"classification_source": "https://imsiadmin.com/assignments/hni/",
"coverage": "Supplied MCC 310-314 files; not a complete inventory of physical towers"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added examples/basic/public/boston/boston-downtown.bin
Binary file not shown.
62 changes: 62 additions & 0 deletions examples/basic/scripts/check-snippets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import assert from 'node:assert/strict';
import { build } from 'esbuild';
import ts from 'typescript';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { checkInteractions } from './snippet-interactions.mjs';

const root = fileURLToPath(new URL('../../../', import.meta.url));
const result = await build({
stdin: {
contents: `export { getSampleDocumentation } from './examples/basic/src/samples/documentation';
export { SAMPLE_PAGES, resolveProviderForPage } from './examples/basic/src/samples/sampleRegistry';
export { DOCUMENTATION_PROVIDERS } from './examples/basic/src/samples/sampleDocumentationProviders';`,
resolveDir: root,
},
bundle: true, write: false, platform: 'node', format: 'esm',
});
const { getSampleDocumentation, SAMPLE_PAGES, DOCUMENTATION_PROVIDERS, resolveProviderForPage } =
await import(`data:text/javascript;base64,${Buffer.from(result.outputFiles[0].text).toString('base64')}`);

// Virtual files let TypeScript check exactly the text displayed to readers,
// without producing or maintaining a second copy of every example.
const snippets = new Map();
for (const page of SAMPLE_PAGES) {
for (const provider of DOCUMENTATION_PROVIDERS) {
if (page.unavailableProviders?.includes(provider)) continue;
const resolved = resolveProviderForPage(provider, page.id);
const doc = getSampleDocumentation(page.id, resolved, 'ja');
assert.match(doc.code, /export default function App\(\)/);
assert.doesNotMatch(doc.code, /MapViewContainer|providerDesignOptions|example\.com/);
assert.doesNotMatch(doc.code, /MapConductor overlays/, `${page.id} needs page-specific documentation`);
snippets.set(path.join(root, 'examples/basic', `__snippet_${page.id}_${provider}.tsx`), doc.code);
}
}
assert.match(getSampleDocumentation('marker', 'google').code, /GoogleMapView2D/);
assert.match(getSampleDocumentation('marker', 'google-3d').code, /GoogleMapView\b/);
const options = {
target: ts.ScriptTarget.ES2022,
module: ts.ModuleKind.ESNext,
moduleResolution: ts.ModuleResolutionKind.Bundler,
jsx: ts.JsxEmit.ReactJSX,
strict: true, noEmit: true, skipLibCheck: true,
noUnusedLocals: true, noUnusedParameters: true,
allowSyntheticDefaultImports: true, esModuleInterop: true,
types: ['vite/client'],
};
const host = ts.createCompilerHost(options);
const readFile = host.readFile.bind(host);
const fileExists = host.fileExists.bind(host);
host.readFile = name => snippets.get(name) ?? readFile(name);
host.fileExists = name => snippets.has(name) || fileExists(name);
const program = ts.createProgram([...snippets.keys()], options, host);
const diagnostics = ts.getPreEmitDiagnostics(program).filter(d => !d.file || snippets.has(d.file.fileName));
if (diagnostics.length) {
console.error(ts.formatDiagnosticsWithColorAndContext(diagnostics, {
getCanonicalFileName: name => name, getCurrentDirectory: () => root, getNewLine: () => '\n',
}));
process.exitCode = 1;
} else {
console.log(`Checked ${snippets.size} snippets (${SAMPLE_PAGES.length} pages, ${DOCUMENTATION_PROVIDERS.length} providers).`);
checkInteractions(getSampleDocumentation, SAMPLE_PAGES);
}
Loading
Loading