Hi, when a user clicks on one of the small point of interest type icon links on the maps they see a pop up with info. The user can then click on the "more information" link in the popup to see a web page with further information.
When the user does this there's no way to return to the web map view of the TTMSFMXWebGMap.
Is there a built in way or a code snippet that will allow the user to go back to the map?
The more information link is currently opened inside the webgmaps webbrowser instance. We will have to investigate if it is technically possible to intercept this and redirect the URL to open in safari instead. Currently there is no way to return to the map.
Also How can I draw a circle over the TMSFMXWebGMap in the center, and this center remains the entire session of my program, I want this object be unamovable can you point me in the right direction please?
In the latest version, you should be able to disable POI completely with the property MapOptions.DisablePOI. If you want POI to be visible but catch the more information url redirection you can use the beforenavigate as you already found out.
Hi Pieter, I have a small bug with this mechanism for disabling the POI clicks.
If I use the code snippet in the before navigate event:
if Params.URL.Contains('http') then
Params.Cancel := True;
The "more info" links are disabled as expected. However if there's a street view image on the POI popup window then clicking on the street view image crashes my app.
Is there some additional code that I should use to make the street view image links safe?
Also I'm trying a method to intercept the URL and use it in a separate TWebBrowser. However I find that it's not working. Note that my web map and web browser are on two separate TTabItem tabs on a TTabControl. So I'm trying to slide to: hide the map, slide to a new tab, then navigate to the URL using a TWebBrowser.
What I'm seeing is that the tab slide works, but the WebMap remains visible. Any ideas?
It seems that the default FMX TWebBrowser is interfering with the way the TTMSFMXWebGMaps is showing. To display the URL on a separate tab, you can use the TTMSFMXWebBrowser in the TMS Pack for FireMonkey, or you can use another instance of the TTMSFMXWebGMaps.