We’ve finally reached a turning point!
Over the past three weeks, I’ve conducted numerous tests, exploring some undocumented functions to disable WebGL in Google Maps. The goal was to make maps.google.com work correctly in WebView, but the results were unsatisfactory. I also tried forcing rendering in Canvas and, finally, configuring Google Maps to generate only static JPG images, but none of these solutions proved practical or worked as hoped.
I explored all the alternatives to WebView, such as JCEF based on Chromium, but even this approach turned out to be difficult and full of obstacles.
In the end, after dozens of trials, I decided to switch to OpenMap with Leaflet. However, even this choice wasn’t without its challenges: OpenMap can’t directly replace Google Maps, as the events and methods it offers are different from those of the GMap library.
I then concluded that the fastest solution, to avoid rewriting all the code for apps using Google Maps, was to create a new library based on OpenMap, but with the same methods and events. So, in just two days, I managed to rewrite it. It wasn’t easy, especially due to the communication issues between WebView and B4J with Java 19, but with some tricks that cost me a whole day, I managed to resolve everything.
I’ll soon be releasing a library that will allow you to replace Google Maps without having to modify existing code. I’m currently testing it and also developing a second library to replace GoogleMapExt, which is widely used, and that also needs to be rewritten to
maintain compatibility with the existing code.