AutID Posted April 30, 2013 Share Posted April 30, 2013 Hello,I was wondering how can i display the flash object of the google maps on a gui??For example this https://maps.google.be/maps?hl=en&tab=wlAny idea? Are there any object that i can call for a map display?Long time ago i had found a post on example script of trancexx in an autoitobject post of ProgAndy and if i remember well she had managed displaying maps on a gui.Anyway any kind of help would be appreciatedCheers https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
AutID Posted May 2, 2013 Author Share Posted May 2, 2013 Noone?? https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Nessie Posted May 2, 2013 Share Posted May 2, 2013 (edited) Try this, maybe there is a better solution but hey it works!: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister() Local $oIE = _IECreateEmbedded() GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState() ;Show GUI _IENavigate($oIE, @ScriptDir & "\Google Map.html") ; Waiting for user to close the window While 1 Local $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd This is the html code of the file "Google Map.html" that you have to put in the script directory: <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps Embedded</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var initialize = function() { // Latitude and Longitude var latlng = new google.maps.LatLng(40.737893,-73.99704); // Just some option var options = { zoom: 12, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; // Map object var map = new google.maps.Map(document.getElementById('map'), options); } window.onload = initialize; </script> </head> <body style="margin:0; padding:0;"> <div id="map" style="width:100%; height:100%"></div> </body> </html>Google Map Embedded.rar Edited May 2, 2013 by Nessie My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file Link to comment Share on other sites More sharing options...
AutID Posted May 2, 2013 Author Share Posted May 2, 2013 Try this, maybe there is a better solution but hey it works!: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister() Local $oIE = _IECreateEmbedded() GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState() ;Show GUI _IENavigate($oIE, @ScriptDir & "\Google Map.html") ; Waiting for user to close the window While 1 Local $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd This is the html code of the file "Google Map.html" that you have to put in the script directory: <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps Embedded</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var initialize = function() { // Latitude and Longitude var latlng = new google.maps.LatLng(40.737893,-73.99704); // Just some option var options = { zoom: 12, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; // Map object var map = new google.maps.Map(document.getElementById('map'), options); } window.onload = initialize; </script> </head> <body style="margin:0; padding:0;"> <div id="map" style="width:100%; height:100%"></div> </body> </html> hmmm, smart thing. I have never use html code but as i can read it it is a lot promising. When we zoom on the google map normally at the end of the zoom it shows you the street, this is that i want to display in my gui. Not the map. I have already done what you showed me, in an other way without using html source, but im finding difficulties trying to display the streets... https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Nessie Posted May 2, 2013 Share Posted May 2, 2013 (edited) So do you want the zoom option? Just for curiosity how did you do what i showed to you? Edit try this:Google Map Embedded.rar Edited May 2, 2013 by Nessie My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file Link to comment Share on other sites More sharing options...
AutID Posted May 3, 2013 Author Share Posted May 3, 2013 So do you want the zoom option? Just for curiosity how did you do what i showed to you? Edit try this: Sorry, i thought link i posted was with the zoom. Check this out. After zooming a lot it displays the streets. I attached an image so you can understand. Create an internet explorer object, get map element and just displayit in an object in the gui. https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Nessie Posted May 3, 2013 Share Posted May 3, 2013 (edited) So you want to use google street viewer I will take a look... EDIT: Try thisGoogle Map Embedded.rar Edited May 3, 2013 by Nessie My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file Link to comment Share on other sites More sharing options...
AutID Posted May 3, 2013 Author Share Posted May 3, 2013 (edited) Yep, well i will also do it in autoit to avoid the html. Edit2: hmmm looking the html code seems that this line sets the position since the fenway is the center <<var fenway = new google.maps.LatLng(42.345573,-71.098326);>> How can i make it get the current position? Adding a standar location will lead nowhere since it will not always be used from 1 location * hmmm, seems very hard to transalte entire code in autoit. Latitude and Longitude are set via numbers. Position can't be set with location names Edited May 3, 2013 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
AutID Posted May 12, 2013 Author Share Posted May 12, 2013 Nessie Hey i got a question. I finished it and it looks great. I was wondering can this be done without internet connection? What i mean is there a map where i can download which will be same as google map and street view? https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
JohnOne Posted May 13, 2013 Share Posted May 13, 2013 lol I doubt it, it would be some massive database for a desktop PC AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Nessie Posted May 13, 2013 Share Posted May 13, 2013 Hi google map has introduct some time ago a version of google map offline only for android device. But as you can imagine, the offline maps are avaiable only on as restricted area preset by the user. It's almost impossible to download the entire google maps / street view database, some years ago the database was about 70TB, imagine now how big is it with all the new features added by google Just for curiosity, have you used the html method? If not how did you do the "dirty" job? Hi! My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now