flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bilbosax <waspenc...@comcast.net>
Subject Re: Loading Google Maps into HTMLLoader is very slow the first time
Date Tue, 26 Jul 2016 06:59:50 GMT
OK, so I figured it out but I only have speculation as to why it works.  I
will post it here just in case anyone ever wants to read it.  You may not be
able to tell from the scrambled HTML/Javascript code that I posted, but
there is a CSS statement that defines the width and height of the map <div>
that is used to display the map.  Based upon examples I had seen on the net,
I set the width to 100% and the height to 350px.  I guess this works when
you are using it in a browser, but I don't think that it knows how to
communicate with AIR to determine the width of the HTMLloader, which I also
had set to a percentage.  I think that google needs to be able to determine
the dimensions of your display container so that when you ask it to center
the map on a coordinate point, it knows how to set up all the coordinates
and dimensions.  So I simply set the width of my HTMLloader to a fixed size
of 1385px, and changed the CSS in the HTML file to set the <div> to a
hard-wired 1385px, and voila!, it popped up quickly every time.  Go figure.

This leads me to a related question that you may be able to help with
regarding the htmlloader.  The code that I have adds a simple "title"
attribute to a marker that you can place on the map.  I can successfully add
a map marker in the HTMLloader. When the code is executed in a browser, a
simple tooltip is displayed when you mouseover the marker displaying the
string that you set as the title.  The tooltips do not respond in the
htmlloader.  You can also create a infoWindow that opens when you click on a
marker.  I created one that works in a browser but does not work inside the
htmlloader.  Do you have any thoughts as to why the htmlloader does not
display tooltips the way that a browser does.  The map does respond to
things such as clicking on the zoom in and out buttons, and you can click on
the satellite button with no problem, so I don't think that it is likely to
be a focus issue.  Any thoughts?

View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Loading-Google-Maps-into-HTMLLoader-is-very-slow-the-first-time-tp13066p13074.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

View raw message