|
POST
|
Many thanks - so reported over 3 years ago!! So, I don't think I'll hold my breath for a fix anytime soon.
... View more
10-15-2012
02:16 AM
|
0
|
0
|
3642
|
|
POST
|
An alternative I posted here http://forums.arcgis.com/threads/68803-BUG-.visibleLayers-returns-group-layeys?p=240650#post240650 Basically I had moved away from the check boxes I had in my earlier post. Initially I tried "identifyParams.layerIds = dynamicMapServiceLayer.visibleLayers;" but that fails when you have group layyers - see post. So the function I now use is a simple check for layers and groups one function getVisibleLayers() { var visibleLayers = []; var items = dojo.map(dynamicMapServiceLayer.layerInfos, function (info, index) { layerID = info.id; if (info.visible && !info.subLayerIds) { visibleLayers.push(layerID) } }); return visibleLayers } Call in you id task code with v = getVisibleLayers(); identifyParams.layerIds = v; BTW, can anyone else (none esri staff) get the link to the bug report from Shuping Li to work? ACM
... View more
10-15-2012
01:37 AM
|
0
|
0
|
3642
|
|
POST
|
For info, whilst I still think this is a potential bug, until LAYER_OPTION_VISIBLE is fixed, I'm calling my own function to get visible layers excluding group layers - especially as I agree dynamicMapServiceLayer.visibleLayers should return all layers, including group ones, so if it is a bug, it works to start with then breaks, but currently breaks in my favour. function getVisibleLayers() { var visibleLayers = [];
var items = dojo.map(dynamicMapServiceLayer.layerInfos, function (info, index) {
layerID = info.id;
if (info.visible && !info.subLayerIds) {
visibleLayers.push(layerID)
}
}); return visibleLayers
} ACM
... View more
10-15-2012
01:31 AM
|
0
|
0
|
846
|
|
POST
|
For info, the LAYER_OPTION_VISIBLE doesn't work, it is a know bug (see post in http://forums.arcgis.com/threads/68803-BUG-.visibleLayers-returns-group-layeys?p=239911#post239911) I had the same issue as you did today - or rather the exact opposite, ID not working when I could see the features, and it was like John says, all tied up in the map extent, although I passed it the current extent I hadn't also passed the height and width. Doing this sorted my issue.
... View more
10-12-2012
12:22 PM
|
0
|
0
|
3300
|
|
POST
|
Hi I'm cyclying through the results of a find task with a line like this for (j in results[dijit.byId('layerselect').get('value')].feature.attributes) { To get the field names so my datagrid can be built dynamically from the results, regardless of layer the find is run against. Sometimes this works, when it does, the attributes of each found record look like this attributes: ObjectCHARGE_DESC: Array[1]
DATE_REGISTERED: Array[1]
INT_ID: Array[1]
OBJECTID: Array[1]
REFERENCE: Array[1]
REGISTER_ID_VERSION: Array[1]
REGISTER_PART: Array[1]
SHAPE: Array[1]
_0: 0
_RI: true
_S: a
xx: Array[1]
With the field values stored as arrays. When it fails, usually when only one thing is found it looks like this
attributes: Object
DATE_REGISTERED: "20/11/1984"
INT_ID: "191702"
OBJECTID: "7137"
REFERENCE: "S215N/002/SIDM"
REGISTER_ID_VERSION: "1"
REGISTER_PART: "3B"
SHAPE: "Polygon"
xx: "9"
__proto__: Object
With the field attributes just as text strings. my code then breaks with TypeError
arguments: Array[2]
get message: function () { [native code] }
get stack: function () { [native code] }
set message: function () { [native code] }
set stack: function () { [native code] }
type: "non_object_property_load"
__proto__: Error
Any ideas? Or even an easier way to return all the field names of a found record? Cheers ACM
... View more
10-11-2012
08:20 AM
|
0
|
0
|
821
|
|
POST
|
Without setting layerIds works fine, but then it doesn't honour the visible layers. I agree, it makes sense that you get the group IDs back, what doesn't make sense is that after you make a change from the default visibility , the dynamiclayer.visibleLayers returns an array without these in, which is what I want, but if i knew it ALWAYS returned the group Ids I could code them out until LAYER_OPTION_VISIBLE is fixed. Cheers ACM
... View more
10-11-2012
06:30 AM
|
0
|
0
|
846
|
|
POST
|
Hi I *think* this may be a bug, but please be kind if it isn't. I have a Map Service with sublayers in groups - defined in the ArcMap MXD. Because IdentifyParameters.LAYER_OPTION_VISIBLE doesn't work I use identifyParams.layerIds = dynamicMapServiceLayer.visibleLayers; However the first time this is run, the array returned by dynamicMapServiceLayer.visibleLayers contains group0 layer IDs - this causes the ID task to return very odd results. Several results are repeated (I've check the JSON in Fiddler and this is in the actual returned data, not a code glitch on my side) After a layer has been switched on (or off) the returned array by dynamicMapServiceLayer.visibleLayers returns just the real sublayers - not the group Ids and the Id task works fine Alas, this is an internal service so I can't provide the links
... View more
10-11-2012
05:52 AM
|
0
|
3
|
1687
|
|
POST
|
Mmm - I think I see your thinking - I could have the ID task fire on a left click event - this will also help me control the switch on/off this task when I am drawing features or using an area measure tool. Ta
... View more
10-11-2012
04:20 AM
|
0
|
0
|
1435
|
|
POST
|
Hi I'm using the out of box navigaton bar, with a nice zoom box thingy. I also have a default onclick of the map to fire off the identify task. Sometimes when I want to ID a feature, after zooming in using the zoom button, the mouse moves fractionally, and this is read as a zoom event (click drag) and map zooms into a tiny area. Is there any way of setting a threshold for the zoom option, so anything less than X pixels is interpreted as a single click? Cheers ACM
... View more
10-11-2012
01:55 AM
|
0
|
4
|
1884
|
|
POST
|
This may help. I have my site that is Independent of script for the ID popup. It cycles the layers and builds up the template from all exposed field aliases. I also get a "more Info" hyperlink, based on the contents of a particular field - this is defined in the layer description in the MXD You'll see a working example here http://maps2.eastdevon.gov.uk/mapping/assets/ you'll need to go the Planning & Policy group in the TOC (Key and other maps accordion) and select current planning applications to see the "more Info" link in action ACM PS just looked at that, and I really must change that layers symbology, I can hardly see it! This extent has a few examples as of today http://maps2.eastdevon.gov.uk/mapping/assets/?x1=311112&y1=87627&x2=311789&y2=88262
... View more
10-07-2012
01:43 AM
|
0
|
0
|
568
|
|
POST
|
Arrggh, I bookmarked this thread because the demo http://help.arcgis.com/en/webapi/javascript/arcgis/samples/graphics/graphics_extent_query.html mentioned earlier seemed useful, but that is now 404ing. Anyone know what has happened to it?
... View more
10-02-2012
10:58 PM
|
0
|
0
|
2035
|
|
POST
|
A bit of light hearted relief here - Google Chrome screen shot from a generate token request [ATTACH=CONFIG]18104[/ATTACH] 😉
... View more
10-01-2012
07:03 AM
|
0
|
1
|
861
|
|
POST
|
I was having similar issues - 500 server errors. I finally did as was suggested here, loaded the proxy page with a valid URL parameter - I did it on the server so I got the real error messages - I got
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source File: D:\zzzz\test\web.config Line: 4 The web config seems to have been generated from Visual studio when I tried the debugger from there - it isn't required in any way by my site, as it is purely javascript. deleting this file totally clears it all up and it works, Fiddler is showing nice clean requests going via the proxy page. ACM
... View more
10-01-2012
06:29 AM
|
0
|
0
|
4119
|
|
POST
|
I'm not sure of the issue - I'm using the TOC code here http://maps2.eastdevon.gov.uk/mapping/assets/ and it works fine in all browsers now (mine is slightly modified to take visible layers rather than default visibility - I did this before the core code was changed to do this) ACM
... View more
09-29-2012
12:16 AM
|
0
|
0
|
1288
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-28-2025 01:14 AM | |
| 1 | 12-01-2023 06:07 AM | |
| 2 | 11-29-2024 04:32 AM | |
| 1 | 05-28-2024 12:50 AM | |
| 1 | 03-16-2023 06:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|