You can also create the Dialog dynamically (which will allow you to avoid having to have preexisting markup). Just make sure when you call render that you pass document.body as an argument so that it knows where to go. This will allow you to avoid having the extra markup. Another thing you can try that worked for me is to make the Dialog body the container element for the map, instead of nesting it further. Just give your Dialog body an ID, and use that as the ID that you pass to the Map constructor. The key is to make sure that whatever you need is in the DOM before rendering the Map. This is a great example of the synergy of two of our developer APIs! I really appreciate the feedback! J
Web Developer, Platform Engineering
That did the trick, thank you. You need to give the Dialog a body
before rendering, or it throws an error, but an empty string worked
fine for that.
It's an unusual problem, but the solution makes sense -- normally when
doing this manually I would have created the container for the map and
then added it to the DOM with appendChild() before instantiating the map.
I was trying to figure out subscribing to the hide and show events to
fix the map display just as your message came in, but was having a bit
of trouble with it, thanks for all your help.
> I couldn't find anything that was specifically Panel or
> I am guessing that the issue in creating the map is that you aretrying to
> put it into an element that's not yet in the DOM. I reworked yourfurther
> implementation a little bit, and it's working for me now.
> Please let me know how this works out for you, and if you have any
> questions, don't hesitate to let me know! J
> Steven Peterson
> Web Developer, Platform Engineering