Sign in to follow this  
Followers 0

Google maps locks up in embedded IE

4 posts in this topic

I'm having an issue with using google maps in an embedded IE control.  I'm not sure if it is a IE version (v9 on my PC) or AutoIt issue and hope someone can test this on their end.  Below is a simple test program that embeds an IE control and loads a custom marker.  The program works fine with a default icon, but with a custom marker it fails to show the marker and freezes the map after you zoom in or out.  Does someone mind trying it on their end?  Put "//" in front of the icon object to see it work correctly.

GUICreate("",800, 600)
    $gmap = _IECreateEmbedded()
    $gmap_ctrl = GUICtrlCreateObj($gmap, -1, -1, 800, 600)
    _IENavigate($gmap, "about:blank", 0)

    $html = _
    "<!DOCTYPE html><html><head><style type=""text/css"">" & @CRLF & _
      "html, body { height: 100%; margin: 0; padding: 0; overflow:hidden;}" & @CRLF & _
      "#map { height: 100%; }" & @CRLF & _
    "</style></head><body><div id=""map""></div><script type=""text/javascript"">" & @CRLF & _
    "   var map;" & @CRLF & _
    "   function initMap() {" & @CRLF & _
    "       map = new google.maps.Map(document.getElementById('map'), {" & @CRLF & _
    "           center: {lat: 26.527387,lng: -83.9892645}," & @CRLF & _
    "           zoom: 10" & @CRLF & _
    "       });" & @CRLF & _
    "       var issueIcon = {" & @CRLF & _
    "           path: 'M -45,-110 45,-110 45,-25 -45,-25 Z'," & @CRLF & _
    "           fillColor: 'yellow'," & @CRLF & _
    "           fillOpacity: 1," & @CRLF & _
    "           scale: 1," & @CRLF & _
    "           strokeColor: 'black'," & @CRLF & _
    "           strokeWeight: 1" & @CRLF & _
    "       };" & @CRLF & _
    "       var infowindow = new google.maps.InfoWindow({" & @CRLF & _
    "           content: 'test'" & @CRLF & _
    "       });" & @CRLF & _
    "       var marker = new google.maps.Marker({" & @CRLF & _
    "           position: map.getCenter()," & @CRLF & _
    "           map: map," & @CRLF & _
    "           icon: issueIcon," & @CRLF & _
    "           title: 'test'" & @CRLF & _
    "       });" & @CRLF & _
    "       marker.addListener('click', function() {" & @CRLF & _
    " , marker);" & @CRLF & _
    "       });" & @CRLF & _
    "   }" & @CRLF & _
    "</script><script async defer src=""""></script></body></html>"

    _IEDocWriteHTML($gmap, $html)
    ;_IEAction ($gmap, "refresh")


    While 1
        $iMsg = GUIGetMsg()

            Case $iMsg = $GUI_EVENT_CLOSE



Thank you.

Share this post

Link to post
Share on other sites

Works just fine for me.

So it's just me.  Thanks.  Which version of IE do you have?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • kawliga751
      By kawliga751
      I am trying to script the opening of multiple tabs in IE with each tab having a separate login/password. I have been able to make a successful script that will open 3 separate IE sessions with the correct webpage and login or a script that will open 3 tabs in one session (which I want) but will not login. I have tried _IECreate, IEAttach etc. This is the script I am currently using . 
      #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('') ;$o_IE.Navigate2('', $navOpenInNewTab) ;$o_IE.Navigate2('', $navOpenInNewTab) Call ("YYYYYYYSignIn") Func YYYYYYYSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc Call ("xxxxxxxSignIn") Func xxxxxxxSignIn () __IENavigate($oIE, ";jsessionid=1E3B8F6520DE0A1EC914A8ABB7E86341?NFH_MessageId=&NFH_Page=%2fpages%2fsearch%2fsearch.jsp", 1, 0x800) Local $domain = _IEGetObjByName ($oIE,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE,"NF_UserName") Local $Password = _IEGetObjByName ($oIE,"NF_Password") _IEFormElementSetValue ($domain, xxxxxxx") _IEFormElementSetValue ($User_Name, "xxxxxxx") _IEFormElementSetValue ($Password, "xxxxxxx") ;Send('{Enter}') EndFunc  
    • slidy56fr
      By slidy56fr
      Internet Explorer 11, AutoIt
      I want to download many files which are published with hyperlink on a web page. I use AutoIt and when there is a few files, it works even if It's on a website with secured links.
      I have a script to download link items with the object method (I gave a partial sample), but when the number of link exceed the web page, there is not an auto scroll, then the links which are not on displayed without scroll are not downloaded.
      Thank you
      From France
    • Hanukka
      By Hanukka
      Hi guys, 
      I was trying to automate a webpage after getting input from excel. The script worked fine for like 5 iterations but then stopped all of a sudden, I dont have the exact error msg now, but it was pointing to this in the IE UDF:-
      Return SetError($_IESTATUS_Success, $oTemp.GetElementsByTagName($sTagName).length,
      When i looked up the forum there was a similar question which said that I have to fix KB 3008923 update by uninstalling it, but I am unable to do that. 
      here is the link for download:- ( i guess )
      Does anybody know the proper steps to solve this??
      Plus I wont be able to send the code here because of privacy policy n all by the company.
      Desperately looking for a reply.....
    • SkysLastChance
      By SkysLastChance
      I am not sure on how to grab the innertext I want. Is there a way I can just grab the second line, or is there a better way to do it all together? 
      #include <IE.au3> $oIE = _IEAttach("Form Details") $oDiv = _IEGetObjById($oIE, "Col3") ;Phone MsgBox (0,"Oops",$oDiv.outertext) When I use this code I get


    • anthonyjr2
      By anthonyjr2
      I have come across a weird issue that I am not sure how to solve. For some reason, whenever I call WinActivate in certain scenarios instead of opening the single window that already exists, it will create a new blank tab. It should be able to be recreated with this:
      AutoItSetOption("WinTitleMatchMode", 2) Sleep(1000) For $i=0 To 10 WinActivate("Internet Explorer") Next I am not actually doing this in my code, it is just to demonstrate the fact that new tabs keep popping up. Does anyone know why this happens?
      EDIT: So I am not sure how reproducible this is, because it only happens every once in a while for me. I will update with more info if I find out anything.