Skip to content

Commit

Permalink
refactor: update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogoHirasawa committed Jan 29, 2025
1 parent 58d084d commit e9ad273
Showing 1 changed file with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ const widgetFile: FileType = {
//
reearth.ui.show(\`
<style>
html, body { margin: 0; padding: 0; }
#scaleBtn {
padding: 8px;
border-radius: 4px;
border: none;
background: #333;
color: #fff;
background: #fffafa;
color: #000000;
cursor: pointer;
width: 200px;
height: 60px;
font-size: 16px
}
#scaleBtn:active {
background: #dcdcdc;
}
</style>
<button id="scaleBtn">Scale Polygon</button>
Expand Down Expand Up @@ -156,29 +162,10 @@ reearth.extension.on("message", msg => {
features: [feature],
},
},
// 見た目(色・透明度など)を再指定可能 (任意)
polygon: {
fillColor: "#f8f8ff80",
stroke:true,
strokeColor:"white",
strokeWidth: 3,
},
});
}
});
// カメラ適当:この辺りを俯瞰する(緯度経度が大きいのでかなり引きで見る)
reearth.camera.flyTo(
{
lng: -85,
lat: 35,
height: 6000000,
},
{
duration: 2.0,
}
);
// 初期レイヤー作成
createInitialPolygonLayer();
`
Expand Down

0 comments on commit e9ad273

Please sign in to comment.