|
POST
|
I see two options: 1. Ditch the pan arrows as they are a relic from years ago when web maps did not have click+drag to pan. 2. Re-structure your markup and move the toolbar outside the map's content pane. To do this, you would add an additional border container inside your existing border container, after your accordion container. Then you would put your toolbar inside a content pane with region="top" and your map in another content pane with region="center". You might actually want to do both. It looks like the toolbar being inside the same content pane as the map is causing the shift+click+drag zoom graphic to be out of alignment too. I would seriously considering just leaving the arrows out though.
... View more
06-15-2011
12:53 PM
|
0
|
0
|
1215
|
|
POST
|
Yes, the JS API is backward compatible. The only caveat is that you cannot use JS API features that aren't supported by the release of ArcGIS Server you're using. For instance, you would be able to do any editing against your services. If you're just displaying and querying, you should be good to go. I posted earlier this week about creating a Feature Layer using v2.3 of the JS API and a 9.31 service: http://forums.arcgis.com/threads/32424-Attribute-field-names?p=109561#post109561
... View more
06-15-2011
12:29 PM
|
0
|
0
|
594
|
|
POST
|
The Query for polygon and adjacent polygons sample sounds like it fits your needs. Note the part about the proxy, that trips up a quite a few people.
... View more
06-15-2011
07:16 AM
|
0
|
0
|
1139
|
|
POST
|
You should be able to basically copy/paste from the World Imagery sample.
... View more
06-14-2011
08:23 PM
|
0
|
0
|
550
|
|
POST
|
The Editor widget with simple toolbar shows how to do this. To use the circle/rectangle create tools, click a polygon template (one of the "Waterbodies" templates) and then select circle or rectangle from the drop-down list in the middle of the toolbar just below the template picker.
... View more
06-14-2011
06:59 AM
|
0
|
0
|
1186
|
|
POST
|
Make sure follow all of the steps in install.htm that is at the root of the zip file. If that's what you did, and you're still having trouble, it is probably best if you contact support.
... View more
06-14-2011
06:52 AM
|
0
|
0
|
905
|
|
POST
|
Since you're using the extender for Google Maps, you're limited by the capabilities of v2 of the Google Maps API. As far as I know, there is not a way to have use a diagonal fill symbol. The only way I know to accomplish this would be to move to the full ArcGIS API for JavaScript.
... View more
06-13-2011
02:20 PM
|
0
|
0
|
1311
|
|
POST
|
New blog post on this over on the ArcGIS Server blog: http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2011/06/13/Feature-layers-can-generalize-geometries-on-the-fly.aspx
... View more
06-13-2011
01:52 PM
|
0
|
1
|
3652
|
|
POST
|
You can use a Feature Layer if you're using a 2.x version of the API. Here's a simple page that uses the 2.3 version of the API and a feature layer based on a 9.31 ArcGIS Server instance: <!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>FeatureLayer On Demand</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/dojo/dijit/themes/claro/claro.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
</style>
<script type="text/javascript">djConfig = { parseOnLoad:true };</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.3"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
var map;
function init() {
var extent = new esri.geometry.Extent({"xmin":-1091160.6279576253,"ymin":1464985.3783563056,"xmax":767849.8897356443,"ymax":2365380.130188807,"spatialReference":{"wkid":102039}});
map = new esri.Map("map", { extent: extent });
dojo.connect(map, "onLoad", initOperationalLayer);
var base = new esri.layers.ArcGISDynamicMapServiceLayer("http://gis.apfo.usda.gov/ArcGIS/rest/services/CONUS/Overview/MapServer");
map.addLayer(base);
}
function initOperationalLayer(map) {
var content = "<b>Abbr</b>: ${STATE_ABBR}<br /><b>FIPS</b>: ${STATE_FIPS}";
var infoTemplate = new esri.InfoTemplate("${STATE_NAME}", content);
var featureLayer = new esri.layers.FeatureLayer("http://gis.apfo.usda.gov/ArcGIS/rest/services/CONUS/Overview/MapServer/1",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"],
infoTemplate: infoTemplate
});
// explicitly set OID field as the layer being used
// does not have it's OID field visible
featureLayer.objectIdField = 'STATE_FIPS';
map.addLayer(featureLayer);
map.infoWindow.resize(150,105);
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div style="position:relative;width:100%;height:100%;">
<div id="map" style="border:1px solid #000;width:100%;height:100%;">
</div>
</body>
</html>
To use esri.request(), you would make a request to your map service layer endpoint and pull the info you need out of the fields array, here's an example: // use esri.request to get field info
esri.request({
url: 'http://gis.apfo.usda.gov/ArcGIS/rest/services/CONUS/Overview/MapServer/1',
content: { f: 'json' },
callbackParamName: 'callback',
load: function(resp) {
dojo.forEach(resp.fields, function(field) {
console.log('field name is ', field.name, ' and field alias is ', field.alias);
});
},
error: function(err) { console.log('err: ', err); }
});
... View more
06-13-2011
01:29 PM
|
0
|
0
|
1301
|
|
POST
|
Please see this topic about hosting the API locally: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_accessapi.html Have you given any thought to upgrading to a newer or the newest version of the API?
... View more
06-13-2011
08:38 AM
|
0
|
0
|
905
|
|
POST
|
Adding this before your script tag that references the JS API: <script type="text/javascript">var djConfig = {parseOnLoad: true};</script> This fixed the issue for the OP.
... View more
06-13-2011
08:36 AM
|
0
|
0
|
365
|
|
POST
|
Feature Layers have a fields property. What kind of layer are you using? You might need to use esri.request() to send a request to the layer's REST endpoint and get the field info. For instance, the response from this url: http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/Energy/Infrastructure/MapServer/7?f=json contains info about all the fields for the layer.
... View more
06-10-2011
01:15 PM
|
0
|
0
|
1301
|
| 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
|