Skip to content

Commit b8cbfdf

Browse files
committed
added method and script to use the component
1 parent 9ef93fd commit b8cbfdf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ This is a webcomponent to use in HTML or more complex web projects.
1010
If the dependency is up set properly (instructions will follow), the component can be used like this:
1111

1212
```html
13+
<head>
14+
...
15+
<!-- use the code !-->
16+
<script src="https://cdn.jsdelivr.net/npm/@kit-data-manager/mapping-service-input@latest/dist/com_mapping-service-input.es.js"></script>
17+
</head>
1318
<body>
1419
<!-- use the component !-->
1520
<mapping-input base-url="http://localhost:8090/" id="input-component"></mapping-input>
@@ -21,5 +26,23 @@ If the dependency is up set properly (instructions will follow), the component c
2126
- `base-url`: string, base-url to your Mapping Service instance
2227

2328

29+
## Methods
30+
- `executeMapping(true)`: To trigger the mapping process, you can include the following HTML code in your project:
31+
(true in the method argument will trigger mapping + download of the result)
32+
33+
```html
34+
...
35+
<!-- use the method !-->
36+
37+
`<div class="ui center aligned grid">
38+
<button type="submit" class="ui primary button" id="submit" onclick="
39+
var component = document.getElementById('input-component');
40+
component.executeMapping(true)">Map document
41+
</button>
42+
</div>`
43+
44+
```
45+
46+
2447

2548

0 commit comments

Comments
 (0)