I am trying to create a windows FMX app with the trial version of TTMSFMXWebGMaps. I can successfully programmatically add markers to the map. I have added an OnMarkerClick event handler to the map in which I want to display a modal child window. All fairly standard Delphi stuff :)
The problem is when the modal child form displays the content of the map display on the main form is replaced by the text "blank{5C5E4C6F-855F-4744-8D33-42AFE5A06F98}" Note that the GUID part changes depending on which marker I click.
What do I need to do to avoid this ?
BTW, loving the component, not sure whether to buy the full suite or just the GMaps one.
I've tried a work around which is to use a minimised TPanel component and adjust its size when a map marker is clicked so the panel can show the extended details for the marker. These details are retrieved from my database. This work ok.
However when I use a TComboBox control on the panel - if I click on the combobox I get the same error showing on the map.
Here is the details panel and map before selecting the combobox.
OK, I attached the debug console and have inspected the DOM. It looks
like what is dispayed is the path for the browser window's Location
property i.e. the full URL before and after clicking on the combobox is <span -="">"about:blank{<span -="">5C5E4C6F-855F-4744-8D33-42AFE5A06F98}"
Hence it appears the google map display is sitting on top of a blank page.
So if I add a button and in its handler add the following code snippet
to
get the embedded browser to naviagte then the map display comes back.
However this time I get the full web version of the google map including
all of the map controls, and a warning about IE compatibility mode.
This has not fixed my problem but may cast some light on what is causing it and how it can be fixed.
I can easily replicate the combobox problem by dropping a TComboBox control onto the grey panel in the FMX routing demo, then adding a couple of items in via the Object Inspector. Click F9 to run and when the combobox is clicked the "blank{GUID}" error occurs.
This happens in the FMX routing demo running under 10.1 and 10.2. It does NOT occur in the FMX demo running under XE8, nor the VCL version running under 10.2.
Hope this info helps to isolate the root cause of the problem.
I've put together a simple FMX Win32 app to demonstrate the problem. The app works fine in XE8 and 10 Seattle. It
breaks in 10.1 Berlin and 10.2 Tokyo, so something got changed either
in the code base of the Maps component, or the FMX framework. Without
access to the Maps source I cannot tell.
How do I log this as a bug at TMS ?
The code is as follows
program HeaderFooterApplication;
uses
System.StartUpCopy,
FMX.Forms,
HeaderFooterTemplate in 'HeaderFooterTemplate.pas' {HeaderFooterForm};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(THeaderFooterForm, HeaderFooterForm);
Application.Run;
end.
We have further investigated this here, but the issue with the combobox dropdown resetting the map is an FMX issue. The browser is internally mapped on TWebBrowser, which re-initializes each time a child form, frame or popup is created. There is currently no workaround for this issue. More information can be found at the following QC report: