POST
|
I take that back... I am using .queryRelatedFeatures. I will check into .executeRelationshipQuery too. Thanks Robert
... View more
06-23-2015
01:58 PM
|
0
|
0
|
303
|
POST
|
Folks Is this expected to work? I cannot get it to go. I am guessing I have to create a new RelationQuery through code. Let me know. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Query State Info without Map</title>
<script src="http://js.arcgis.com/3.13/"></script>
<script>
require([
"dojo/dom", "dojo/on",
"esri/tasks/query", "esri/tasks/QueryTask", "dojo/domReady!"
], function (dom, on, Query, QueryTask ) {
var queryTask = new QueryTask("http://localhost:6080/arcgis/rest/services/Ggov/MI_Default/MapServer/7/queryRelatedRecords");
var query = new Query();
query.returnGeometry = false;
query.outFields = ["*"];
query.relationshipId = 0;
query.objectIds = [2, 3];
queryTask.execute(query, showResults);
function showResults(results) {
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
</head>
<body>
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
</body>
</html> Thanks Keith Anderson
... View more
06-23-2015
12:54 PM
|
0
|
3
|
3027
|
POST
|
Friends of the mighty Javascript API- I have been working with this example in my source: History API to track selected feature | ArcGIS API for JavaScript I have been trying many things to keep the Email link to not show up multiple times when it hits query(.actionlist. I am loading a different single layer each Map Click of a Treeview control. Its always named "theLayer". I have tried many other Map events and also checking if the emailLink is already created...without any luck. map.on("layer-add-result", function (result) {
if (result.layer === theLayer) {
console.log('THE layer');
// Add a link into the InfoWindow Actions panel
//if (!dom.byId("emailLink")) {
// domConstruct.create("span", {
// id: "emailLink"
// }, query(".actionList", this.map.infoWindow.domNode)[0]);
//}
var emailLink = domConstruct.create("a", {
"class": "action",
"innerHTML": "Email Map",
"href": "javascript:void(0);"
}, query(".actionList", map.infoWindow.domNode)[0]);
//}, "emailLink", "only"); Any suggestions would be grateful Thanks Keith
... View more
02-06-2015
11:44 AM
|
0
|
1
|
3828
|
POST
|
Thank you again Rene. It worked. I will work to change the store. Keith
... View more
02-03-2015
12:48 PM
|
0
|
0
|
271
|
POST
|
Friends Edit fiddle - JSFiddle jsFiddle link above is simple but I cannot get any field to populate other than OBJECTID. Initially trying to return distinct values from map service, which works in the REST interface, but not for me in code. Any suggestions welcome. Thanks Keith
... View more
02-03-2015
12:04 PM
|
0
|
2
|
3943
|
POST
|
R U r a superstar! It worked. Thanks you so much. Keith
... View more
01-30-2015
01:04 PM
|
0
|
0
|
754
|
POST
|
Thanks for the quick response Rene….but that didn’t work. I did, however, buy your book. I love it. I read it every day along with the dojo Toolkit documentation. Pretty sad life;) Keith
... View more
01-30-2015
12:41 PM
|
0
|
4
|
754
|
POST
|
Friends I have some feature results coming back from a queryTask to populate a grid. This return gives me the correct data var data = arrayUtils.map(results.features, function (feature) { return { "id": feature.attributes["OBJECTID"], "NAME": feature.attributes["PARCELID"] { }); but I would like just the first two fields without explicitly naming them. Something like this? return { "id": feature.attributes[outFields[0]], "NAME": feature.attributes[outFields[1]] } Just can't get it. Any syntax suggestions? Keith
... View more
01-30-2015
12:06 PM
|
1
|
6
|
4410
|
POST
|
Friends The ESRI Javascript example below uses Window.grid and Window.map. They makes a New Map with Window.map and add layers to it with map.addlayer. Confusing...at least for me. Dojo must be involved. dgrid | ArcGIS API for JavaScript Thanks Keith
... View more
01-29-2015
10:47 AM
|
0
|
2
|
4565
|
POST
|
Thank you Ken! Don’t I feel like a dope. I was thinking this would destroy the previous FeatureLayer and display only the new one. Now I have two FeatureLayers displaying. If I put an id: on it would that overwrite it? Suggestions? Thanks again. K
... View more
01-28-2015
01:22 PM
|
0
|
2
|
407
|
POST
|
Friends I want to create and display a single FeatureLayer from a different endpoint each time a tree node is clicked on. The FeatureLayer should include symbology. I pass in the Item.url with onClick and it works on the first pass. The next .onClick is a different item.url and it bombs because it cannot create a new FeatureLayer. TypeError: FeatureLayer is not a constructor Suggestion on how to structure this. Thanks Keith
... View more
01-28-2015
12:53 PM
|
0
|
4
|
4006
|
Title | Kudos | Posted |
---|---|---|
3 | 03-29-2019 01:12 PM | |
1 | 01-30-2015 12:06 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|