Browse Source

print widget

master
Choirul Fajri 2 years ago
parent
commit
0de655c097
  1. 26
      index.html
  2. 8
      main.js

26
index.html

@ -120,31 +120,7 @@
<div class="card-body"> <div class="card-body">
<form> <form>
<legend>Print Proccess</legend> <legend>Print Proccess</legend>
<div class="form-group"> <div id="printService"></div>
<label for="exampleFormControlSelect">Select Feature Layer</label>
<select class="form-control" id="Layer" required>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Radius Distance</label>
<input type="number" class="form-control" id="radiusDistance" value="100">
</div>
<div class="form-group">
<label for="exampleFormControlSelect2">Linear Unit</label>
<select multiple class="form-control" id="Unit" required>
<option value="meters" selected>Meter</option>
<option value="kilometers">Kilometer</option>
<option value="miles">Miles</option>
</select>
</div>
<div class="row">
<div class="col">
<button id="procces" type="button" class="btn btn-ligth">Submit</button>
</div>
<div class="col">
<button id="reset" type="button" class="btn btn-ligth">Reset</button>
</div>
</div>
</form> </form>
</div> </div>
</div> </div>

8
main.js

@ -131,15 +131,15 @@ $(document).ready(function () {
let layerSource = url+"/"+layerId let layerSource = url+"/"+layerId
$('#Layer').append('<option value="'+layerSource+'">'+layer.title+'</option>') $('#Layer').append('<option value="'+layerSource+'">'+layer.title+'</option>')
}) })
}) })
const print = new Print({ const print = new Print({
view: view, view: view,
// specify your own print service container: "printService",
label: "adaddawdawdawdaw",
printServiceUrl: printServiceUrl:
"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
}); });
view.ui.add(print, "bottom-right");
}) })

Loading…
Cancel
Save