var popup = new esri.dijit.Popup(null, dojo.create("div")); map = new esri.Map("map", { extent: initExtent, infoWindow:popup }); //define a popup template popupTemplate = new esri.dijit.PopupTemplate({ title: "INCIDENT", fieldInfos: [ {fieldName: "DESCRIPTION",label:"DESCRIPTION", visible: true}, {fieldName: "ADDRESS", label:"LOCATION", visible: true}, {fieldName: "START_DATE", label:"DATE", visible:true ,format:{dateFormat:'shortDate'}} ] }); featureLayer = new esri.layers.FeatureLayer("http://gis6.midland-mi.org/ArcGIS/rest/services/PublicSafety/MapServer/0", { mode: esri.layers.FeatureLayer.MODE_SELECTION, outFields:["*"], infoTemplate: popupTemplate });
var popupTemplate = new esri.dijit.PopupTemplate({ title: "{NAME}", fieldInfos: [ {fieldName: "ADDRESS", visible: true, label:"Address:"}, {fieldName: "TELEPHONE", visible:true, label:"Phone:"} ] });
.esriViewPopup .header { display:none; } .esriViewPopup .hzLine{ display:none; }
The Popup info window was designed to display navigation info in the header. For example if you've selected multiple features it will show 1 of 2 with nav arrows. In cases where you are associating the popup with a clicked feature - like in the sample below you will see the title in the top bar of the popup and also at the top of the popup's content section.
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/fl_featurecoll...
You can hide the title in the content using the following css:.esriViewPopup .header { display:none; } .esriViewPopup .hzLine{ display:none; }
Hi Kelly... what if you'd rather remove the title from the header section? I understand that the 'default' popup functionality is to show navigation in the header with the title in the content, but in my experience this is not the case. I've been able to implement your solution above, but I would prefer the opposite.
See what I mean here: http://www.portlandbps.com/gis/beResourceful/index.html
I can post code if necessary as well.
Thanks,
- d
I cannot, however, prevent the popup from displaying the title in place of the nav info
map.infoWindow.setTitle("")