Skip to main content
Inspiring
July 29, 2016
Question

HTMLloader and Google Maps API

  • July 29, 2016
  • 1 reply
  • 798 views

I am using an HTMLloader to display a map in a desktop AIR application using Google Maps APIs.  I chose HTMLloader over StageWebView because it is much easier for a novice like myself to communicate with Javascript which is essential for Google's API, and I couldn't figure out how to get StageWebView to display on the screen where I wanted.  Everything is working as it should.  I am able to create and display a map centered on a point that I define.  I am able to drop markers on the map at coordinates that I define.  The only problem that I am having is that tooltips do not display when you mouseover a marker.  When you create a marker in Google's API, you just need to identify the coordinates for the marker, and you can apply a string "title" attribute to the marker that will display as a tooltip when you mouseover the marker. So you can quickly display information, such as an address or name of the point of interest without having to create more complicated objects such as InfoWindows. The tooltips work great in all of the browsers that I tested, but does not work in an HTMLloader.  I am wondering if you think that this is a z-order issue and the tooltips are hidden, if there is a setting in the HTMLloader that I am overlooking, or if perhaps the HTMLloader web technology is too far out of date to support some of the features of modern browsers?  Any thoughts or insight would be greatly appreciated.

This topic has been closed for replies.

1 reply

August 1, 2016

I imagine it is the fact the HTMLLoader is using a very dated version of WebKit that doesn't support the latest JS and CSS specs. Also, according to the AS3 documentation, StageWebView on "desktop computers (in the desktop and extended desktop profiles), the StageWebView class uses the system web control provided by the Flash Player plugin. The features available and rendering appearance are the same as those of the HTMLLoader class (without the close integration and script bridging between ActionScript and JavaScript provided by an HTMLLoader instance). Since the HTMLLoader class uses the internal AIR WebKit engine, concurrent use of StageWebView and HTMLLoader instances is strongly discouraged as it has undefined behavior and can possibly terminate the application.". So StageWebView is just using HTMLLoader anyway, you are better off using it officially so you can get the API communication that you pointed out. Adobe as said they are working on a native extension AIR devs to be able to use the latest, or at least a much newer, version of WebKit. So you will probably just have to wait for that to come out to have a functioning app with Google Maps integration.