|
POST
|
An ArcGISDynamicMapServiceLayer is used to display a map service in a JS API app and is collection of one or more layers. As a result, dynamic layers don't have a geometry type but individual layers in the map service do have a geometry type. Take a look at the Census map service on one of our sample servers: http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer There are four layers, each with a geometry type. You can get an individual layer's geometry type by sending a request to that layer's endpoint, for instance: http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/0?f=pjson We have a sample showing how to retrieve individual layer info. To get geometry type, you would use the same code shown in that sample but instead of pulling out field info, you'd pull out the layer's geometry type.
... View more
11-30-2012
05:44 AM
|
0
|
0
|
950
|
|
POST
|
You're welcome! Want to mark my post as an answer so future people looking for this info will see the thread as answered?
... View more
11-30-2012
05:38 AM
|
0
|
0
|
1869
|
|
POST
|
I never heard a response from ESRI on this. Are there any new releases or plans to add gestures to the Javascript API to Android out of the box? My understanding from talking to a developer at the last Dev Summit was only Andriod 4 (ICS and Jellybean, etc) and above would be supported. I'm okay with that. Has something changed to prevent that? We added support for pinch gestures to zoom on Android 3.x and 4.x at the 3.2 release of the JS API: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/whats_new.html
... View more
11-29-2012
12:49 PM
|
0
|
0
|
1869
|
|
POST
|
We don't keep a reference to the map as a global variable anywhere. If you want to interact with your map at runtime via your browser's dev tools, make your map variable global. This is why we make the map a global var in most of our samples. As you found out, dojo.byId returns references to dom nodes. Dijit.byId returns references to dijits but esri.Map is not a dijit.
... View more
11-29-2012
10:44 AM
|
1
|
0
|
935
|
|
POST
|
#1: as you noted, you can ignore those errors. For completeness, there's background in a previous forum post. #2: you might be trying to access a widget's store directly. Try getting a reference to the store, then running your query on that. #3 sounds like an app specific CSS issue. If you can post a repro, we might be able to help. #4 sounds like it's not something you need help with but rather that things are working as expected.
... View more
11-29-2012
10:33 AM
|
0
|
0
|
1354
|
|
POST
|
If you're using an ArcGIS Server service that can be projected on the fly(dynamic map service, feature service, image service) then ArcGIS Server can project your data into any projection. Here's an example of projecting the World Population Service to Arctic Polar Stereographic: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer/export?bbox=-12279634.13210453%2C-3847513.08889383%2C10591278.152258359%2C5481664.75628363&bboxSR=3995&layers=&layerdefs=&size=1189%2C485&imageSR=3995&format=png24&transparent=false&dpi=96&time=&layerTimeOptions=&f=html And here it is being used in a simple JS API page: http://jsfiddle.net/usst7/
... View more
11-29-2012
10:17 AM
|
0
|
0
|
1978
|
|
POST
|
The reason I'm want to experiment with JQuery is from my understanding when using querytask you ended fetching you results in a datatable or dgrid and because I have to deal with wcag 2.0 (accessibility standard). datagrid or dgrid are not compliant with wcag 2.0. Using a queryTask retrieves features from a service, it doesn't do anything to display them for you. We publish samples showing how to take the results of a queryTask and display them in various ways but ultimately it's up to the developer to decide how to display features retrieved using a queryTask. If I use querytask can I fetch the query result is table generated with JQuery? Are you asking to take the results of a queryTask and generate a table to display them using jQuery? If so, that's possible, but it'll be up to you to code it. Just to re-iterate, the queryTask fetches features for you. Think of it like an xhrGet or JSONP style request??? it gets some data but how that data ends up being displayed is up to you.
... View more
11-27-2012
03:14 PM
|
0
|
0
|
2324
|
|
POST
|
To have ArcGIS Server return JSONP, add a query string parameter named "callback". Here's an example using $.ajax:
$.ajax({
url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3/query",
data: { f: "json", where: "1=1", returnGeometry: false },
dataType: "jsonp",
jsonpCallback: "callback",
success: function(response) {
console.log("got response: ", response);
}
});
But more importantly, why do this instead of using a queryTask from the API? Or is your app not using the JS API? If that's the case, the best place for a question like this is the AGS general forum.
... View more
11-27-2012
10:49 AM
|
0
|
0
|
2324
|
|
POST
|
We don't usually modify or provide patches for older versions of our API. The later 2.x releases are when we started including new ArcGIS Server 10.1 functionality. We built those releases against beta releases of ArcGIS Server and occasionally had to work around issues in the 10.1 betas. Off the top of my head, I'm not certain we had workarounds in the generate renderer task but I suspect we did and that might be the reason this is failing. 3.0 coincided with the release of ArcGIS Server 10.1 final. I think the more productive route is to move to 3.x, preferably 3.2. What's stopping you from moving to 3.2? It is a different Dojo version, but I think most common migration issues are documented throughout this forum and we have a migrating to 3.0 doc that outlines a few things to know about. If you post specific issues/errors you're seeing as new threads here we can help (after you search the forum of course ;)).
... View more
11-27-2012
10:21 AM
|
0
|
0
|
2452
|
|
POST
|
I see multiple "dojo is not defined" errors when trying to load your app in Chrome:
Uncaught ReferenceError: dojo is not defined findGrid.js:1
Uncaught ReferenceError: dojo is not defined identify.js:1
Uncaught ReferenceError: dojo is not defined index.html:27
The page also fails in IE. Can you re-visit your live link and make sure we can repro the error there?
... View more
11-27-2012
05:54 AM
|
0
|
0
|
2064
|
|
POST
|
When using geographicToWebMercator, the point you pass in needs a geographic spatial reference. In your example, you're using web mercator as the spatial reference. Try this:
var mylat = 29.818008;
var mylong = -95.423178;
var CenPoint = new esri.geometry.Point({ "x": mylat, "y": mylong, " spatialReference": { " wkid": 4326 } });
var mercator = esri.geometry.geographicToWebMercator(CenPoint);
map.centerAt(mercator);
... View more
11-27-2012
05:52 AM
|
0
|
0
|
1864
|
|
POST
|
I've attached a simpler version of your page that uses 3.2 and works with a layer from on of our public map service. As long as you're using a 10.1 server, you should be able to replace the URL, change the field name and you should be good to go. Please let me know if the attached code works with your map service.
... View more
11-26-2012
11:05 AM
|
0
|
0
|
2452
|
|
POST
|
How do I check if the renderer object has been created without applying it in this code? I suspect my code is not generating an object. Any suggestions? All the usual web debugging methods apply: watch the request to generateDataClasses via your browser's dev tools and look at the response console.log the response use a breakpoint to inspect various variable values at runtime If you could post a complete but simplified version of your page so we can run and debug that would be helpful as well. I'd also like to encourage you to upgrade to 3.2 even though our generate renderer sample does indeed work with 2.8.
... View more
11-19-2012
03:22 PM
|
0
|
0
|
2452
|
|
POST
|
referenceLayerUrl defined on line 104 in index.html points to a layer in the map service, but should be pointing to the root of the map service. Change this:
var referenceLayerUrl = "http://wagda.lib.washington.edu/rest/services/Townships/MapServer/0";
To this:
var referenceLayerUrl = "http://wagda.lib.washington.edu/rest/services/Townships/MapServer";
... View more
11-19-2012
01:28 PM
|
0
|
0
|
945
|
|
POST
|
Re: mixed https + http. YES the page does have mixed https + http - so that is probably the cause of the security warning. the warning occurred, even when just panning the map a bit. Are your map services using https? That is, do the URLs you pass to esri.layers.ArcGISDynamicMapServiceLayer or esri.layers.ArcGISTiledMapServiceLayer using https? Do you think is there a way to get IE8 to NOT show the security warning, when there are such mixed sources (http + https) I think we need a screenshot before we can take this much further..... There is probably a way, but it's likely a per-client setting and not something you can control via your app. The best solution will be to make sure that all resources are accessed over https.
... View more
11-19-2012
10:06 AM
|
0
|
0
|
2634
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-23-2012 07:54 AM | |
| 1 | 05-28-2010 08:31 AM | |
| 1 | 11-12-2012 08:12 AM | |
| 3 | 02-23-2012 10:57 AM | |
| 1 | 06-27-2011 08:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|