-
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
7 changed files
with
53 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,17 +30,36 @@ | |
MMapListener, | ||
MMapControls, | ||
MMapCollection, | ||
MMapMarker | ||
MMapTileDataSource, | ||
MMapLayer | ||
} = mappable; | ||
|
||
const {MMapZoomControl} = await mappable.import('@mappable-world/[email protected]'); | ||
const {MMapEntityTileLoader} = await mappable.import('@mappable-world/mappable-entity-tile-loader'); | ||
|
||
map = new MMap(document.getElementById('app'), {location: LOCATION, zoomRange: ZOOM_RANGE}); | ||
map = new MMap(document.getElementById('app'), { | ||
location: LOCATION, | ||
behaviors: [ | ||
'drag', | ||
'pinchZoom', | ||
'scrollZoom', | ||
'magnifier', | ||
'oneFingerZoom', | ||
'mouseRotate', | ||
'mouseTilt', | ||
'pinchRotate', | ||
'panTilt' | ||
], | ||
zoomRange: ZOOM_RANGE | ||
}); | ||
map.addChild(new MMapDefaultSchemeLayer()); | ||
map.addChild(new MMapDefaultFeaturesLayer()); | ||
map.addChild(new MMapControls({position: 'right'}).addChild(new MMapZoomControl({}))); | ||
|
||
map.addChild(new MMapTileDataSource({id: layerId, raster: dataSource})).addChild( | ||
new MMapLayer({id: layerId, source: layerId, type: layerId}) | ||
); | ||
|
||
if (MODE !== 'bbox') { | ||
map.addChild( | ||
new MMapEntityTileLoader({ | ||
|
@@ -112,9 +131,11 @@ | |
<body> | ||
<div class="toolbar"> | ||
<div class="btn-group"> | ||
<a href="?mode=tile" class="btn btn-primary btn-tile">Tile</a> | ||
<a href="?mode=tile-clusterer" class="btn btn-primary btn-tile-clusterer">Tile with Clusterer</a> | ||
<a href="?mode=bbox" class="btn btn-primary btn-bbox">BBox</a> | ||
<a href="?mode=tile" class="btn btn-secondary btn-sm btn-tile">Tile</a> | ||
<a href="?mode=tile-clusterer" class="btn btn-secondary btn-sm btn-tile-clusterer" | ||
>Tile with Clusterer</a | ||
> | ||
<a href="?mode=bbox" class="btn btn-secondary btn-sm btn-bbox">BBox</a> | ||
</div> | ||
</div> | ||
<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
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