POST
|
The sample is in the Feature Layer folder and is called 'Format Info Window', here's the link again hopefully it'll work this time: http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/fl/fl_infowindow.html You can't directly format the dates in the info window at this release, you have to listen for the layer's click event and format the contents of the info window there. At version 2.2 this will no longer be necessary. dojo.connect(featureLayer, 'onClick', function(e) {
/*some of the values have a quote in the name - remove that then split the string
to separate the common and scientific names. */
var attr = e.graphic.attributes.qSpecies.replace('"', "").split("::");
//if the common name isn't included display the scientific name instead.
var commonName = dojo.string.trim((attr[1] === "") ? attr[0] : attr[1]);
//wikipedia uses the genus_species so build that value to append to wikipedia url
var scientificName = dojo.string.substitute("${0}_${1}", attr[0].split(" "));
//populate the info window
map.infoWindow.setTitle(e.graphic.attributes.qAddress);
map.infoWindow.setContent("<b>" + commonName + "</b><br /><a target='_blank' href=http://en.wikipedia.org/wiki/" + scientificName + ">Wikipedia Entry</a>");
map.infoWindow.show(e.screenPoint, map.getInfoWindowAnchor(e.screenPoint));
});
... View more
12-30-2010
08:46 AM
|
0
|
0
|
678
|
POST
|
Steve and Jeff, I updated a service to try and reproduce the problem but my legend doesn't display multiple items. The test service is public: https://servicesbeta.esri.com/ArcGIS/rest/services/SanJuan/Trails/MapServer The Trail Conditions layer has a unique value renderer and I grouped two of the items (maintenance and bridge). I also created a group layer (Trails, Regional Trail Conditions) just in case that was the issue. I then modified the Legend Widget sample from the help to use the San Juan layer and in my tests there are no duplicate items. Is there something in your service that is substantially different?
... View more
12-29-2010
01:20 PM
|
0
|
0
|
1654
|
POST
|
Eric, I haven't noticed this issue, is it only reproducible with a particular version of IE? Any details you can provide on how to reproduce the issue would be helpful. Thanks Kelly
... View more
12-29-2010
07:48 AM
|
0
|
0
|
1243
|
POST
|
At 2.2 we are making some changes to simplify this process but for now here's a sample that shows how to format the contents of an info window. This sample formats string values but could be modified to format numeric or date values. http://help.arcgis.com/EN/webapi/jav...nfowindow.html For date formatting you can use dojo.date.locale.format, the 'Page through records in a table' sample uses this to format date values: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/fl_paging.html
... View more
12-28-2010
07:21 AM
|
0
|
0
|
678
|
POST
|
Looks like you might be running into the issue described in this post: http://forums.esri.com/Thread.asp?c=158&f=2396&t=262200
... View more
12-23-2010
07:16 AM
|
0
|
0
|
302
|
POST
|
Do you have a test service that shows the problem? Any response from ESRI? What's the best way to submit this as a bug report, given that I'm an EDN customer so don't have access to the full tech support? Thanks, Steve
... View more
12-16-2010
10:54 AM
|
0
|
0
|
1654
|
POST
|
You have to add a dojo.require to your application to include the geometry service: dojo.require("esri.tasks.geometry"); More details on the compact build can be found here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_compactbuild.htm
... View more
12-11-2010
08:14 AM
|
0
|
0
|
446
|
POST
|
On a related note its not necessary to specify all the values for the layer definition. Here's a simple layer definition that worked for me in your test application.
var mylayerDefinition = {
"geometryType": "esriGeometryPoint",
"drawingInfo": {
"renderer": {
"type": "simple",
"symbol": {
"type": "esriPMS",
"url": "reddot.png",
"imageData": "iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oGGBcGLvZ5AIUAAATDSURBVFjD3Zg/aBt3FMe/v9+d7iSfUnNClAolFWnsRaF4LKU2HrK4hJYMKUQiJRRClnbKEE8Z2s1Dh9Bkryk+OoQshZAlhGIPaUpxlIDbRgqOIlSZoNxhx2fpTr8/HXynKLXTnGQr/fPgkE7ip/vovff7vvd7REqJfswpFpMAJgFMABgLrt2sElwlAEuXT1mb4RcXP371c0hUMKdYfAvAGQAzGMxuAJi/fMpa2xewHUCaBppKQclmQVMpkNHRXdfJ9XUI2wav1yFsG/D9FwBNy1obGMwpFicBzAJIQtOgZDJQ83kQw+jLVdJ1wVZWwBuNEHATwJxpWUt9gznF4ucATgKAkssNBPR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2QplQGkgKaJ7n2/8riyEnYWN0zL2gx35TwA8EYD0nVfez8mXXf7zNnDQgEgOBUP7rU9Wmd5uddba3/VsXkAm7xaBS+XXxsUL5fDVmcTwJUdAhuQzgFAp1SCdJzhh9Bxeg++c0G+71T+YJZwFQC8xcWhwnUPvM9HBUv/zRHBsIcqneXlMKf6H6r8q8dQQx7cXelN9P/XqPOfGg7/CVtbtVwfC2pGAAAAAElFTkSuQmCC",
"contentType": "image/png",
"width": 15,
"height": 15
}
}
},
"fields": [{
"name": "name",
"type": "esriFieldTypeString",
"alias": "Name",
"length": 50
}]
};
... View more
12-08-2010
11:37 AM
|
0
|
0
|
761
|
POST
|
It looks like you'll need to specify the url to the symbol for this to work in IE 8. If the url property doesn't contain http:// it assumes that the location is relative.
"symbol": {
"type": "esriPMS",
"url": "http://somename/somelocation/reddot.png",
"imageData": "iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oGGBcGLvZ5AIUAAATDSURBVFjD3Zg/aBt3FMe/v9+d7iSfUnNClAolFWnsRaF4LKU2HrK4hJYMKUQiJRRClnbKEE8Z2s1Dh9Bkryk+OoQshZAlhGIPaUpxlIDbRgqOIlSZoNxhx2fpTr8/HXynKL.........
... View more
12-08-2010
11:36 AM
|
0
|
0
|
761
|
POST
|
You can increase the size of the symbol swatches using something like this: .esriLegendService img{
width:55px;
}
... View more
12-06-2010
09:50 AM
|
0
|
0
|
1590
|
POST
|
The Map.graphics object is only available after the map's onLoad event has fired. For example:
dojo.connect(map, "onLoad", function() { ShowLocation(-81.3765, 28.54175); });
function ShowLocation(x, y)
{
var point = new esri.geometry.Point(x, y, new esri.SpatialReference({wkid:4326}));
var simpleMarkerSymbol = new esri.symbol.SimpleMarkerSymbol();
var graphic = new esri.Graphic(point, simpleMarkerSymbol);
map.graphics.add(graphic);
}
... View more
12-06-2010
07:55 AM
|
0
|
0
|
927
|
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
|
1590
|
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
|
308
|
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
|
807
|
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
|
394
|
Title | Kudos | Posted |
---|---|---|
2 | Tuesday | |
1 | 01-17-2025 11:55 AM | |
2 | 01-15-2025 02:08 PM | |
1 | 12-30-2024 02:15 PM | |
1 | 01-19-2022 08:59 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|