Skip to content

Commit

Permalink
update demos
Browse files Browse the repository at this point in the history
  • Loading branch information
deyihu committed Nov 11, 2024
1 parent 45063f2 commit 036fa44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
11 changes: 10 additions & 1 deletion demo/maxAvailableZoom-polygon-clip.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
});

var map = new maptalks.Map('map', {
zoomControl: true,
"center": [121.65586045, 31.12453538], "zoom": 9.064897200334302, "pitch": 0, "bearing": 0,
});

Expand All @@ -81,6 +82,14 @@
const groupLayer = new maptalks.GroupGLLayer('group', [], { sceneConfig });
groupLayer.addTo(map);

const layer = new maptalks.VectorLayer('layer').addTo(map);

const symbol = {
polygonOpacity: 0,
lineColor: 'red'
}


// baseLayer.addTo(groupLayer);

fetch('./青浦区-holes.geojson').then(res => res.json()).then(geojson => {
Expand All @@ -89,7 +98,7 @@
}));
layer.addGeometry(polygons);
map.setView({
"center": [121.0903305, 31.1156505], "zoom": 11, "pitch": 0, "bearing": 0
"center":[120.9813688,31.06587294],"zoom":19.516412543204773,"pitch":0,"bearing":0
})
tileActor.injectMask(maskId, geojson.features[0]).then(data => {
baseLayer.addTo(groupLayer);
Expand Down
5 changes: 3 additions & 2 deletions demo/maxAvailableZoom.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
z,
urlTemplate,
maxAvailableZoom,
filter: 'sepia(100%) invert(90%)'
// filter: 'sepia(100%) invert(90%)'
}).then(imagebitmap => {
callback(imagebitmap);
}).catch(error => {
Expand All @@ -58,7 +58,8 @@
});

var map = new maptalks.Map('map', {
"center": [121.65586045, 31.12453538], "zoom": 9.064897200334302, "pitch": 0, "bearing": 0,
zoomControl: true,
"center": [121.65586045, 31.12453538], "zoom": 18.064897200334302, "pitch": 0, "bearing": 0,
});

const sceneConfig = {
Expand Down

0 comments on commit 036fa44

Please sign in to comment.