|
POST
|
Asrujit, Thanks for you input. Good to hear that it is working for you. It seems like a great way to go to me so I will keep testing with it. Mele
... View more
04-11-2017
09:43 AM
|
0
|
0
|
1359
|
|
POST
|
Ryan, I am not sure about hosting the data (feature class and related table) in AGOL. I am doing everything in my ArcSDE database (Feature Class, Related Table, Relationship Class) I did find this article. FAQ: Does ArcGIS Online support joins and relates? Mele
... View more
04-10-2017
03:27 PM
|
0
|
0
|
1531
|
|
POST
|
I have a feature class of our Sign Posts and a table of Signs. The signs are related to the SignPosts. I was struggling with trying to update a unique ID in Web AppBuilder so I contacted ESRI. I was looking at a trigger in ArcSDE, but ESRI support told me that that is not supported. The ESRI support Analyst said, why not use the ObjectID? I always thought this was not encouraged because ObjectIDs can change when exporting. Is this a change in thinking from ESRI or was my understanding wrong all along? What are the downsides of using the ObjectID other than the export issues? Using the ObjectID certainly makes life easier for me, but was surprised to hear ESRI suggest this. Thanks, Mele
... View more
04-10-2017
10:02 AM
|
0
|
5
|
2102
|
|
POST
|
It looks like my issue was with the identifyParams.tolerance setting. In my code I am using the Search Widget to get a point from our Addresses Feature Class. I then take that point and perform and IdentifyTask against our Solid Waste Route Feature Classes. The first time through the code, the identifyParams.mapExtent is set to map.extent; which is the full city. The tolerance was selecting nearby polygons. I am not showing the map I am using in my code so maybe this is impacting things, but decreasing the tolerance setting looks to have solved my issue. Mele
... View more
03-14-2017
09:51 AM
|
0
|
0
|
476
|
|
POST
|
I am executing an Identify Task in ArcGIS Javascript. The first time I open my HTML containing this code, I get 'extra' results that should not be in their. When I run the Identify again without reloading the HTML, the results look correct. Is something being cached on the Deferred? How do I clear out any results so that this code executes without returning erroneous records? Thanks, Mele function executeIdentifyTask (event) {
search.set("value", search.selectedResult.name);
var resultItems = [];
dom.byId("info").innerHTML = "";
event.result.feature;
identifyParams.geometry = event.result.feature.geometry;
identifyParams.mapExtent = map.extent;
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
var featureAttributes = event.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response){
return arrayUtils.map(response, function (result) {
var feature = result.feature;
var layerName = result.layerName;
feature.attributes.layerName = layerName;
if (layerName === 'Brush Collection') {
//alert(feature.attributes['Area']);
resultItems.push("<b>" + "Brush Area: " + "</b> " + feature.attributes['Area'] + "<br>");
}
else if (layerName === 'Refuse Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Refuse Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
else if (layerName === 'Recycling Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Recycling Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
//return feature;
dom.byId("info").innerHTML = resultItems.join("");
});
});
}
... View more
03-13-2017
04:41 PM
|
0
|
2
|
805
|
|
POST
|
I that it had to be something simple, but I was too close to it to see it. Thanks Robert for finding the error in my script. It is working now. Mele
... View more
03-13-2017
08:06 AM
|
0
|
0
|
2384
|
|
POST
|
I am getting a TypeError: d.toJson is not a function on IdentifyTask.execute(identifyParams) I am guessing that I am missing something obvious, but the error is not pointing me in the right direction. Thanks, Mele <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">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/esri/css/esri.css">
<script src="https://js.arcgis.com/3.19/"></script>
<style>
html,
body,
#search {
display: block;
cursor: pointer;
margin: 5px;
}
</style>
<script>
require(["esri/map", "esri/geometry/Extent", "esri/tasks/GeometryService",
"dojo/dom", "dojo/on",
"esri/dijit/Search", "esri/layers/FeatureLayer", "esri/tasks/IdentifyTask", "esri/tasks/IdentifyParameters", "dojo/_base/array", "dojo/_base/array", "dojo/domReady!"
], function (Map, Extent,GeometryService, dom, on, Search, FeatureLayer, IdentifyTask, IdentifyParameters, arrayUtils, array) {
var lyrFields;
var URL = "http://maps/arcgis/rest/services/Address_Search_Test/MapServer/0";
var swURL = "http://maps/arcgis/rest/services/My_Services/MapServer";
var identifyTask = new IdentifyTask(swURL);
var identifyParams = new IdentifyParameters();
fl = new FeatureLayer(URL);
esriConfig.defaults.geometryService = new GeometryService("https://maps/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var resultItems = [];
dom.byId("info").innerHTML = "Enter Address";
var map = new Map("Map", {
extent: new Extent({xmin:675912,ymin:886288,xmax:755209,ymax:1060473,spatialReference:{wkid:2223}}),
zoom: 0,
resize: false
});
map.addLayer(fl);
var search = new Search({
sources: [{
featureLayer: fl,
searchFields: ["site_address"],
displayField: "site_address",
exactMatch: false,
outFields: ["site_address"],
name: "Address",
maxResults: 1,
maxSuggestions: 20,
enableSuggestions: true,
minCharacters: 1,
}],
map: map,
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
search.startup();
map.on("load", mapReady);
function mapReady () {
search.on("select-result", executeIdentifyTask);
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [0, 1, 2];
//identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE;
identifyParams.spatialReference = 2223;
identifyParams.width = map.width;
identifyParams.height = map.height;
}
function executeIdentifyTask (event) {
search.set("value", search.selectedResult.name);
resultItems = [];
dom.byId("info").innerHTML = "";
event.result.feature;
identifyParams.geometry = event.result.feature.geometry;
identifyParams.mapExtent = map.extent;
var featureAttributes = event.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response){
return arrayUtils.map(response, function (result) {
var feature = result.feature;
var layerName = result.layerName;
feature.attributes.layerName = layerName;
if (layerName === 'Brush Collection') {
//alert(feature.attributes['Area']);
resultItems.push("<b>" + "Brush Area: " + "</b> " + feature.attributes['Area'] + "<br>");
}
else if (layerName === 'Refuse Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Refuse Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
else if (layerName === 'Recycling Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Recycling Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
//return feature;
dom.byId("info").innerHTML = resultItems.join("");
});
});
}
function getFldAlias(fieldName) {
var retVal = "";
console.info(fl);
array.some(fl.fields, function(item) {
if (item.name === fieldName) {
retVal = item.alias;
return true;
}
});
return retVal;
}
}
);
</script>
</head>
<p>Enter your address in the text box to get more details about your property for the form below:</p>
<div id="search" ></div>
<br />
</div>
<div id="Map" style="display: none;"></div>
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;"></div>
<br />
... View more
03-09-2017
03:21 PM
|
0
|
2
|
4412
|
|
POST
|
I have a Signposts Feature Class with a related table of Signs. Both are editable via our ArcGIS Server Feature Services within an AGOL Web Map when brought in to Web AppBuilder. In the Signposts, I have a field that is a name, and I would like to add that to the related table as well and then concatenate it with a direction field once the user selects the direction from another field. I was thinking of doing this via an ArcSDE trigger in SQL, but ESRI said this is not supported and I couldn't get it to work anyhow. I know I can make some edits in the Edit Widget to add this capability, but I was wondering if any others had some inputs on other ways to accomplish this. Thanks, Mele
... View more
03-08-2017
03:47 PM
|
2
|
1
|
1285
|
|
POST
|
I have created a Trigger in SQL to update a field called asset_id. It does work, but I can't see the value until after I save the edit in ArcMap and stop editing. I am also wanting to see the new asset_id value in ArcGIS WebAppbuilder, but I don't see it until after I exit the app and reopen it. The Feature Class is versioned as in ArcSDE 10.2.2 on SQL Server 2014. I do not have the 'Save Edits to Base' option checked. Why am I not able to see the edits as soon as they are made on an Insert? CREATE TRIGGER [sde].[trg_insert_asset_id] ON [sde].[a98] AFTER INSERT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here DECLARE @id int --PRINT @ReturnValue UPDATE [dbo].[Sequences] SET next_id = next_id + 1 WHERE sequenceName = 'ASSETID' SET @id = (SELECT next_id FROM [dbo].[Sequences] WHERE sequenceName = 'ASSETID') UPDATE s SET Asset_ID = @id FROM preserve.sde.a98 s, inserted WHERE s.OBJECTID = inserted.OBJECTID END
... View more
03-06-2017
09:07 AM
|
0
|
0
|
1379
|
|
POST
|
Ryan, The way I resolved my issue was to add the related table to my web map. As far as the issue you are having, is it with editing? Can you add features or not? You may have to add a proxy on the machine hosting your local version of the Web AppBuilder application if you are using ArcGIS map server layers in your web map like we are. Mele
... View more
03-03-2017
09:11 AM
|
0
|
3
|
1531
|
|
POST
|
Thanks Robert, I swear I tried this yesterday but apparently I was missing something. I tried your code and it is working now, I will experiment further and mark this as the answer if this works for what I am trying to do. So far so good.
... View more
03-01-2017
06:56 AM
|
2
|
0
|
3284
|
|
POST
|
I am an trying to use map.on("load") but when I put it into my code, a blank map shows. Without it, the map displays just fine. I must be missing something simple here, but I can't find the issue. Thanks for any assistance in resolving this. Mele <!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>Search with Suggestion Template</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/esri/css/esri.css">
<style>
html,
body,
#map {
height: 90%;
width: 90%;
margin: 0;
padding: 0;
}
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
#LocateButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
</style>
<script src="https://js.arcgis.com/3.19/"></script>
<script>
require([
"esri/map", "esri/tasks/locator", "esri/dijit/Search", "esri/layers/FeatureLayer", "esri/InfoTemplate","esri/geometry/Extent", "esri/layers/ArcGISTiledMapServiceLayer","esri/dijit/LocateButton","dojo/_base/array", "dojo/dom", "esri/tasks/GeometryService", "esri/tasks/IdentifyTask", "esri/tasks/IdentifyParameters", "dojo/domReady!"
], function (Map, Locator, Search, FeatureLayer,InfoTemplate,Extent,ArcGISTiledMapServiceLayer,LocateButton, array, dom, GeometryService, IdentifyTask, IdentifyParameters)
{
var customBasemap = new ArcGISTiledMapServiceLayer("https://maps/arcgis/rest/services/Base_Map/MapServer");
var map = new Map("map", {
extent: new Extent({xmin:675912,ymin:886288,xmax:755209,ymax:1060473,spatialReference:{wkid:2223}}),
zoom: 0
});
map.on("load", alert("loaded"));
map.addLayer(customBasemap);
esriConfig.defaults.geometryService = new GeometryService("https://maps/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var lyrFields;
var URL = "https://maps/arcgis/rest/services/Parcel_Information/MapServer/25"
fl = new FeatureLayer(URL);
var ParcelsURL = "https://maps/arcgis/rest/services/Parcel_Information/MapServer";
geoLocate = new LocateButton({
map: map
}, "LocateButton");
geoLocate.startup();
var search = new Search({
sources: [
{
featureLayer: fl,
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["parcel_code", "fulladdr", "lot_number", "subdiv_name"],
name: "Parcels",
placeholder: "3629 N Drinkwater",
maxResults: 10,
maxSuggestions: 10,
//Create an InfoTemplate and include three fields
infoTemplate: new InfoTemplate("Parcels", "Address: ${fulladdr}</br>APN: ${parcel_code}</br>Lot Number: ${lot_number}</br>Subdivision: ${subdiv_name}"),
enableSuggestions: true,
enableInfoWindow: false,
minCharacters: 0
},
],
map: map,
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
search.startup();
var selectionMade = search.on("select-result", selectionHandler);
function selectionHandler(evt){
var resultItems = [];
{
var featureAttributes = evt.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
}
dom.byId("info").innerHTML = resultItems.join("");
}
function getFldAlias(fieldName) {
var retVal = "";
console.info(fl);
array.some(fl.fields, function(item) {
if (item.name === fieldName) {
retVal = item.alias;
return true;
}
});
return retVal;
}
});
</script>
</head>
<body>
<div id="LocateButton"></div>
<div id="search"></div>
<div id="map"></div>
</body>
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;">
</html>
... View more
03-01-2017
05:21 AM
|
0
|
7
|
5831
|
|
POST
|
It was something simple that I was overlooking. I needed to add my related table to my AGOL web map. The related table is now editable in Web AppBuilder. Mele
... View more
02-27-2017
08:01 AM
|
0
|
0
|
1531
|
|
POST
|
I have an SDE feature class and an SDE Table that have a relationship class in SDE. I can add related table records and edit them in ArcMap. I published the MXD as a map service and then created an AGOL web map. I can see the related records in my web map on AGOL. When I go to Web AppBuilder (Developer Edition) 2.3 and use the edit widget, I don't see the related table records nor do I see them when viewing the attributes. Is there something I am missing in the configuration to get this to work? Thanks, Mele
... View more
02-25-2017
01:58 PM
|
0
|
6
|
2690
|
|
POST
|
I am working on a story map for our Fire Department. We have 15 Stations, with numbers from 1-16, skipping the number 12 which is reserved for future expansion. How can I skip the number 12 and have my tour numbers reflect the station number 1-11, 13-16? I have tried to put in a 'fake' location for 12, but the tour stops on this point and shows a missing image. Thanks, Mele
... View more
01-27-2017
07:53 AM
|
0
|
1
|
1037
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-20-2025 05:21 AM | |
| 1 | 03-13-2015 04:39 PM | |
| 1 | 09-18-2025 08:33 AM | |
| 1 | 05-12-2025 03:17 PM | |
| 1 | 08-15-2025 03:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|