Skip to content

Commit 170fcca

Browse files
Update dist folder [skip ci] (#661)
1 parent 7266cb2 commit 170fcca

File tree

19 files changed

+2481
-5
lines changed

19 files changed

+2481
-5
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": [
3+
"plugin:@typescript-eslint/recommended"
4+
],
5+
"parser": "@typescript-eslint/parser",
6+
"rules": {
7+
"@typescript-eslint/ban-ts-comment": 0,
8+
"@typescript-eslint/no-this-alias": 1,
9+
"@typescript-eslint/no-empty-function": 1,
10+
"@typescript-eslint/explicit-module-boundary-types": 1,
11+
"@typescript-eslint/no-unused-vars": 1
12+
}
13+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Basic Terra Draw with Google Maps API Sample
2+
3+
This sample demonstrates a basic implementation of Terra Draw with the Google Maps JavaScript API. It includes various drawing modes such as Point, LineString, Polygon, Rectangle, Circle, and Freehand.
4+
5+
![Roadmap View](./screenshots/draw-roadmap.png)
6+
![Satellite View](./screenshots/draw-satellite.png)
7+
8+
# Google Maps JavaScript Sample
9+
10+
This sample is generated from @googlemaps/js-samples located at
11+
https://github.com/googlemaps-samples/js-api-samples.
12+
13+
## Setup
14+
15+
### Before starting run:
16+
17+
`$npm i`
18+
19+
### Run an example on a local web server
20+
21+
First `cd` to the folder for the sample to run, then:
22+
23+
`$npm start`
24+
25+
### Build an individual example
26+
27+
From `samples/`:
28+
29+
`$npm run build --workspace=sample-name/`
30+
31+
### Build all of the examples.
32+
33+
From `samples/`:
34+
`$npm run build-all`
35+
36+
## Feedback
37+
38+
For feedback related to this sample, please open a new issue on
39+
[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues).
40+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<!--
3+
@license
4+
Copyright 2025 Google LLC. All Rights Reserved.
5+
SPDX-License-Identifier: Apache-2.0
6+
-->
7+
<!--[START maps_map_drawing_terradraw]-->
8+
<html>
9+
<head>
10+
<title>Terra Draw with Google Maps API Sample</title>
11+
<link rel="stylesheet" href="./style.css">
12+
<!-- Terra Draw CSS (if any needed, add here) -->
13+
</head>
14+
<body>
15+
<!-- Map Container -->
16+
<div id="map"></div>
17+
18+
<!-- Top-right mode selection UI -->
19+
<div id="mode-ui">
20+
<button id="point-mode" class="mode-button" title="Point"><img src="./img/point.svg" alt="Point" draggable="false"></button>
21+
<button id="linestring-mode" class="mode-button" title="Linestring"><img src="./img/polyline.svg" alt="Linestring" draggable="false"></button>
22+
<button id="polygon-mode" class="mode-button active" title="Polygon"><img src="./img/polygon.png" alt="Polygon" draggable="false"></button>
23+
<button id="rectangle-mode" class="mode-button" title="Rectangle"><img src="./img/rectangle.svg" alt="Rectangle" draggable="false"></button>
24+
<button id="circle-mode" class="mode-button" title="Circle"><img src="./img/circle.svg" alt="Circle" draggable="false"></button>
25+
<button id="freehand-mode" class="mode-button" title="Freehand"><img src="./img/freehand.svg" alt="Freehand" draggable="false"></button>
26+
<button id="select-mode" class="mode-button" title="Select"><img src="./img/select.svg" alt="Select" draggable="false"></button>
27+
<button id="resize-button" class="mode-button" title="Resize"><img src="./img/resize.svg" alt="Resize" draggable="false"></button>
28+
<button id="clear-mode" class="mode-button" title="Clear"><img src="./img/delete.svg" alt="Clear" draggable="false"></button>
29+
<button id="delete-selected-button" class="mode-button" title="Clear last or Selected"><img src="./img/delete-selected.svg" alt="Delete Selected" draggable="false"></button>
30+
<button id="undo-button" class="mode-button" title="Undo"><img src="./img/undo.svg" alt="Undo" draggable="false"></button>
31+
<button id="redo-button" class="mode-button" title="Redo"><img src="./img/redo.svg" alt="Redo" draggable="false"></button>
32+
<button id="export-button" class="mode-button" title="Export"><img src="./img/download.svg" alt="Export" draggable="false"></button>
33+
<button id="upload-button" class="mode-button" title="Upload"><img src="./img/upload.svg" alt="Upload" draggable="false"></button>
34+
<input type="file" id="upload-input" style="display: none;" accept=".geojson,.json">
35+
</div>
36+
37+
<script type="module" src="./index.ts"></script>
38+
<!-- Google Maps API is loaded by the Loader in index.ts -->
39+
</body>
40+
</html>
41+
<!--[END maps_map_drawing_terradraw]-->

0 commit comments

Comments
 (0)