POST
|
Related to this issue is how identify works with parent/sublayers (also not documented well in the API). For example, if I am showing a parent layer (show:2) with multiple sublayers and do an identify on the parent layer what am I guaranteed to get back? I would assume all sublayer attributes that intersect with my identify geometry. I don't understand these next identify requests based on the API. Why do they not all give me the same results? Is there something wrong with the service?: identify on parent layer returns nothing (but something is there)? http://egisws02.nos.noaa.gov/ArcGIS/rest/services/biogeo/GAP_BUIS/MapServer/identify?geometryType=esriGeometryEnvelope&geometry=-7192535.6868029,2011696.7347169,-7191771.3165201,2012461.1049996&sr=3857&layers=visible:15&tolerance=0&mapExtent=-7202013.8783089,2005791.9742827,-7184911.0932325,2019455.0930867&imageDisplay=1315,845,72&f=json&returnGeometry=false&pretty=true identify on only the child layer returns the correct thing http://egisws02.nos.noaa.gov/ArcGIS/rest/services/biogeo/GAP_BUIS/MapServer/identify?geometryType=esriGeometryEnvelope&geometry=-7192535.6868029,2011696.7347169,-7191771.3165201,2012461.1049996&sr=3857&layers=visible:16&tolerance=0&mapExtent=-7202013.8783089,2005791.9742827,-7184911.0932325,2019455.0930867&imageDisplay=1315,845,72&f=json&returnGeometry=false&pretty=true identify on parent and child layer returns duplicates? http://egisws02.nos.noaa.gov/ArcGIS/rest/services/biogeo/GAP_BUIS/MapServer/identify?geometryType=esriGeometryEnvelope&geometry=-7192535.6868029,2011696.7347169,-7191771.3165201,2012461.1049996&sr=3857&layers=visible:15,16&tolerance=0&mapExtent=-7202013.8783089,2005791.9742827,-7184911.0932325,2019455.0930867&imageDisplay=1315,845,72&f=json&returnGeometry=false&pretty=true any help would be appreciated
... View more
12-01-2011
11:46 AM
|
0
|
0
|
153
|
POST
|
Hello, I'm trying to find a detailed answer about how the REST API handles requests to layers with sublayers (i'm using the service at the bottom of this post as an example). 1) It seems that a request to the parent layer (2) will automatically return all the parent's sublayers. Is this always true? 2) Is this true even if the children of the parent have their default visibility set to false and only the parent's id is requested using show (show:2)? The API documentation doesn't get into these specifics and I would like to find where it is documented. http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/2
... View more
12-01-2011
07:44 AM
|
0
|
1
|
602
|
POST
|
Hello, I can't find an explicit answer in the REST API docs, but the Export Map operation doc makes it seem like a MapServer service (regardless of the advertised spatial ref ) can return images of any spatial ref I pass in with the imageSR param. Is that true? Are there no limits on this even if the advertised projection and requested imageSR have different datums? If someone could point be to an explicit part of the documentation that explains this support in detail I'd be a happier camper. Thanks Greg
... View more
11-03-2011
06:01 PM
|
0
|
3
|
2969
|
POST
|
I'm wondering if there is a way (hopefully with an example 😉 ) to grab a MapService's legend JSON and decode the base64 encoded imageData directly without having to construct relative URLs to each image resource? This would help save on the roundtrip calls to the server. Thanks Greg
... View more
10-24-2011
09:45 AM
|
0
|
0
|
1341
|
POST
|
Greg, http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsBasemap/MapServer is a cached map service, meaning you cannot turn on/off individual layers. Right, but I'm still getting the same results for services like this one http://www.gulfofmexicoresponsemap.com/ArcGIS/rest/services/NOAA_WMS/MapServer
... View more
10-18-2011
09:28 PM
|
0
|
0
|
225
|
POST
|
Hello, I'm using the service and trying to get at only certain layers through the *export* operation: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsBasemap/MapServer I only really want to see the TaxParcels (layerid 0) and not the BaseMap (layerid 2). But when I specify that in the Layers parameter I still get back everything: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsBasemap/MapServer/export?bbox=-83.3136869761022%2C42.5570588526199%2C-83.3023705323607%2C42.5683752963614&bboxSR=&layers=0&layerdefs=&size=&imageSR=&format=png&transparent=false&dpi=&time=&layerTimeOptions=&f=html Is this normal behavior? Cause I've noticed this behavior in everything I tried on the example servers. This post was previously posted here: http://forums.arcgis.com/threads/41019-Get-Layers-From-IDS-Export-Operation
... View more
10-17-2011
04:11 PM
|
0
|
3
|
592
|
POST
|
Hey Crispin, I'm surprised no one already answered this. yes, slowness with python cursors has always been my experience. Using .NET SDK should be faster (at least it always is for me using C#.NET). Depending on what you're doing and where the data is stored (type of database or shapefile) I'd recommend GDAL OGR Python bindings (http://pypi.python.org/pypi/GDAL/). They read shapefiles and postgresql/postgis dbs among other formats waaaayy faster. Or if just accessing the geometries for point arrays, then try Shapely (http://trac.gispython.org/lab/wiki/Shapely). Or if you're into JVM scripting languages like Jython or Groovy try GeoScript (http://geoscript.org/). None of these talk with PGDBs or FGDBs...yet (though FGDB is now open). But it's a minor tweak (and easier in most cases) to export your data to run a process, then after it is done upload into ESRI proprietary data structs after. At least that's my experience... long live open source
... View more
03-04-2011
08:19 AM
|
0
|
0
|
860
|
POST
|
duh. I see my mistake. I assumed your streets map service was coming from here (where mine was) and that service is GCS_WGS_1984. My bad. Thanks for the heads up and the code. I'm going to use a lot of it 🙂
... View more
12-17-2010
12:29 PM
|
0
|
0
|
350
|
POST
|
Thanks for the reply Derek, That's what I thought. I don't understand how your toggling works then. Where in your code are you switching projections for the topo and streets tiles? They are in two different projections. I've walked through the execution but I'm missing something obvious then.
... View more
12-17-2010
11:29 AM
|
0
|
0
|
350
|
POST
|
Hello, Has anything changed from JS API 2.0 to 2.1 in regards to on-the-fly projections with TiledMapServiceLayers? Last time I checked only the dynamic map service layers used on-the-fly projections based on the map.spatialReference. Tiled map services didn't do on-the-fly projections. But this wep map is making me think that I missed something. As far as I can tell the only difference in the linked example is the 2.0 api. Was that feature supported in 2.0 with tiles?
... View more
12-16-2010
06:15 PM
|
0
|
5
|
805
|
POST
|
Hey Raymond, I used your callback function queryShowResults in a query without any changes (except replacing alert with console.log for firebug feeback) and it worked fine (See code block below). So the problem is somewhere else, not with this callback function logic. Some questions: 1) What version of JavaScript API are you using? 2.1? 2) What Map Service version are you executing the query against? Is it a Map Service from 10.0 or 9.3.1? 3) To debug this it's good to start with a very simple query. What is query.where being set to when you are getting these errors. See what I was using below. 4) Are you using firebug? How do you know graphic.geometry is coming back null? I'm guessing the problem is with one of your query parameters and chances are nothing is coming back. var query = new esri.tasks.Query();
query.where = "1=1";
query.returnGeometry = true;
var queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3");
queryTask.execute(query, queryShowResults);
... View more
12-13-2010
10:16 AM
|
0
|
0
|
963
|
POST
|
Hey Kristof, Thanks for the input. A few things. I'm not mixing the REST and JS API. Nor am I asking to have them mixed. These APIs have a relationship. In JS API v2.0 when you call .queryIds() method on a FeatureLayer it sends a restful URL to the server with a number of parameters. One of those is returnIdsOnly, which specifies that you only want IDs returned. This happens even if you are doing .queryIds() on a 9.3.1 map service. See the example code below. Yes, queryIds is functionality that is supported at 10.0 MapServices and not 9.3.1 MapServices. However, that doesn't mean that people aren't using the JS 2.0 API to make calls to 9.3.1 map services. ESRI's samples for JS 2.0 API are full of examples like here. Sure, people SHOULD know that they won't be able to use the full functionality of the 2.0 API against old map services (as I did when I started this last week). But that doesn't mean they won't forget. And they will try to make 2.0 method calls (like queryIds()) by mistake and there is NO mention of these problematic version conflicts in the JS 2.0 API. That's all I'm saying. Wouldn't it be nice if people using the new 2.0 FeatureLayer had a sentence at the beginning of this doc saying a word or two reminding them that certain methods are going to get unexpected results when using 9.3.1 map services. Right now the ONLY mention of this potentiality is here. I don't think that is a unreasonable request. Just trying to make the documentation better. Why do I think this is confusing for some people? Because when you're using the JS API v2.0 .queryIds() method on a 9.3.1 MapService (see code example below) even if you shouldn't be it still works -- and you still get features back and it still executes your callback all is if the 9.3.1 map service supports that call in a weird way. No errors returned. Not too confusing once you figure it out. But it kept me going for an hour. See the actual requests generated from the script below at the very bottom of this post. function initQueryIDCalls(){
var mapService931URL = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3";
var mapService10URL = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0";
featurelayer931 = new esri.layers.FeatureLayer(mapService931URL, {mode: esri.layers.FeatureLayer.MODE_SNAPSHOT});
featurelayer10 = new esri.layers.FeatureLayer(mapService10URL, {mode: esri.layers.FeatureLayer.MODE_SNAPSHOT});
var query = new esri.tasks.Query();
query.where = "1=1";
featurelayer931.queryIds(query);
featurelayer10.queryIds(query);
} 1) JS API 2.0 queryIds() request on 9.3.1 Map Service 2) JS API 2.0 queryIds() request on 10.0 Map Service
... View more
12-13-2010
07:44 AM
|
0
|
0
|
444
|
POST
|
One more thing Krystof, I fear that my first post wasn't clear enough about the problem. I'm not interested in querying on ID but getting a response of only IDs form the map service. The confusion happens between these different 10.0 (example 1) and 9.3.1 (example 2) map service calls. Notice how the returnsIdOnly parameter in the URL equals 'true' for the 9.3.1 map service request also. So i guess that extra information is ignored because it isn't supported. For some reason I thought this would throw some kind of error though. But I'm no JS Dev whiz. 1) featurelayer.queryIDs() for 10.0 map service 2) featurelayer.queryIDs() for 9.3.1 map service
... View more
12-10-2010
07:20 AM
|
0
|
0
|
444
|
POST
|
Hey Kristof Vydt, Thanks for your comments. I was aware that the difference between the MapServer layers was based on the difference between ArcGIS Server 9.3.1 and ArcGIS Server 10. I was just interested to find the documentation on this difference. You did answer my question as to where it is documented. Thanks 🙂 It looks like the lesson is this: I should be reading the AGS REST API because it has more detail in some areas than the JavaScript API Reference. Though I would argue that some of that detail in the AGS REST API should be duplicated in the JavaScript API Reference because that's probably where most people building with this solution go first. I'd also like to see a section in one of the APIs explicitly talking about what the difference between the Supported Operations means for different versions of the API and different types of operations. While AGS REST API does provide an overview of the ideas here, neither API reference talks about the specific examples that I can see yet. Thanks for your help
... View more
12-10-2010
06:55 AM
|
0
|
0
|
444
|
POST
|
Hello, When i use two different MapServer layers to create an instance of esri.layers.FeatureLayer and execute the queryIds method I get different results. I assume the difference in results is the product of each layer's Supported Operations. This layer ("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0") has a Supported Operation of "Query" whereas this other layer ("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3") has a Supported Operations of type "Query_Layer". The earthquake layer (the former example) will return only the objectIds as intended when you call the featurelayer.queryIds() method, but the demographic layer (the latter example) returns a JSON object of all attributes. My question is simple. Where is the documentation that explains the differences between how to interact with different Supported Operations of a Feature Layer? There is NO warning/mention in the JavaScript API Reference under FeatureLayer or under Query about this behavior with different Supported Operations. I spent 1.5 hours trying to figure out why I was getting different results from each layer. I would think that at least when I execute featurelayer.queryIds(query, callback) against a MapServer layer that only has a Supported Operations of "Query_Layer" I would get an error or something telling me this MapServer layer doesn't do that. Maybe I'm missing something and someone can point me to some documentation that I didn't see that explicitly explains this. Ideas? Thanks
... View more
12-09-2010
02:45 PM
|
0
|
8
|
1334
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|