|
POST
|
I thought, too, that the relationshipQuery should be going through multiple related overlapping features. After picking through the code, I found that it only does a relationship query on the first feature in the list of selected features.
...
relatedDocQuery.objectIds = [records[0].attributes.OBJECTID]; // only pulling first element from records array
featureLayer.queryRelatedFeatures(relatedDocQuery, function (relatedRecords) {
var fset = relatedRecords[records[0].attributes.OBJECTID]; // again pulling first element from records array
var items = dojo.map(fset.features, function (feature) {
return feature.attributes;
});
...
To get all the objectIds, you would do something more like this.
relatedDocQuery.objectIds = dojo.map(records, function (record) { return record.attributes.OBJECTID; });
I'll have to come back later and add code to list all the result. in the items.
... View more
03-22-2012
07:24 AM
|
0
|
0
|
481
|
|
POST
|
I have a map with a Tiled and a Dynamic layer. I have a query that queries one of the features on the dynamic layer, puts the results in a table, including a link that zooms to the extent of each feature returned. Basically, I use map.setExtent() on the extent of the feature. It works pretty good. Here's my problem. I have a polygon that's much longer North/South than East/West (Utility repair along a north/south road, for example). when I run map.setExtent() on the extent of the polygon, it centers on the polygon and mostly shows it, but because of the tiled layer service, it cuts off the northern and southern tips of the polygon. When I use the identify task and the popup tool on the same polygon, and click the zoom to link, it zooms out to the next lower LOD on the tiled map service, which shows the entire polygon just fine. Any idea how I can implement this with my query results?
... View more
10-14-2011
07:10 AM
|
0
|
2
|
1361
|
|
POST
|
I could think of two ways you could do this. You could create an infoTemplate or Popup with the link in an anchor tag. You would use an identify task, query task, or feature layer to make it visible Or you could set up an onClick event on the map that queries the feature with the [anchor_cod] as the outfield. When you get the results, run window.open() on that results attribute.
... View more
10-14-2011
06:42 AM
|
0
|
0
|
490
|
|
POST
|
Quick question. Are you also using the sample code for the loading icon/loading text? (Loading Icon, Loading Text)? They disable map navigation when the loading icon runs, but then enable it right afterward. If you're using the zoom in/zoom out tool, which normally disables panning, this overrides the zoom in/zoom out disabling of pan, therefore you pan and zoom at the same time. Look at what else runs map.enableMapNavigation(). See if removing the map.disableMapNavigation() and map.enableMapNavigation() in those other areas would help.
... View more
10-14-2011
06:16 AM
|
0
|
0
|
565
|
|
POST
|
Found it. I was using the Show Loading Icon example, and apparently map.enableMapNavigation() completely undoes any specific map navigation changes like map.disableDoubleClickZoom() or map.disablePan().
... View more
08-16-2011
11:41 AM
|
0
|
0
|
542
|
|
POST
|
Does anybody know what could be causing my application to also pan when I use the zoom in/zoom out navigation tools? My app uses both navigation and drawing toolbars. The code's kinda chunky (all in one application), or else I would post it. Thanks.
... View more
08-16-2011
10:30 AM
|
0
|
2
|
859
|
|
POST
|
I'm trying to create a geocoding service using a parcel feature class and a tax roll table. Parcel feature has the location, and the tax roll has the address and street data for a single house geocoding search. The parcels and the tax roll are usually joined by parcel id number. I noticed that the geocoding uses either alternative names or alias tables. Is there any way to use the parcel features and the tax roll table for geocoding without having to merge them into a new "parcel with addresses" feature? I'm using ArcGIS 10.0, ArcCatalog, and will make the address locator available through ArcGIS Server as part of a composite address locator, if any of that helps.
... View more
08-08-2011
08:00 AM
|
0
|
8
|
1694
|
|
POST
|
on an HTML form, if you don't want the button to submit the inputs to a server-side script (a php page for instance), you should change the onclick on the button to the following: <input type="BUTTON" OnClick="queryEvents(); return false;" class="input" value="Continue" /> Hope that helps.
... View more
07-22-2011
10:06 AM
|
0
|
0
|
655
|
|
POST
|
I'm using the legend dijit used in http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/widget_legendvisible.html, and I'm having an issue. I have a map with multiple group layers, and I'm trying to style my group layer headings a certain way, using the esriLegendGroupLayer css class. When the legend renders, the first group layer title heading doesn't have the group layer style, but the other group layer headings do. Looking at the HTML, I noticed that the first _group div doesn't have the esriLegendGroupLayer class, but all the other ones do.
... View more
05-26-2011
10:54 AM
|
0
|
0
|
751
|
|
POST
|
It may depend on when you set the IdentifyParameters. If you set the extent and visibility options at the beginning of your session, then zoom to another location and turn on/off layers, the parameters won't be correct. If you set those options during the click event, the parameters are more up-to-date, and the identifyTask result should be closer to what you want. --Ken
... View more
05-25-2011
05:52 AM
|
0
|
0
|
431
|
|
POST
|
thanks for the reply, will have a crack at it next week. I see from the code that it will retrieve the sublayers....still a bit unsure how to get the check boxes in the first TOC and not in the second one, will do some investigation. thanks again. For creating the checkboxes, I'd look at the example at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/map_dynamiclayerlist.html. It works well, except if you have sublayers. That's why I use my code to get the bottom-most sublayers. I'll put my explanation below, if you want it. Explanation: Say you have an .mxd with this kind of layer arrangement: Group Layer 1 --- Layer 1 --- Layer 2 --- Layer 3 In ArcMap, you need both the Group Layer 1 and Layer 1 checked to view Layer 1. However, when you publish this map to ArcGIS Server, and the buildLayerList/updateLayerVisibility example linked above, it does something different. Published on ArcGIS Server, your map Service will look like this: [0] Group Layer 1 [1] Layer 1 [2] Layer 2 [3] Layer 3 Now, if you've created checkboxes for all four, and they're checked for Group Layer 1 and Layer 1, this is passed to updateLayerVisibility, which calls layer.setVisibleLayers([0, 1]). This treats Group Layer 1 and Layer 1 separately, and will show not just layer 1, but layers 2, 3, and another layer 1 as well. If you turn off Group layer one in your service, it will only show Layer 1. That's why I only create checkboxes for the bottom-most layers when I have an mxd with layer groups.
... View more
05-20-2011
07:15 AM
|
0
|
0
|
578
|
|
POST
|
Thanks for your help, I think I'm getting close now. Here is the code I am using: After I click the download button on my cart I get an Error message saying: Error: esri.config.defaults.io.proxyUrl is not set I've googled this and looked for help but I'm not sure how to get around this and what causes it. Any ideas? This usually happens when the server returns something too big for a normal request to handle. Here's the link to set up a proxy page on your server. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/ags_proxy.htm
... View more
05-19-2011
09:43 AM
|
0
|
0
|
767
|
|
POST
|
Hi Just working on getting a nice legend for my service. I have followed the instructions and the legend works fine however i require checkboxes for each sublayer in the service instead of the higher layer. Does anyone know how i would be able to achieve this? I would like to do it automatically so i dont need to manually change anything when using the code in another application for example. I just would like it to loop through, see sublayers and add the option for a checkbox to turn it on/off, unsure why this is not included as it seems so common for end users to do??? thanks Try something like this:
function getSubLayers(layer) {
var infos = layer.layerInfos, info, i, il, subLayerArray;
for (i=0, il = infos.length; i<il; i++) {
info = infos;
if (!info.subLayerIds) { // if the layer doesn't have a subLayer, ...
subLayerArray.push(info.id); // ...function adds the layer's id to an array
}
}
return subLayerArray;
}
... View more
05-19-2011
09:27 AM
|
0
|
0
|
578
|
|
POST
|
According to the api reference for geoprocessing at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/geoprocessor.htm, gp.submitJob() takes a json object for the input Parameter. Try something like this:
var param = {inputLayer: "C:\arcgisserver\scotturb\scotturb_lines_ida_half_test.shp"}
var gp = new esri.tasks.Geoprocessor("http://wk2658/ArcGIS/rest/services/GP/GP/GPServer/server_schematic_model");
gp.submitJob(param);
Check your gp's input parameters and use those names when setting your parameter object.
... View more
05-17-2011
08:05 AM
|
0
|
0
|
1864
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-05-2013 11:45 AM | |
| 1 | 05-20-2015 08:05 AM | |
| 2 | 03-24-2017 07:11 AM | |
| 2 | 03-28-2018 07:45 PM | |
| 1 | 07-03-2018 07:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|