Hi,
Hopefully a simple one, but I can't crack it.
I'm using the editor and template picker to allow editing of a layer through the API and this works great. However in this instance there is no need for the infoWindow to appear when a user clicks a shape to edit, i.e. I don't want it to pop-up, I just want to be able to edit the shape, not the attributes. So how do you prevent the infoWindow appearing?
Thank you,
Mark.
Hi,
Thanks for that. What event works with this? I have tried a few things that don't work, and I can use map.infoWindow.hide() to hide the window a split second after it appears, but not to stop it appearing in the first place. Can you please post the code?
Thanks.
Hi,
These don't work. I have tried both. The problem is the hide(), it is not a 'stop', so the infoWindow still shows, so in the case of the event ideas you suggest I expect the hide() actually fires before the show, or I can put some logic in my code to hide() a split second after the show, but the infoWindow still shows for a split second. I think I need to disable the infoWindow by some other technique but I don't know what. With the Identify code you actually code the infoWindow.show() to open the infoWindow at the appropriate time, but that seems to be hidden with the editor.
Mark.
Hi,
No, that doesn't work either, I have:
map = new esri.Map("mapDIV", { extent: customExtent, showInfoWindowOnClick:false });
And the infoWindow still appears when editing, the above probably only applies to the Identify. Any chance you feel like trying it to make sure it's not just me?
Thanks.
function loadEditor() { infoTemplate = new esri.InfoTemplate(); infoTemplate.setContent("<b>Reference: </b>${APP_REF}"); planAppsLayer = new esri.layers.FeatureLayer("http://myServer/ArcGIS/rest/services/Test/myService/FeatureServer/0", { mode: esri.layers.FeatureLayer.MODE_ONDEMAND, infoTemplate: infoTemplate, outFields: ["*"] }); dojo.connect(map, "onLayersAddResult", initEditing); map.addLayers([planAppsLayer]) }
Hi,
I appreciate all your responses, but I'm still getting nowhere. I have tried defining an infoTemplate, but the infoWindow that appears when I click a shape for editing is just the default template, for some reason I don't seem to be able to alter it. Below is my code that runs to load the editor service if that gives any clues. I haven't used the infoTemplate before so I could be getting it wrong. Also, I still have the code in place which should stop the window appearing anyway, and that's not taking effect. If you have any working code you don't mind sharing then please post it. Thank you.function loadEditor() { infoTemplate = new esri.InfoTemplate(); infoTemplate.setContent("<b>Reference: </b>${APP_REF}"); planAppsLayer = new esri.layers.FeatureLayer("http://myServer/ArcGIS/rest/services/Test/myService/FeatureServer/0", { mode: esri.layers.FeatureLayer.MODE_ONDEMAND, infoTemplate: infoTemplate, outFields: ["*"] }); dojo.connect(map, "onLayersAddResult", initEditing); map.addLayers([planAppsLayer]) }