-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
84 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
|
||
const {MMapClusterer, clusterByGrid} = reactify.module(await mappable.import("@mappable-world/[email protected]")); | ||
const {useState, useCallback, useMemo} = React; | ||
const initialPoints = getRandomPoints(100, BOUNDS); | ||
const initialPoints = getRandomPoints(DEFAULT_POINTS_COUNT, BOUNDS); | ||
const gridSizedMethod = clusterByGrid({gridSize: 64}) | ||
|
||
function App() { | ||
|
@@ -64,7 +64,7 @@ | |
|
||
return <React.Fragment> | ||
<div className="toolbar"> | ||
<input id="pointsCount" defaultValue="100" placeholder="Count"></input> | ||
<input id="pointsCount" defaultValue={DEFAULT_POINTS_COUNT} placeholder="Count"></input> | ||
<button type="button" onClick={updatePoints}>Update points</button> | ||
<button type="button" onClick={toggleClusterer}>Delete/Add Clusterer</button> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,9 @@ | |
await mappable.ready; | ||
const {MMap, MMapDefaultSchemeLayer, MMapLayer, MMapFeatureDataSource} = mappable; | ||
|
||
const {MMapClusterer, clusterByGrid} = await mappable.import('@mappable-world/[email protected]'); | ||
const {MMapClusterer, clusterByGrid} = await mappable.import( | ||
'@mappable-world/[email protected]' | ||
); | ||
|
||
map = new MMap(document.getElementById('app'), {location: LOCATION}); | ||
map.addChild(new MMapDefaultSchemeLayer()) | ||
|
@@ -55,7 +57,7 @@ | |
|
||
const clusterer = new MMapClusterer({ | ||
method: clusterByGrid({gridSize: 64}), | ||
features: getRandomPoints(100, BOUNDS), | ||
features: getRandomPoints(DEFAULT_POINTS_COUNT, BOUNDS), | ||
marker, | ||
cluster | ||
}); | ||
|
@@ -76,6 +78,8 @@ | |
|
||
changePoints.onclick = updatePoints; | ||
changeClusterer.onclick = toggleClusterer; | ||
|
||
pointsCount.value = DEFAULT_POINTS_COUNT; | ||
} | ||
</script> | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export const THROTTLE_DEFAULT_TIMEOUT_MS = 200; | ||
export const THROTTLE_DEFAULT_TIMEOUT_MS = 300; | ||
export const DEFAULT_SCREEN_OFFSET = 256; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.