Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
up vote 1 down vote accepted

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.


share|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 posting your answer, you agree to the privacy policy and terms of service.

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