|
POST
|
There are several css classes for the legend dijit that allow you to alter the default appearance, here's an example where the font color and family are modified for the text in the legend: .esriLegendLayerLabel{
font-family:'Monotype Corsiva';
color:red;
}
.esriLegendServiceLabel{
font-family: 'Times New Roman';
color:green;
}
.esriLegendService{
color:orange;
font-weight:bold;
} The API Reference for the JavaScript API has a listing of the CSS classes.
... View more
12-06-2010
07:44 AM
|
0
|
1
|
2972
|
|
POST
|
You can check to see if the map's info window is displayed using the InfoWindow's isShowing property. If the InfoWindow is visible you can then call the hide method.
... View more
12-01-2010
06:26 AM
|
0
|
0
|
743
|
|
POST
|
Mark, Here's a code snippet that worked for me:
dojo.connect(layer,"onBeforeApplyEdits",function(adds,updates,deletes){
dojo.forEach(adds,function(add){
add.attributes.symbolid = new Date().getTime().toString();
});
});
... View more
12-01-2010
06:23 AM
|
0
|
0
|
1474
|
|
POST
|
esri.bundle contains various tooltip and other informative messages. Do you have code that reproduces the problem? If so I'd be happy to take a look.
... View more
11-16-2010
09:27 AM
|
0
|
0
|
808
|
|
POST
|
I haven't seen this behavior, can you reproduce the problem with one of the sample? If so which one?
... View more
11-15-2010
08:32 AM
|
0
|
0
|
808
|
|
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
|
1753
|
|
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
|
947
|
|
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
|
612
|
|
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
|
612
|
|
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
|
1306
|
|
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
|
397
|
|
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
|
924
|
|
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
|
1907
|
|
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
|
575
|
|
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
|
1238
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-31-2026 08:27 AM | |
| 1 | 03-26-2026 09:07 AM | |
| 1 | 03-26-2026 10:11 AM | |
| 1 | 03-24-2026 02:23 PM | |
| 1 | 03-17-2026 02:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
9 hours ago
|