hello everyone,
thanx for your attention.
I'm programming a (simple) infowindow that displays the fields attributes of a featurelayer and I would like it to also display the symbol of the object.
here the code sample, it works very well but the symbol in the infowindow is undefined.
check on line 7 for ??? : that's where a little something is wrong (most probably), and I just can get my hand on it...
does anyone has a clue?
thanx again in advance!
greetings from France
IW_geol_reg = new FeatureLayer("http://194.57.254.69/arcgis/rest/services/AGES_carto/INFOWINDOW_THEME_1/MapServer/4",{opacity:0.8, outFields: ["OBJECT", "DESCRIPTION", "DATE"]});
// affichage infobulle :
IW_geol_reg.on("mouse-over", function(evt){
map.infoWindow.setTitle("<b>" + evt.graphic.attributes.OBJECT + "</b>");
map.infoWindow.setContent("<b>" + evt.graphic.attributes.DESCRIPTION + "</b>" + "</br> <u>Datation</u> : <i>" + evt.graphic.attributes.DATE + "</i> </br>" + evt.graphic.symbol.???);
map.infoWindow.show(evt.mapPoint,InfoWindow.ANCHOR_UPPERLEFT);
});
IW_geol_reg.on("mouse-out", function(evt){
map.infoWindow.hide();
});
I'm sure someone will have an easier way that I've missed.
If there's a mapservice along with your featureservice you can inspect the legend info:
..../arcgis/rest/services/layer/MapServer/legend?f=pjson
Filter the response by layerName and you can either construct the appropriate URL, or use the imageData to inline your image.