Skip to content

Commit

Permalink
refactor(web)/ add sample polyline data from url
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogoHirasawa committed Jan 14, 2025
1 parent 9e60faa commit d9a6a8f
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,28 @@ const layerPolylineInline = {
polyline: {},
};
// Difine the polygon with URL
const layerPolygonFromUrl = {
id:"feature004",
type: "simple",
data: {
type: "geojson",
url: "https://reearth.github.io/visualizer-plugin-sample-data/public/geojson/square.geojson", // URL of GeoJSON file
},
polyline: {},
};
// Difine the polyline with URL
const layerPolylineFromUrl = {
id:"feature004",
type: "simple",
data: {
type: "geojson",
url: "https://reearth.github.io/visualizer-plugin-sample-data/public/geojson/polyline.geojson", // URL of GeoJSON file
},
polygon: {},
};
// Add the inline polygon layer to Re:Earth
reearth.layers.add(layerPolygonInline);
Expand All @@ -110,6 +132,9 @@ reearth.layers.add(layerPolygonFromUrl);
// Add the polyline layer from the URL to Re:Earth
reearth.layers.add(layerPolylineInline);
// Add the inline polyline layer to Re:Earth
reearth.layers.add(layerPolylineFromUrl);
`
};

Expand Down

0 comments on commit d9a6a8f

Please sign in to comment.