|
DOC
|
@Anonymous User Are the adding the right version of the widget based on the WAB release that you Portal is running. See the link below to understand that Portal is several releases behind the current WAB release. https://enterprise.arcgis.com/en/portal/latest/use/about-versions.htm
... View more
03-04-2021
01:06 PM
|
0
|
0
|
6945
|
|
DOC
|
@AlexMarrero Do you have the 'CSV export' option checked for that layer in the widgets layer settings?
... View more
03-04-2021
01:02 PM
|
0
|
0
|
29343
|
|
POST
|
Gilberto, I have done this on my main website using a custom Suggest_Textbox.js code and a custom .Net web API. So it sound like you may be halfway there already. So in the eSearch\SingleParameter.html file you would add the Suggest_Textbox dijit. ...
<td>
<div data-dojo-attach-point="allValueBoxContainer" style="width:100%;padding-bottom:2px;">
<div data-dojo-attach-point="stringTextBoxContainer" style="display:none;">
<!-- <input data-dojo-attach-point="stringTextBox" data-dojo-type="dijit/form/TextBox" data-dojo-props="trim:true" style="display:none;width:100%;height:30px;" class="dijit-form-TextBox" /> -->
<input data-dojo-attach-point="stringTextBox" data-dojo-type="widgets/eSearch/Suggest_TextBox" data-dojo-props="trim:true" style="display:none;width:100%;height:30px;" class="dijit-form-TextBox" />
<div data-dojo-attach-point="stringCodedValuesFS" data-dojo-type="dijit/form/FilteringSelect"
data-dojo-props="searchAttr:'name',intermediateChanges:true" class="dijit-form-FilteringSelect"></div>
</div>
... Notice I comment out the standard TextBox dijit and add the Suggest_Textbox dijit, having the same data-dojo-attach-point name. In the SingleParameter.js you just need to add the 'widgets/eSearch/Suggest_TextBox' to the define array. I also set the Suggest_TextBox.js searchAlias property which determines which url to use in the Suggest_TextBox.js. Next would be editing the Suggest_TextBox.js file to use your APIs urls.
... View more
02-23-2021
05:35 AM
|
0
|
7
|
6224
|
|
POST
|
have you tried closing WAB Developer down and restarting (the CMD windows that is opened by the startup.bat)?
... View more
02-19-2021
12:41 PM
|
0
|
1
|
2760
|
|
POST
|
Here is a mashup of the Select with Feature Layer and Geometry Service - Buffer samples. It querys the census block layer and buffers the results and uses that buffer to query census block points that intersect the buffer. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Select with feature layer</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.35/dijit/themes/tundra/tundra.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.35/esri/css/esri.css">
<style>
html, body, #mapDiv {
padding: 0;
margin: 0;
height: 100%;
}
#messages{
background-color: #fff;
box-shadow: 0 0 5px #888;
font-size: 1.1em;
max-width: 15em;
padding: 0.5em;
position: absolute;
right: 20px;
top: 20px;
z-index: 40;
}
</style>
<script src="https://js.arcgis.com/3.35/"></script>
<script>
var map;
require([
"esri/map", "esri/layers/FeatureLayer",
"esri/tasks/query", "esri/tasks/GeometryService",
"esri/tasks/BufferParameters",
"esri/graphic", "esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/renderers/SimpleRenderer",
"esri/config", "esri/Color", "dojo/dom", "dojo/domReady!"
], function(
Map, FeatureLayer,
Query, GeometryService, BufferParameters,
Graphic, SimpleMarkerSymbol,
SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer,
esriConfig, Color, dom
) {
esriConfig.defaults.geometryService = new GeometryService("https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
map = new Map("mapDiv", {
basemap: "streets",
center: [-95.249, 38.954],
zoom: 14,
slider: false
});
// Add the census block points in on demand mode. An outfield is specified since it is used when calculating the total population falling within the one mile radius.
var featureLayer = new FeatureLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/0",{
outFields: ["POP2000"]
});
// census block polygon layer
var featureLayer2 = new FeatureLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/1",{
outFields: ["FIPS"]
});
// Selection symbol used to draw the selected census block points within the buffer polygon
var symbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_CIRCLE,
12,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_NULL,
new Color([247, 34, 101, 0.9]),
1
),
new Color([207, 34, 171, 0.5])
);
featureLayer.setSelectionSymbol(symbol);
// Make unselected features invisible
var nullSymbol = new SimpleMarkerSymbol().setSize(0);
featureLayer.setRenderer(new SimpleRenderer(nullSymbol));
map.addLayer(featureLayer);
var blockSymb = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_NULL,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SHORTDASHDOTDOT,
new Color([105, 105, 105]),
2
), new Color([255, 255, 0, 0.25])
);
var block, buffer;
//setup the buffer parameters
var params = new BufferParameters();
params.distances = [0.5];
params.outSpatialReference = map.spatialReference;
params.unit = GeometryService["UNIT_STATUTE_MILE"];
setTimeout(function(){
var query2 = new Query();
query2.where = "FIPS = '200450004001'";
query2.returnGeometry = true;
query2.outSpatialReference = map.spatialReference;
featureLayer2.queryFeatures(query2, function(response){
map.graphics.clear();
block = response.features[0].geometry;
var graphic = new Graphic(block, blockSymb);
map.graphics.add(graphic);
params.geometries = [block];
esriConfig.defaults.geometryService.buffer(params, showBuffer);
});
}, 2000);
function showBuffer(bufferedGeometries){
var symbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_NULL,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255,0,0,0.65]), 2
),
new Color([255,0,0,0.35])
);
buffer = bufferedGeometries[0];
var graphic = new Graphic(buffer, symbol);
map.graphics.add(graphic);
var query = new Query();
query.geometry = buffer.getExtent();
featureLayer.queryFeatures(query, selectInBuffer);
}
function selectInBuffer(response){
var feature;
var features = response.features;
var inBuffer = [];
// Filter out features that are not actually in buffer, since we got all points in the buffer's bounding box
for (var i = 0; i < features.length; i++) {
feature = features[i];
if(buffer.contains(feature.geometry)){
inBuffer.push(feature.attributes[featureLayer.objectIdField]);
}
}
var query = new Query();
query.objectIds = inBuffer;
// Use an objectIds selection query (should not need to go to the server)
featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function(results){
var totalPopulation = sumPopulation(results);
var r = "";
r = "<b>The total Census Block population within the Census Block buffered by .5 mi is <i>" + totalPopulation + "</i>.</b>";
dom.byId("messages").innerHTML = r;
});
}
function sumPopulation(features) {
var popTotal = 0;
for (var x = 0; x < features.length; x++) {
popTotal = popTotal + features[x].attributes["POP2000"];
}
return popTotal;
}
});
</script>
</head>
<body>
<span id="messages">Wait for FIPS = '200450004001' Query to execute...</span>
<div id="mapDiv"></div>
</body>
</html>
... View more
02-19-2021
11:55 AM
|
1
|
0
|
1668
|
|
POST
|
James, You absolutely wouldn't in your situation. You have already looping through your layer in the webmap and getting the layer you want so you then just set the layer definitionExpression using the method provided on the layerObject. Originally in your code you were attempting to set it using the property "definitionExpression". That will not work you have to set it using the method. lyr.setDefinitionExpression("alertPriority = 'Low'");
... View more
02-19-2021
06:50 AM
|
1
|
1
|
2326
|
|
POST
|
James, It will be a FeatureLayer if the url you provided ends with the sublayer id (i.e FeatureServer/1 or MapServer/0).
... View more
02-19-2021
06:36 AM
|
0
|
3
|
2334
|
|
POST
|
James, What is the layer type (i.e. FeatureLayer or ArcGisDynamicMapServiceLayer)? If it is a Feature layer than you set the definition using the method setDefinitionExpression https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#setdefinitionexpression
... View more
02-19-2021
06:06 AM
|
0
|
5
|
2379
|
|
POST
|
The views constraints has a LODs property. See this thread. https://community.esri.com/t5/arcgis-api-for-javascript/arcgis-api-for-javascript-4-6-referencelayers/td-p/60411
... View more
02-11-2021
09:55 AM
|
1
|
0
|
2489
|
|
POST
|
Richard, Your mistake is that you are decalring this.drawBox = new Drawbox. You can remove that line all together, since you have already declared that div to be a DrawBox in the html template. initDrawBox: function () {
//this.drawBox = new Drawbox;
this.drawBox.setMap(this.map);
this.drawBox.geoTypes = ['POINT'];
this.drawBox._initTypes();
this.drawBox.setPointSymbol(new SimpleMarkerSymbol(this.config.symbols.simplemarkersymbol));
this.drawBox.deactivateAfterDrawing = false;
},
... View more
02-11-2021
09:04 AM
|
0
|
1
|
2124
|
|
POST
|
Mattias, Yes a query to the server is how esri handles Map Image Layer sub layer popups currently. So you would need to do the same. To get the infoTemplate for this sub layer you would use the infoTemplates property of the layer https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates The graphic returned from the queryTask may not have the infoTemplate property set so you will have to set it before you send the graphic to the popup feature array.
... View more
02-05-2021
06:40 AM
|
0
|
0
|
3274
|
|
POST
|
I am not sure how Goggle handles this behind the scenes, but with esri this would cause a very chatty application (meaning requests to the server every time the mouse coordinates are changed).
... View more
02-05-2021
06:02 AM
|
0
|
0
|
2755
|
|
POST
|
To do this in the Identify widget in the widget.js change the onReceiveData function to: onReceiveData: function(name, widgetId, data) {
if(data.message && data.message === "Deactivate_DrawTool"){
this.drawBox.deactivate();
}
if(data.selectResult){
this.identifyFeatures(data.selectResult.result.feature.geometry);
}
},
... View more
02-05-2021
05:31 AM
|
0
|
0
|
2397
|
|
POST
|
Mattias, You set the popups feature array before you show the popup. this.map.infoWindow.setFeatures([your graphic object from your layer]);
... View more
02-05-2021
05:11 AM
|
0
|
0
|
3285
|
|
POST
|
Andrew, Nope the eSearch is only designed to search one specified layer at a time.
... View more
02-04-2021
01:53 PM
|
1
|
0
|
2409
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|