In adding map.closeInfoWindow() to the event listener within the custom class, I get an Error message that says:
1120: Access of undefined property DisplayGoogleMap My map does have an id of DisplayGoogleMap. I have also tried to use a Local Connection to send a function back to the stage to close the Info Window which did not work. After spending some time I was able to solve this and here is what I have done. I use LocalConnection to communicate with other parts of my application, I just created a new LocalConnection with a new ID that I called _EBSMapInformationWindow and connected the Custom Class to it. Then on the component with the map I issued the map.closeInfoWindow() which closes this custom component. Just wanted to express my gratitude in pointing me into the right direction. On 5/8/2011 1:03 AM, Harry L. wrote: > To remove map infowindow, you may want to try: > map.closeInfoWindow() > > Hope that helps. > > > On May 7, 9:39 am, GPearson <[email protected]> wrote: >> I am working on creating a custom TitleWindow that will take place of >> the stock popup window when a user clicks a marker to get additional >> information. I currently have the custom popup window working with the >> following code: >> >> var options:InfoWindowOptions = new InfoWindowOptions({ >> customContent: new SchoolInformationWindow("School Information", >> NCESID, Name, Address, City, State, ZipCode, PhoneNumber, >> CurrentApplicationVersionNumber) >> >> }); >> >> My issue that I have not been able to work out is have this window >> close when the user has clicked the button for it to close so they can >> click another marker. >> >> public function createInfoWindow(title:String, NCESID:String, >> SchoolName:String, SchoolAddress:String, SchoolCity:String, >> SchoolState:String, SchoolZipCode:String, >> SchoolPhone:String):TitleWindow { >> >> var tw:TitleWindow = new TitleWindow(); >> tw.width = 400; >> tw.height = 300; >> tw.title = title; >> tw.showCloseButton = true; >> // tw.addEventListener(CloseEvent.CLOSE, function(event:Event):void >> { >> // tw. >> // }); >> >> } >> >> If I add an alert.show within the addEventListener I get the box >> saying the user wants to close this window. But I have not been able >> to figure it out. I have tried PopUpManager.removePopUp(this); without >> any success. >> >> Anyone have a suggestion or can point me into the right direction on >> this. > -- You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en.
