function getWindowContent(graphic) {
//make a tab container
var tc = new dijit.layout.TabContainer({
style: "width:100%;height:100%;"
}, dojo.create("div"));
//display attribute information1
var cp1 = new dijit.layout.ContentPane({
title: "Info (Deutsch)",
content: "<b>Project Title:</b> " + graphic.attributes.Projekt + "<p><b>Laufzeit:</b> "+graphic.attributes.Laufzeit + "</p>" + "<p><b>Ansprechpartner:</b> " + graphic.attributes.Ansprechpa + "</p>" + "<a href="+graphic.attributes.Link__Deut+">Project Website</a>"
});
//display attribute information2
var cp2 = new dijit.layout.ContentPane({
title: "Info (English)",
content: "<b>Project Title:</b> " + graphic.attributes.Project_Na + "<p><b>Years of Research:</b> "+graphic.attributes.Laufzeit + "</p>" + "<p><b>Contact Person:</b> " + graphic.attributes.Ansprechpa + "</p>" + "<a href="+graphic.attributes.Link__Deut+">Project Website</a>"
});
tc.addChild(cp1);
tc.addChild(cp2);
return tc.domNode;
}function executeIdentifyTask(evt) {
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
var deferred = identifyTask.execute(identifyParams);
deferred.addCallback(function(response) {
// response is an array of identify result objects
// Let's return an array of features.
return dojo.map(response, function(result) {
var feature = result.feature;
feature.attributes.layerName = result.layerName;
console.log(feature.attributes.OBJECTID);
var template = new esri.InfoTemplate();
template.setTitle("</b>Hello World</b>");
template.setContent(getWindowContent);
feature.setInfoTemplate(template);
return feature;
});
});
// InfoWindow expects an array of features from each deferred
// object that you pass. If the response from the task execution
// above is not an array of features, then you need to add a callback
// like the one above to post-process the response and return an
// array of features.
map.infoWindow.setFeatures([ deferred ]);
map.infoWindow.show(evt.mapPoint);
}Hello,
I am having the same problem. I think they are the menu and slider features of the tab container. There are properties to turn them off, but they are not working for me.
tc.useMenu=false;
tc.useSlider=false;
Anyone know how to make them go away?
[ATTACH=CONFIG]16402[/ATTACH]
Hello,
I am having the same problem. I think they are the menu and slider features of the tab container. There are properties to turn them off, but they are not working for me.
tc.useMenu=false;
tc.useSlider=false;
Anyone know how to make them go away?
[ATTACH=CONFIG]16402[/ATTACH]
var tc = new dijit.layout.TabContainer({
style: "width:100%;height:100%;",
useMenu: false,
useSlider: false,
});Hello,
You might try this to get solve the graphic problem:
dojo.connect(map.infoWindow, "onHide", function(){
map.graphics.clear();
});
David