|
|
|
@ -11,8 +11,9 @@ $(document).ready(function () { |
|
|
|
"esri/Graphic", |
|
|
|
"esri/Graphic", |
|
|
|
"esri/rest/support/LinearUnit", |
|
|
|
"esri/rest/support/LinearUnit", |
|
|
|
"esri/rest/geoprocessor", |
|
|
|
"esri/rest/geoprocessor", |
|
|
|
"esri/layers/FeatureLayer" |
|
|
|
"esri/layers/FeatureLayer", |
|
|
|
], (esriConfig, WebMap, MapView, Home, LayerList, GraphicsLayer, Graphic, LinearUnit, geoprocessor, FeatureLayer) => { |
|
|
|
"esri/widgets/Print" |
|
|
|
|
|
|
|
], (esriConfig, WebMap, MapView, Home, LayerList, GraphicsLayer, Graphic, LinearUnit, geoprocessor, FeatureLayer, Print) => { |
|
|
|
|
|
|
|
|
|
|
|
esriConfig.portalUrl = "https://dev.gisportal.id/portal"; |
|
|
|
esriConfig.portalUrl = "https://dev.gisportal.id/portal"; |
|
|
|
const gpUrl = "https://dev.gisportal.id/server/rest/services/mfajri/Buffer_Sample_Geoprocessing/GPServer/Buffer"; |
|
|
|
const gpUrl = "https://dev.gisportal.id/server/rest/services/mfajri/Buffer_Sample_Geoprocessing/GPServer/Buffer"; |
|
|
|
@ -131,6 +132,14 @@ $(document).ready(function () { |
|
|
|
$('#Layer').append('<option value="'+layerSource+'">'+layer.title+'</option>') |
|
|
|
$('#Layer').append('<option value="'+layerSource+'">'+layer.title+'</option>') |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const print = new Print({ |
|
|
|
|
|
|
|
view: view, |
|
|
|
|
|
|
|
// specify your own print service
|
|
|
|
|
|
|
|
printServiceUrl: |
|
|
|
|
|
|
|
"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
view.ui.add(print, "bottom-right"); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,9 +153,43 @@ $(document).ready(function () { |
|
|
|
const foundLayer = webmap.allLayers.find(function(layer) { |
|
|
|
const foundLayer = webmap.allLayers.find(function(layer) { |
|
|
|
return layer.title === "PIPELINE INSPECTION"; |
|
|
|
return layer.title === "PIPELINE INSPECTION"; |
|
|
|
}); |
|
|
|
}); |
|
|
|
// console.log("Layer",foundLayer)
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('bufferTogle').addEventListener('click', e => { |
|
|
|
|
|
|
|
$("#collapsePrint").collapse('hide'); |
|
|
|
|
|
|
|
$("#map").removeClass("col-md-12"); |
|
|
|
|
|
|
|
$("#map").addClass("col-md-10"); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#collapseBuffer').on('hidden.bs.collapse', function () { |
|
|
|
|
|
|
|
$("#map").removeClass("col-md-10"); |
|
|
|
|
|
|
|
$("#map").addClass("col-md-12"); |
|
|
|
|
|
|
|
if($('#collapsePrint').hasClass('collapse')){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
$("#map").removeClass("col-md-12"); |
|
|
|
|
|
|
|
$("#map").addClass("col-md-10"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('printTogle').addEventListener('click', e => { |
|
|
|
|
|
|
|
$("#collapseBuffer").collapse('hide'); |
|
|
|
|
|
|
|
$("#map").removeClass("col-md-12"); |
|
|
|
|
|
|
|
$("#map").addClass("col-md-10"); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#collapsePrint').on('hidden.bs.collapse', function () { |
|
|
|
|
|
|
|
$("#map").removeClass("col-md-10"); |
|
|
|
|
|
|
|
$("#map").addClass("col-md-12"); |
|
|
|
|
|
|
|
if($('#collapseBuffer').hasClass('collapse')){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
$("#map").removeClass("col-md-12"); |
|
|
|
|
|
|
|
$("#map").addClass("col-md-10"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|