|
POST
|
Michael, 1. If you are paying attention to what esri is doing as far as web. Then you will see that WAB is being replaced with EB. EB is the product that is build solely on JS API 4.x, where as WAB is 3.x for 2D and 4.x for 3D. But esri has already stated that new development efforts will not be made for WAB. 2. look on the web. ArcGIS Experience Builder | Build & Deploy Web Apps 3. You can't EB uses react and typescript. 4. Ask question in the EB Space. https://community.esri.com/community/arcgis-experience-builder
... View more
10-13-2020
04:26 AM
|
3
|
0
|
2448
|
|
POST
|
Use the point to query the polygon layer you are wanting to use first and then buffer the result of that query (which will be a polygon).
... View more
10-12-2020
04:35 PM
|
0
|
4
|
2811
|
|
POST
|
Damon, I normally just create a Graphics Layer from the query results on the layers URL. If you are stuck on using the featurelayer select then you need to look into using the jimu.js selection manager class.
... View more
10-12-2020
04:28 PM
|
0
|
7
|
4486
|
|
POST
|
Here is a sample for that: <!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>Drop Down Test</title>
<link rel="stylesheet" href="http://js.arcgis.com/4.17/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/4.17/esri/css/main.css">
<script src="http://js.arcgis.com/4.17/"></script>
<style>
html,
body,
#mainWindow {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #FFF;
font-family: "Trebuchet MS";
}
#header {
height: 32px;
overflow:visible;
border:none;border-bottom: 3px solid #CC9900;
font-family: Windows;
font-size:14pt;
color: #FFFFFF;
background: #000000;
z-index: 99;
line-height: 32px;
}
.searchDiv {
float: right;
z-index: 99;
}
#viewDiv {
width: 100%;
height: calc(100% - 32px);
border: none;padding:0px;
margin: 0px;
}
</style>
<script>
var map;
require([
"esri/Map",
"esri/views/MapView",
"dojo/on",
"esri/tasks/support/Query",
"esri/layers/FeatureLayer",
"dojo/store/Memory",
"dojo/_base/array",
"dojo/_base/lang",
"esri/request",
"dojo/parser",
"dijit/registry",
"esri/widgets/Search",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/form/Button",
"dijit/form/ComboBox",
"dojo/domReady!"
], function(
Map, MapView, on, Query, FeatureLayer, Memory, array, lang, esriRequest, parser, registry, Search
) {
parser.parse();
map = new Map({
basemap: "topo"
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [-98.1883, 37.0868],
zoom: 5
});
var searchWidget = new Search({
view: view,
container: "searchDiv"
});
esriRequest('http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3/query?where=1%3D1&outFields=STATE_NAME&returnGeometry=false&orderByFields=STATE_NAME&returnDistinctValues=true&f=json',
//esriRequest('http://services9.arcgis.com/2882Ggz2LB0PQSyP/arcgis/rest/services/school/FeatureServer/0/query?where=1%3D1&outFields=NAME_OF_THE_SCHOOL%2CEMAIL_ADDRESS_OF_THE_SCHOOL&returnGeometry=false&f=json',
{
responseType:'json',
timeout:15000
}).then(lang.hitch(this,function(response){
var store2 = new Memory({data:[]});
registry.byId("stateSelect").set('store',store2);
var data = array.map(response.data.features,lang.hitch(this,function(feat, index){
var name = feat.attributes.STATE_NAME;
var value = feat.attributes.STATE_NAME;
// var diname = feat.attributes.NAME_OF_THE_SCHOOL;
// var divalue = feat.attributes.EMAIL_ADDRESS_OF_THE_SCHOOL;
var dataItem = {
id:index,
name,
value:value
};
return dataItem;
}));
store2 = new Memory({data:data});
registry.byId("stateSelect").set('store',store2);
}));
var States = new FeatureLayer({
url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",
outFields: ["*"]
});
var Counties = new FeatureLayer({
url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2",
outFields: ["*"]
});
app = {
zoomRow: function(id, which){
var cb = registry.byId("stateSelect");
console.info(cb.item.value);
var sym = {
type: "simple-fill", // autocasts as new SimpleFillSymbol()
color: [255, 0, 0, 0.5],
outline: { // autocasts as new SimpleLineSymbol()
color: [128, 128, 128, 1],
width: "0.5px"
}
}, gra;
view.graphics.removeAll();
var query = States.createQuery();
var thePoly, theExtent;
if(which == "State"){
query.outFields=[];
query.outSpatialReference = view.spatialReference;
query.where = "STATE_NAME='" + (id).toString() + "'";
console.info(query.where);
query.returnGeometry = true;
States.queryFeatures(query).then(function(response){
gra = response.features[0];
gra.symbol = sym;
view.graphics.add(gra);
thePoly = gra.geometry;
theExtent = thePoly.extent.expand(2); //Zoom out slightly from the polygon's extent
view.goTo(theExtent);
});
esriRequest("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2/query?where=STATE_NAME='" + id.toString() + "'&outFields=NAME&returnGeometry=false&orderByFields=NAME&returnDistinctValues=true&f=json",
{
responseType: "json",
timeout:15000
}).then(lang.hitch(this,function(response){
var store2 = new Memory({data:[]});
registry.byId("countySelect").set('store',store2);
var data = array.map(response.data.features,lang.hitch(this,function(feat, index){
var name = feat.attributes.NAME;
var dataItem = {
id:index,
name:name
};
return dataItem;
}));
store2 = new Memory({data:data});
registry.byId("countySelect").set('store',store2);
document.getElementById('countySelect').value = "Select County";
}));
}else if(which == "County"){
query = Counties.createQuery();
var county = (id).toString();
county = county.replace(" County", "");
query.where = "NAME='" + county + "'";
query.returnGeometry = true;
query.outFields=[];
query.outSpatialReference = view.spatialReference;
Counties.queryFeatures(query).then(function(response){
gra = response.features[0];
gra.symbol = sym;
view.graphics.add(gra);
thePoly = gra.geometry;
theExtent = thePoly.extent.expand(2); //Zoom out slightly from the polygon's extent
view.goTo(theExtent);
});
}
}
};
});
</script>
</head>
<body class="claro">
<div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false">
<div id="header" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> Select a State/County and zoom to it on the map:
<input id="stateSelect" data-dojo-type="dijit/form/ComboBox" value="Select State" onchange="app.zoomRow(document.getElementById('stateSelect').value, 'State');" data-dojo-props="maxHeight: 200" />
<input id="countySelect" data-dojo-type="dijit/form/ComboBox" value="Select County" onchange="app.zoomRow(document.getElementById('countySelect').value, 'County');" data-dojo-props="maxHeight: 200" />
<input type="hidden" name="stateabbr" id="stateabbr" />
<div id="searchDiv" class='searchDiv'></div>
</div>
<div id="viewDiv" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left'"></div>
</div>
</body>
</html>
... View more
10-12-2020
04:25 PM
|
1
|
1
|
1431
|
|
POST
|
Honestly the simple answer is if you wanting to use 3D and 4.x then you need to forget WAB and start looking at experience builder. There is no available widget in WAB.
... View more
10-12-2020
11:16 AM
|
2
|
2
|
2448
|
|
POST
|
Michael, The problem is that the browser is caching the apps config.json. Here is a thread where this is discussed in detail. https://community.esri.com/thread/158241
... View more
10-08-2020
05:16 AM
|
0
|
1
|
1394
|
|
POST
|
honestly I am not sure the route you need to take. It is working the way it is intended /designed to work. You are wanting it to work in a way that is unconventional. Wanting to make the popup appear for all three discrete geometries as if they were one entity is not something that the api designed to do normally.
... View more
10-07-2020
08:04 AM
|
1
|
0
|
3552
|
|
POST
|
Cam, By default the map click location will try and find features that intersect. That's the way it is designed to work. The selectedFeaturesIndex is only going to have the index of the current selected feature. If the popup only has one feature that that is all it has and changing the index will not matter.
... View more
10-06-2020
11:37 AM
|
1
|
0
|
3552
|
|
POST
|
Cam, Well that make perfect sense to me. When you click in the center you have 3 polygons that intersect the mouse click. When you click inside the second ring from the middle you have 2 polygons that intersect the mouse click and when you click inside the outer ring you only have one polygon that intersects the mouse click.
... View more
10-06-2020
11:02 AM
|
1
|
2
|
3552
|
|
POST
|
Nils, OK, you seem to be unfamiliar with the 4.x APIs way of watching properties. Just use watchUtils to watch the activeWidget using the whenDefined method.
... View more
09-30-2020
07:06 AM
|
1
|
1
|
3886
|
|
DOC
|
James, There is a configuration setting for that. "String search that uses contains will search for each word separately in query" https://gis.calhouncounty.org/WAB/V2.13/widgets/eSearch/widgets/eSearch/help/eSearch_Help.htm#ESRI_STEP_24
... View more
09-29-2020
10:58 AM
|
0
|
0
|
23597
|
|
POST
|
Will, There is no such property as "outSR" on the query class. You need to use the outSpatialReference property.
... View more
09-29-2020
09:31 AM
|
2
|
0
|
2793
|
|
POST
|
Michel, No you do not wait for the layer to be added before you apply those properties. After you use the layer constructor you apply those properties before the layer is added to the map. var myfl = new FeatureLayer("your url", {...});
myfl_titleForLegend = myfl.title = myfl.name = 'blah';
this.map.addLayer(myfl); You can find this property ("_titleForLegend") in the otb AddData widget and in my eSearch Widget. https://community.esri.com/docs/DOC-1731-enhanced-search-widget-version-213-092519
... View more
09-29-2020
09:28 AM
|
0
|
1
|
3263
|
|
POST
|
var Buffers = geometryEngine.geodesicBuffer(Point, 20, "meters", true); Buffer = Buffers[0];
... View more
09-29-2020
08:27 AM
|
1
|
0
|
2241
|
|
DOC
|
Naty, Not sure what you are asking. I am not aware of any "filter a category of results" ability in the query widget.
... View more
09-29-2020
06:01 AM
|
0
|
0
|
23597
|
| 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
|