Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

dialog.set("href","url_for_my.jsp")

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

1 Answer 1

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.

Cheers.

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

 
discard

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.