Hi, We've been using Google Maps in our Flex web app for about a year now, but have just recently started getting a duplicate map appearing after a certain operation runs. It only appear on some peoples machines some of the time, but seems to occur in FF (not sure if it's really browser dependent).
I have a screenshot of it happening here: http://www.talentmap.jobs/DuplicateMap.gif You'll notice that in the duplicate image, the zoom controls, map type and "Powered By Google" logo in the bottom left don't render properly. It happens after the user clicks Submit on a form which generates an image of the map and sends it server side to be emailed. Here's the heart of the code that runs when the user clicks Submit. private function SendImInterestedBtn_Click():void { SendEmailTalentMapBtn.enabled = false; PrintTalentMapBtn.enabled = false; SendImInterestedBtn.enabled = false; exportJPGAction = constExportJPGImInterested; exportImageToJPG(); } private function exportImageToJPG() : void { cursorManager.setBusyCursor(); WaitCvs.visible = true; var bm:Bitmap = map.getPrintableBitmap(); var jpgEncoder:JPEGEncoder = new JPEGEncoder(85); var jpgStream:ByteArray = jpgEncoder.encode(bm.bitmapData); var header:URLRequestHeader = new URLRequestHeader ("Content- type", "application/octet-stream"); var jpgURLRequest:URLRequest = new URLRequest(host + "/Ajax/ ImgService.aspx"); jpgURLRequest.requestHeaders.push(header); jpgURLRequest.method = URLRequestMethod.POST; jpgURLRequest.data = jpgStream; var jpgURLLoader:URLLoader = new URLLoader(); jpgURLLoader.dataFormat = URLLoaderDataFormat.VARIABLES; jpgURLLoader.addEventListener(Event.COMPLETE, exportImageToJPG_Complete); jpgURLLoader.addEventListener(IOErrorEvent.IO_ERROR, exportImageToJPG_IOError); jpgURLLoader.load(jpgURLRequest); } private function exportImageToJPG_Complete(event:Event):void { cursorManager.removeBusyCursor(); WaitCvs.visible = false; var loader:URLLoader = URLLoader(event.target); var jpgLocation:String = loader.data.webLocation; sendImInterested(jpgLocation); } private function sendImInterested(jpgLocation:String):void { cursorManager.setBusyCursor(); WaitCvs.visible = true; var recommendations:String = getRecommendationsXML(); var ZIPsSelected:String = getZIPsSelected(); var postedToSite:String = ""; if(ImInterestedPostedToSiteRGrp.selection == null) { postedToSite = "Not Answered"; } else { postedToSite = ImInterestedPostedToSiteRGrp.selectedValue.toString(); } var svc:HTTPService = new HTTPService(); svc.method = "POST"; svc.url = host + "/Ajax/SendImInterested.aspx"; svc.addEventListener(ResultEvent.RESULT, sendImInterested_Result); svc.addEventListener(FaultEvent.FAULT, sendImInterested_Fault); svc.send({ accountManager: ImInterestedAccountManagerCom.selectedLabel, appVersion: appVersion, bestTime: ImInterestedBestTimeTxt.text, category: (searchCategoryId == "1000000" ? "people" : (searchCategory + "s")), categoryId: searchCategoryId, city: searchCity, comments: ImInterestedCommentsTxt.text, company: ImInterestedCompanyTxt.text, countTotal: nfNoDec.format(searchCategoryId == "1000000" ? selectedCntPopulation : selectedCntDirectMail), email: ImInterestedEmailTxt.text, formType: ImInterestedTitleTxt.text, imgLocation: jpgLocation, name: ImInterestedNameTxt.text, phone: ImInterestedPhoneTxt.text, positionTitle: ImInterestedPositionTitleTxt.text, postedToSite: postedToSite, radius: searchRadius, recommendations: recommendations.replace(new RegExp('&', "g"), '+'), source: searchCategorySource, sourcesOfInterest: sourcesOfInterestSelectionList.text, state: searchState, ZIP: searchZIP, ZIPData: ZIPData_, ZIPsSelected: ZIPsSelected }); } private function sendImInterested_Result(event:ResultEvent):void { cursorManager.removeBusyCursor(); WaitCvs.visible = false; SendEmailTalentMapBtn.enabled = true; PrintTalentMapBtn.enabled = true; SendImInterestedBtn.enabled = true; } I suspect that something in exportImageToJPG() is causing this to happen, but since it's intermittent, it's difficult to track down. Has anyone seen something like this before? Is it a known bug? Thanks for any advice, Karl
-- 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.
