POST
|
You are correct, in the sample you like the southerly postion is used. The Scalebar widget help topic provides a few details about the location used to calculate the scale when placed externally. http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/scalebar.htm Presumably the most southerly latitude is still used when using the scalebar in an external container, like in this sample.
... View more
11-12-2010
10:19 AM
|
0
|
0
|
443
|
POST
|
This question comes up frequently so I added a new sample to the ArcGIS Resource Center this morning showing how to format the contents of an info window. The sample formats string values but could easily be modified to apply numeric or date formatting. http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples/fl_infowindow.html FYI: We are making some changes at 2.2 that will simplify this process.
... View more
11-11-2010
07:57 AM
|
0
|
0
|
319
|
POST
|
One approach would be to use esri.request then add each layer to the map: dojo.require('esri.layers.FeatureLayer');
var baseURL;
var map;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-8590965.388453046,"ymin":4695877.530747742,"xmax":-8553434.807565076,"ymax":4711164.936404756,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
map.addLayer(basemap);
baseURL = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer";
esri.request({
url:baseURL,
content:{f:"json"},
callbackParamName:"callback",
load:addLayers,
error:esriConfig.defaults.io.errorHandler
});
}
function addLayers(response,args){
dojo.forEach(response.layers,function(layer){
var featureLayer = new esri.layers.FeatureLayer(baseURL + "/" + layer.id,{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
map.addLayer(featureLayer);
});
}
dojo.addOnLoad(init);
... View more
11-09-2010
08:36 AM
|
0
|
0
|
243
|
POST
|
It looks like the map's onLoad event wasn't firing. I moved the code that hooks up the onload event above the lines that add the openstreetmap layer and the polygon displays (see attached).
... View more
11-09-2010
08:03 AM
|
0
|
0
|
218
|
POST
|
The feature layer has an applyedits method that you can use to add new features to a feature layer. The following samples show how to use this method. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/ed_feature_creation.html http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/mobile_geolocaterenderer.html
... View more
11-02-2010
07:48 AM
|
0
|
0
|
687
|
POST
|
You can use esri.arcgis.utils.createwebmap to add an arcgis online web map to your JavaScript app. This sample shows how this works. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/ags_fullmaplayout.html
... View more
11-02-2010
07:40 AM
|
0
|
0
|
124
|
POST
|
The feature layer properties aren't available until after the layer has loaded. Once the layer has loaded the properties should return values instead of undefined.
... View more
10-08-2010
08:17 AM
|
0
|
0
|
261
|
POST
|
You can apply a formatter to the date field that will convert the current format to a more readable date format. To use a formatter create a function that will return the date, in this example dojo.date.locale.format is used to return the date in a format like August 14, 2007.
function formatDate(value){
var inputDate = new Date(value);
return dojo.date.locale.format(inputDate, {
selector: 'date',
datePattern: 'MMMM d, y'
});
}
Apply the formatter to the date field:
<th field="DATEFIELD" formatter="formatDate;">Date</th>
Take a look at the following sample in the help to see an example: http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/fl/fl_paging.html
... View more
10-06-2010
01:29 PM
|
1
|
0
|
695
|
POST
|
You need to add the class="claro" to the body tag. <body class="claro" style="font-family: Arial Unicode MS,Arial,sans-serif; padding: 10px;"> However you might want to look into use the compact build instead since you are working with ExtJS. http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_compactbuild.htm
... View more
10-05-2010
08:48 AM
|
0
|
0
|
208
|
POST
|
When I read your initial post I missed the bit about the info template not displaying. In order to display the graphic's attributes in the info window you'll need to populate the maps info window with the graphics content. Here's a link to a sample in the help that shows this: http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/query_showinfowindow.html
... View more
10-04-2010
11:35 AM
|
0
|
0
|
476
|
POST
|
Since you are using map.setExtent, try replacing onZoomEnd with onExtentChange to ensure that the event fires when the extent change is complete.
var extentHandler = dojo.connect(map, 'onExtentChange', function() {
dojo.disconnect(extentHandler); ..........
... View more
10-04-2010
08:33 AM
|
0
|
0
|
476
|
POST
|
Ken, ArcGIS Server 10 SP1 is not available yet, so the Legend Widget will use the ArcGIS.com legend service to generate the legend for your layers. Your service does not need to be on ArcGIS.com but it does need to be publicy available and accessible by the ArcGIS.com legend service. You can test your service with this link, just enter your service in the SOAP URL field and click 'Generate Legends'. http://www.arcgis.com/sharing/tools/legend Kelly, could you elaborate on the Legend Widget a little bit. I have read this: "If the layer is an ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer created using ArcGIS Server 10.0 SP1 or higher the legend is generated using the REST Map Service legend resource." Once ArcGIS Server 10.0 SP1 is released and you publish your services with that version then the Legend widget will use be generated using the REST map service legend resource. I am not able to use my own ArcGISDynamicMapServiceLayer in the Legend widgets (they are not on ArcGIS.com). Does ArcGIS Server 10.0 SP1 exist yet? Or will the functionality be available only after SP1 is made available? I think more than a few people are scratching their heads over this... Thanks, Ken
... View more
10-01-2010
10:53 AM
|
0
|
0
|
272
|
POST
|
The FAQ was updated today to include the local install for 2.1. http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_faq.htm Can we get a new local installs for 2.1 under Concepts -> Inside the API -> Frequently Asked Questions -> Can the ArcGIS JavaScript API be installed locally? Thanks!
... View more
09-29-2010
12:59 PM
|
0
|
0
|
585
|
POST
|
The 2.1 download is now available from the FAQ page in the ArcGIS API for JavaScript help. http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_faq.htm
... View more
09-29-2010
12:57 PM
|
0
|
0
|
625
|
POST
|
Web Mercator isn't the best projection to use for measuring. The ArcGIS Server blog has detailed information on this: http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2010/03/05/Measuring-distances-and-areas-when-your-map-uses-the-Mercator-projection.aspx
... View more
09-29-2010
12:46 PM
|
0
|
0
|
313
|
Title | Kudos | Posted |
---|---|---|
1 | yesterday | |
1 | 3 weeks ago | |
1 | 4 weeks ago | |
1 | a month ago | |
2 | 05-29-2024 10:03 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|