|
POST
|
ok thanks again Thejus -- something came up I'll get back on this tomorrow and post up what we find...
... View more
09-03-2015
01:47 PM
|
0
|
0
|
1872
|
|
POST
|
I think you're right, let me run a test on that and get back to you
... View more
09-03-2015
01:19 PM
|
0
|
1
|
1872
|
|
POST
|
So for the past 2 years or so we've been using our local point locator in the geocoder widget as a way to fire a query function that returns geometry and atttibute results from the task. For example, when using a geocoder we tell the on select event to to fire a 'showLocation' function that takes the sr and geometry from the geocoded point, creates and sets a graphic point to the event, adds it to the map. We then assign that geometry to a query that performs a select with whatever feature layer or layers we choose then pass the query results into the maps' infowindow (we use a modified side-panel popup instead of the defualt): var locatorUrl = "https://ags2.scgov.net/arcgis/rest/services/WebPointLocator/GeocodeServer";
var scgGeocoder = [{
url: locatorUrl,
name: "WebPointLocator",
singleLneFieldName: "Single Line Input",
placeholder: "Find an Address"
}];
var geocoder = new Geocoder({
map : mapMain,
autoComplete : true,
autoNavigate : false,
arcgisGeocoder : false,
geocoders : scgGeocoder
}, dom.byId("divSearch"));
function showLocation(event) {
mapMain.graphics.clear();
qPoint = event.result.feature.geometry;
var ptSymbol = new SimpleMarkerSymbol().setStyle(
SimpleMarkerSymbol.STYLE_SQUARE).setColor(
new Color([255,0,0,0.5])
);
var graphicPoint = new Graphic(qPoint, ptSymbol);
mapMain.graphics.add(graphicPoint);
var queryParcels = new Query;
queryParcels.geometry = qPoint;
var parQuery = lyrParcels.selectFeatures(queryParcels,FeatureLayer.SELECTION_NEW); //is a deferred
mapMain.infoWindow.setFeatures([parQuery]); //comment out if passing query result to next function
mapMain.infoWindow.show(qPoint); //comment out if passing query result to next function
//center
if (qPoint !== undefined) {
mapMain.centerAndZoom(qPoint, 13); //7 for sph
mapMain.graphics.redraw();
}
lyrParcels.on("selection-complete", showZones);
} Suppose we want to return not only the parcels geometery and attributes, but also the geometry and atributes from whatever layers that parcel intersects. We simply comment out the infowindow and add an on selection-complete event for our parcels layer and pass the reuslts into a second query function that uses the extent of the selected poly. In this case we are using the parcel extent to return whatever floodzone(s) intersect: function showZones(results) {
qPoly = results.features[0].geometry;
// results of first layer returned by point intersect query above
console.log(qPoly);
var queryNewZones = new Query;
queryNewZones.geometry = qPoly.getExtent();
//.getCenter(); if returning a grid poly
var newFloodQuery = lyrNewZones.selectFeatures(queryNewZones, FeatureLayer.SELECTION_NEW);
var queryNewFirm = new Query;
queryNewFirm.geometry = qPoly.getExtent();
//evt.result.feature.geometry;
var newFirmQuery = lyrNewFirm.selectFeatures(queryNewFirm, FeatureLayer.SELECTION_NEW);
//deferred evacQuery
mapMain.infoWindow.setFeatures([parQuery, newFloodQuery, newFirmQuery]); //parQuery
mapMain.infoWindow.show(qPoint);
//show the parcel
mapMain.infoWindow.show(qPoly);
//show the zones - complete the loop
lyrNewZones.on("selection-complete", returnNull);
}
function returnNull() {
var retVal = null;
} Pretty straightfoward (now - not initally!). Here is a fully working app if you want to see it: https://ags2.scgov.net/SarcoFlood/ you can use 1660 Ringling Blvd as the address. Here is our problem: We want to update this workflow to take advantage of the new search widget so that users can search not only by address but say also by a PID. Of course the search has different on events, but the main problem is that when using the feature layer source as the searchs' activeSource, the result from the first query is not cleared from our info window even though the first query's geometry and attributes are removed. Console logs do show that a new parcel has been selected. The problem does not occur when the activeSource comes from our locator. This is what @michael Stranovsky and I have come up with so far: /*Search */
var s = new Search({
enableButtonMode: true, //this enables the search widget to display as a single button
enableLabel: false,
enableInfoWindow: true,
showInfoWindowOnSelect: true,
map: mapMain,
sources: []
}, "divSearch");
var sources = s.get("sources");
sources.push({
locator: new Locator("https://ags2.scgov.net/arcgis/rest/services/WebPointLocator/GeocodeServer"),
singleLineFieldName: "Single Line Input",
name: "Search by Address",
localSearchOptions: {
minScale: 300000,
distance: 10
},
placeholder: "Search by Address",
maxResults: 3,
maxSuggestions: 8,
enableSuggestions: true,
minCharacters: 0,
});
sources.push({
featureLayer: lyrParcels,
searchFields: ["ACCOUNT"],
displayField: "ACCOUNT",
exactMatch: false,
outFields: ["ACCOUNT", "Shape_Area"],
name: "Search by PID",
placeholder: "ex: 2027070041",
maxResults: 6,
maxSuggestions: 6,
//Create an InfoTemplate and include three fields
infoTemplate: plyParcels, //defined previously
enableSuggestions: false,
minCharacters: 0
});
//Set the sources above to the search widget
s.set("sources", sources);
s.startup();
console.log(sources);
s.on("select-result", showZones); In this case we use the searches' on select-result event to pass in the gemoetry but things get really complicated because we first havet to account for the activeSource - whether from a locator or a featureLayer - and the fact that the search widget is (1) already creating a point graphic if a locator source and (2) that the search is already performing a find and query tasks (I think). Here, when the source is our parcel feature layer, we are essentially performing the query twice as the search is already performing it once. When we tried setting the evt geometry to the extent of the return itself, the querys' default intersects method returned several parcels, so we set the return to get the center of the extent, and then perform both the parcel and intersecting layer query and display the results: function showZones(evt) {
//lyrParcels.clearSelection();
mapMain.infoWindow.clearFeatures();
//mapMain.infoWindow.setFeatures([]);
//qPoint = null;
//qPoly = null;
//lyrParcels.clearSelection();
if (s.activeSource.name == "Search by PID") {
//console.log(evt);
qPoly = evt.result.feature.geometry;
///qPoint = evt.result.extent.getCenter();
//console.log("qPoint Parcel: ");
//console.log(qPoint);
var queryParcels = new Query;
queryParcels.geometry = qPoint;
var parQuery = lyrParcels.selectFeatures(queryParcels, FeatureLayer.SELECTION_NEW);
console.log(parQuery);
var queryNewZones = new Query;
queryNewZones.geometry = qPoly.getExtent();
var newFloodQuery = lyrNewZones.selectFeatures(queryNewZones, FeatureLayer.SELECTION_NEW);
mapMain.infoWindow.setFeatures([parQuery, newFloodQuery]);
mapMain.infoWindow.show(qPoly);
//console.log(lyrParcels.getSelectedFeatures());
//console.log(results);
} else if (s.activeSource.name == "Search by Address") {
//console.log(evt);
qPoint = evt.result.feature.geometry;
//console.log("qPoint Address: ");
//console.log(qPoint);
var queryParcels = new Query;
queryParcels.geometry = qPoint;
var addQuery = lyrParcels.selectFeatures(queryParcels, FeatureLayer.SELECTION_NEW);
console.log(addQuery);
/*parQuery.then(function(features){
console.log("select features result: ", features);
qPoly = features[0].geometry;
console.log(qPoly);
});*/
//var qPoly = lyrParcels.on("selection-complete", getParcelExtent);
//console.log(qPoly):
lyrParcels.on("selection-complete", function (result){
qPoly = result.features[0].geometry;
var queryNewZones = new Query;
queryNewZones.geometry = qPoly;
var newFloodQuery = lyrNewZones.selectFeatures(queryNewZones, FeatureLayer.SELECTION_NEW);
mapMain.infoWindow.setFeatures([addQuery, newFloodQuery]);
mapMain.infoWindow.show(qPoly); //previous addQuery
});
//var queryNewZones = new Query;
//queryNewZones.geometry = pPoly
//var newFloodQuery = lyrNewZones.selectFeatures(queryNewZones, FeatureLayer.SELECTION_NEW);
//var addQ = [parQuery, newFloodQuery];
//console.log(lyrParcels.getSelectedFeatures());
//mapMain.infoWindow.setFeatures([parQuery, newFloodQuery]);
//newFloodQuery
//mapMain.infoWindow.show(qPoint);
} else {
console.log("In else");
}
} Again, the result from the first query is not cleared from our info window dispaly even though the first query's geometry and attributes are removed. Console logs do show that a new parcel has been selected. The first-result of the parcel query and does clear from the infoWindow display when we enter an address and then enter a subsequent address. The first-result does This post is related to: How can I use a variable that is set in a function on an on event outside of the event? posted by @michael Stranovsky just the other day in that he is trying to figure out if it is a scope issue that is preventing the infoWindow from clearing the displayed result- Thanks- David
... View more
09-03-2015
10:34 AM
|
1
|
6
|
4458
|
|
DOC
|
Robert - In testing with another layer containing subtypes 1-n (ie no 0 value) I am finding that the results panel and popup both display coded value descriptions. However, the subtype value is displayed as it's integer value and not its description in both panel and popup... David
... View more
09-02-2015
08:07 AM
|
0
|
0
|
7722
|
|
DOC
|
Robert: yes I believe so. Version 1.2.0.1 dated 8/24/15. Yes, the widget results and widget popup do not display the descriptions, just the code. For this particular layer, the subtypes do begin at 0 - could that be causing an isssue? Here is the rest endpoint if you have time to take a look . . . Layer: ScrubJ ay Habitat (ID: 3) David
... View more
09-02-2015
07:14 AM
|
0
|
0
|
7722
|
|
DOC
|
Hi Robert- Is anyone reporting any issues with the display of coded value domain descriptions as returned in the eSearch when the search layer url is pulling from an endpoint that contains subtypes? I have a simple habitat-type layer that returns codes only in both the results dgid and popup. Is there any other configuration steps I can take to enable attribute values to display the domain descriptions when the seach layer has subtypes? Thanks- David
... View more
09-01-2015
03:26 PM
|
0
|
0
|
7722
|
|
POST
|
No sorry I haven't looked at anything mobile project center wise in many months. We do have a mothballed project, but this group wants to wait for collector for windows. What I found works best is when you are downloading a project from the client mobile app is to make sure the download settings (when connecting to and downloading a project from the mobile content server) match the upload settings used when the project was uploaded to your mobile content server from your desktops' mobile project center. I am able to download and sync edits back to my mobile content server after I provide my ArcServer login and password via the download settings in in the mobile app. Hope this helps- David
... View more
08-31-2015
03:17 PM
|
0
|
0
|
3692
|
|
DOC
|
Hi Robert- In the current build, are others experiencing any issues with related records not displaying in the Attribute Table after clicking show related either in the popup or from the attribute table results? Thanks- David
... View more
08-25-2015
09:53 AM
|
0
|
0
|
7722
|
|
POST
|
I should add that I have never and would never try a reorder unless the database is compressed so as to eliminate any impact to states tables
... View more
08-22-2015
12:08 PM
|
0
|
0
|
6049
|
|
POST
|
Well I figured it out. I was allowing dynamic re-ordering of my layers on my service and as soon as a layer is moved up or down within that service the relationship index position is no longer valid and therefore your related information cannot display. Kind of a rookie mistake, I should have known better. Still, I think that if ArcServer is going to allow dynamic re-ordering and symbology changes then there should be a mechanism to enable the same functionality when related tables are present in map services. -David
... View more
08-22-2015
09:26 AM
|
2
|
0
|
899
|
|
POST
|
I completely understand, but I've never had an issue. I've performed this operation under both binary and sql geometry storage schemas and all system attributes are always in place, both populated and not. Typically we'll move say a globalid column to the end of the line, but it's not something we take lightly or do often but does work. I will always perform a save in the order of business, add, archive. -David
... View more
08-22-2015
09:17 AM
|
0
|
1
|
6049
|
|
POST
|
Hmm, well it sounds to me like you all have firewall, proxy and/or self-signed certificate and/or front-end certificate issues in your environment. For example for us, we don't enable any individual windows firewalls on any individual servers as our larger IT group sets all that at our enterprise proxy. I'd look into all of your security settings. Sorry i can't be of more help David
... View more
08-21-2015
01:39 PM
|
1
|
2
|
2298
|
|
POST
|
Like Vince says not t without dropping the table and replacing it with a table with columns in a different order. You can go into designer in SSMS and re-order your columns as you see fit. When you have SSMS configured to allow saving changes that require a table to be dropped it's fairly straightforward. If you reorder a business table that is versioned or versioned and archived make sure you apply the exact same change to both the A and H tables. We try not to do this too often. David
... View more
08-21-2015
09:54 AM
|
0
|
7
|
6048
|
|
POST
|
so when you go into server manager are you logging into your arcgis online portal via the 'sharing' button and then signing into agol? I ask because for us internally we use https://machinename.domain:6443/..... as the rest and services directory paths whereas externally through web adaptor the site address is https://ags2.scgov.net. So when I publish a service up to our server, I am using our internal (i.e not going through the web adaptor) path. I then go into manager, sign into agol using the external address, and then tab back over to manage services and update sharing on a service I want to see in agol... hope this helps- David
... View more
08-21-2015
09:46 AM
|
0
|
4
|
2298
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-27-2026 01:27 PM | |
| 2 | 03-25-2026 06:29 AM | |
| 2 | 03-04-2026 11:14 AM | |
| 1 | 02-26-2026 09:46 AM | |
| 1 | 10-30-2025 11:25 AM |
| Online Status |
Online
|
| Date Last Visited |
4 hours ago
|