POST
|
Is is possible, in the ArcGIS Javascrpit API, to get an ArcGisDynamicMapServiceLayer to render in a different colour, or would the ArcGIS Service need to be changed? Thanks!
... View more
08-07-2011
06:47 PM
|
0
|
1
|
504
|
POST
|
Hey all, I have a quick question regarding the ArcGIS Rest end points.... What is the "Maximum Allowable Offset" parameter? I know it generalizes on the fly (fantastic) but what are the units? Is it in meters? radians? rubber chickens? Thanks!
... View more
06-09-2011
10:18 PM
|
0
|
5
|
5573
|
POST
|
Hi swingley, thanks for the reply. I can't use static json files because the geometries in my web application are dynamic (i.e they can be added in an adhoc manner).
... View more
04-18-2011
06:24 PM
|
0
|
0
|
1200
|
POST
|
Hello, I would like to know if there is a REST service (and perhaps a JSAPI function) that can get the extent of a set of polygons without having to return the geometry to the browser. So it would work like this: 1) Make a rest query to ArcGIS server with a where clause like "STATE_CODE in ('TX','CA','NY')" 2) Return a JSON esri.geometry.Extent object. Does this function, or something similar exist?
... View more
04-14-2011
05:31 PM
|
0
|
19
|
8294
|
POST
|
Hi, I've noticed that in the examples on the ESRI website that the X-UA-Compatible content="IE=7" meta html tag is still required for the maps to display correctly in IE9... this tag can introduce errors in other libraries, like JQuery (which is what i am seeing in my application). So my questions are 1) Is there any other way to "tell" the arcgis javascript api to fall back to IE-7 compatibility mode, without having to specify the meta tag? 2) Why is this meta tag still required? Regards
... View more
03-17-2011
09:58 PM
|
0
|
0
|
281
|
POST
|
The layerdefs parameter needs to contain the layer ID to which you are applying your definition query:[INDENT]&layerdefs=5:STATE_FIPS%3D'20' [/INDENT]To apply definition queries to more than one layer, separate with semicolons:[INDENT]&layerdefs=5:STATE_FIPS%3D'20';3:STATE_FIPS%3D'20'[/INDENT] Thank you, works fine now!
... View more
09-29-2010
06:53 PM
|
0
|
0
|
435
|
POST
|
Hello, I am currently testing the ArcGIS Server Export Map functionality on the ESRI ArcGIS 10 sample servers and it appears as though the service does not operate as I expected. Basically I am attempting to export one feature (STATE_FIPS='20') on one layer (layer Id 5), along with all the features on another layer (layer id 2) to png format. I am able to show both of the layers, however the layer definition I attempt to apply to layer Id 5 seems to go unnoticed by the server �?? all features are returned for *both* layers instead of just the single state with id 20. Clicking on the following link will show the parameters that I am using to make the request: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/export?bbox=-185.337909350544,-19.11255617006,-59.5254875059344,108.400033537315&bboxSR=4269&layers=show:5,2&layerdefs=STATE_FIPS%3D'20'&size=&imageSR=4269&format=png&transparent=false&dpi=&f=html Any help appreciated Thanks
... View more
09-27-2010
07:36 PM
|
0
|
3
|
3199
|
POST
|
Hi I am getting a JavaScript exception when selecting features from a FeatureLayer on the map. The selection *seems* to work (i.e the features are highlighted), however firebug reports this error:
dojo.io.script error Error: Deferred Cancelled
cancelResult: undefined
dojoType: "cancel"
fileName: http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0
lineNumber: 16
message: "Unable to draw graphic (null): Deferred Cancelled"
name: "Error"
stack: "Error("Deferred Cancelled")@:0 ()@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 ([object Object],0,[object Array])@http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/esri/layers/FeatureLayer.xd.js:19 ([object Array],(function (dfd, id) {dfd = dfd || _4.io.script["jsonp_" + "dojoIoScript" + id];if (dfd) {try {dfd.cancel();_4.io.script._validCheck(dfd);} catch (e) {}}}))@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 (true)@http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/esri/layers/FeatureLayer.xd.js:19 ([object Object],4,[object Object],6)@http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/esri/layers/FeatureLayer.xd.js:19 ([object Object],4,[object Object],6)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 ([object Object],4,[object Object],6)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 ([object Object],4,[object Object],[object Object],true)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:52 ([object HTMLDivElement])@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:52 ([object HTMLDivElement])@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 ("onEnd",[object Array])@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 (148)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 (148)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 (148)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 (148)@http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0:16 "
Firebug also reports the following error:
dojo.io.script.jsonp_dojoIoScript_postcodes00_0_02197265625_1_3 is undefined
Here is the code I am using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>Layer in a map service - [ON-DEMAND]</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dojox/layout/resources/ResizeHandle.css"/>
<script type="text/javascript">djConfig = { parseOnLoad:true };</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("dijit.form.ComboBox")
var selectionToolbar, featureLayer;
function init() {
var initialExtent = new esri.geometry.Extent(112.607,-43.825,154.882,-10.558, new esri.SpatialReference({wkid:4326}) );
var map = new esri.Map("map", { extent: initialExtent, slider: true, nav: true });
dojo.connect(map, "onLoad", initSelectToolbar);
var baseMapLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
map.addLayer(baseMapLayer);
var fieldsSelectionSymbol = new esri.symbol.SimpleFillSymbol().setColor(new dojo.Color([255,255,0,0.5]));
fieldsSelectionSymbol.setOutline(new esri.symbol.SimpleLineSymbol("dashdot", new dojo.Color([255,0,0]), 2));
featureLayer = new esri.layers.FeatureLayer("http://arcgis:8399/arcgis/rest/services/maptest/MapServer/0",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND
});
featureLayer.setSelectionSymbol(fieldsSelectionSymbol);
map.addLayer(featureLayer);
}
function initSelectToolbar(map) {
selectionToolbar = new esri.toolbars.Draw(map);
var selectQuery = new esri.tasks.Query();
dojo.connect(selectionToolbar, "onDrawEnd", function(geometry) {
selectionToolbar.deactivate();
selectQuery.geometry = geometry;
featureLayer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW);
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<select dojoType="dijit.form.ComboBox" id="asgc" name="asgc">
<option>
ASGC Heirarchy 1
</option>
<option selected>
ASGC Heirarchy 2
</option>
<option>
ASGC Heirarchy 3
</option>
</select>
<button dojoType="dijit.form.Button" onClick="selectionToolbar.activate(esri.toolbars.Draw.EXTENT);">Extent</button>
<button dojoType="dijit.form.Button" onClick="selectionToolbar.activate(esri.toolbars.Draw.LINE);map.hideZoomSlider();">Line</button>
<button dojoType="dijit.form.Button" onClick="selectionToolbar.activate(esri.toolbars.Draw.POLYLINE);map.hideZoomSlider();">Polyline</button>
<button dojoType="dijit.form.Button" onClick="selectionToolbar.activate(esri.toolbars.Draw.POLYGON);map.hideZoomSlider();">Polygon</button>
<button dojoType="dijit.form.Button" onClick="selectionToolbar.activate(esri.toolbars.Draw.FREEHAND_POLYLINE);map.hideZoomSlider();">Freehand Polyline</button>
<button dojoType="dijit.form.Button" onClick="selectionToolbar.activate(esri.toolbars.Draw.FREEHAND_POLYGON);map.hideZoomSlider();">Freehand Polygon</button>
<button dojoType="dijit.form.Button" onClick="featureLayer.clearSelection();">Clear Selection</button><br>
<div id="map" style="position: relative; width:1280px; height:768px; border:1px solid #000;">
</div>
<span id="messages"></span>
</body>
</html>
I cannot afford to have JavaScript errors on the site I am working on, any help is greatly appreciated.
... View more
08-03-2010
10:42 PM
|
0
|
8
|
12883
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|