My application is currently displaying some search results in a dojo grid inside a dialog. I've been asked to embed a map inside the dialog but am struggling to do so. Has anyone done this?

I've got a simple map inside a jsp and have tried


Also tried putting a button on the page to with map.render("mapdiv") after the dialog is displayed. Dialog.refresh() has no effect. There are no errors and no requests made for map tiles.

Can anyone suggest a better way of displaying a map in a popup? Thanks!


I can confirm you it is perfectly possible to put OpenLayers map within a Dojo's dialog widget.

What you can try to do is create in a declarative way a contentPane with an OpenLayers map. Then create the dialog and set the contenPane as the dialog's content.


| improve this answer | |
  • Neil, thanks for the tip. I can confirm that approach works. var divMap = document.getElementById("auditMap"); dialog.set("content", divMap) – geo_james Apr 16 '12 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.