From 036fa447aa25c1f34387bfb80c592c41feeba61e Mon Sep 17 00:00:00 2001 From: hu de yi Date: Mon, 11 Nov 2024 16:18:07 +0800 Subject: [PATCH] update demos --- demo/maxAvailableZoom-polygon-clip.html | 11 ++++++++++- demo/maxAvailableZoom.html | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/demo/maxAvailableZoom-polygon-clip.html b/demo/maxAvailableZoom-polygon-clip.html index a0bdd48..f84defe 100644 --- a/demo/maxAvailableZoom-polygon-clip.html +++ b/demo/maxAvailableZoom-polygon-clip.html @@ -69,6 +69,7 @@ }); var map = new maptalks.Map('map', { + zoomControl: true, "center": [121.65586045, 31.12453538], "zoom": 9.064897200334302, "pitch": 0, "bearing": 0, }); @@ -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 => { @@ -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); diff --git a/demo/maxAvailableZoom.html b/demo/maxAvailableZoom.html index 4802655..e962ecd 100644 --- a/demo/maxAvailableZoom.html +++ b/demo/maxAvailableZoom.html @@ -47,7 +47,7 @@ z, urlTemplate, maxAvailableZoom, - filter: 'sepia(100%) invert(90%)' + // filter: 'sepia(100%) invert(90%)' }).then(imagebitmap => { callback(imagebitmap); }).catch(error => { @@ -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 = {