Opening Google Earth within a browser

Community Forums/General Help/Opening Google Earth within a browser

Blitzplotter(Posted 2013) [#1]
Has anyone experience of opening a browser from within Blitz 3D, in turn passing Latitude and Longitude and zoom level information to the browser to display a certain part of the world?

Just wondering.....


xlsior(Posted 2013) [#2]
Don't know about Google Earth (I thought that was just a local stand-alone program, not web-based?), but Google Maps should be pretty straightforward, e.g.

ExecFile("http://maps.google.com/maps?hl=en&ll=46.200122,-122.187431&z=15")


...Which should show you the Mount St. Helens volcano.

The z=15 at the end indicates the zoom level.


Kryzon(Posted 2013) [#3]
Using ExecFile like xlsior commented will run the default internet browser in the user's system and make it go to that URL; That's and external app in relation to your Blitz3D program.

If you want it to open 'within' your Blitz3D app you need to embed the browser window using some hocus-pockery like the following: http://www.blitzbasic.com/Community/posts.php?topic=39515
(It's kinda "official", since it uses the Win32 API.)


Blitzplotter(Posted 2013) [#4]
Thanks for the info folks, very helpful. I've reached a conveinent point in development whereby I can attempt the next mission impossible ;)


Brucey(Posted 2013) [#5]
If you don't need satellite imagery, openstreetmap's data is very good, and relatively easy to use.


Brucey(Posted 2013) [#6]
Here's a fun example of a BlitzMax program displaying openstreetmap image data, overlaid with points from GPX data ( source ).



The image data is cached, and fetched on-the-fly from openstreetmap as required. Mouse drag and zoom (like google) is supported too.

The grid and numbers are just my debugging aids.

The problem with google map data is it's verrrry expensive. Openstreetmap is not :-)


Blitzplotter(Posted 2013) [#7]
@Brucey, thanks for the heads up, appreciated - I'm torn between implementing spades more functionality and getting down to the humdrum installation scripts blah, which I did start to address earlier this evening.

I am looking at your source link form #6 above now - its been a while since I dipped my mitts into BMax ;)

Wow, I like what you've done there, a lot. I've been grabbing my own imagery from google maps and superimposing upon a 3D box within my GUI, ideally I'd like to automate the process - that automate word doesn't half encapsulate a multitude of sins.


TaskMaster(Posted 2013) [#8]
Can you actually parse that data and get the coordinates of buildings and whatnot? Or do you just get an image of the map? And you would have to actually look at the image data and detect buildings?

I have always thought it would be fun to make a game where the map was the persons actual neighborhood. Put buildings in the right spot and the right size, roads in the right spot, etc...


Brucey(Posted 2013) [#9]
The vector data is available for you to render yourself, if you feel so inclined. In fact, you can download the database for the whole world if you want to ;-)


_PJ_(Posted 2013) [#10]
[quote]Can you actually parse that data and get the coordinates of buildings and whatnot? Or do you just get an image of the map? And you would have to actually look at the image data and detect buildings?

I have always thought it would be fun to make a game where the map was the persons actual neighborhood. Put buildings in the right spot and the right size, roads in the right spot, etc... [//quote]

Something I was trialling just for academic pursuit, really involved a long-winded, but ultimately plausible means of parsing html to/from google.com and other servers to acquire location data (unfortunately, without any WINDOWS 8 API LM-Location or GPS-Device interaction, only IP-based location is available from sites such as
http://www.ip-details.com/ip-search/
which will typically show the location of the IP-exchange currently overseeing the user's internet account. However, this negates any need to purchase Licenses for Google API use etc.
Instead, perhaps allowing users to input their own hometown may be better - though this will need some work in identifying the correct choice from a number of similar results.