Google Earth Plugin API

darbid

Registered User.
Local time
Today, 01:21
Joined
Jun 26, 2008
Messages
1,428
The title pretty much says it all. I cannot seem to find much on using the API with Access. Has anyone had a play with it?

I want to create a kml file on the run based on certain criteria and then display multiple points around the world on a browser which will be built into a form. You cannot do this with Maps unless you first make the kml available on a public website and I do not really want to use the whole google earth program.

I have found a couple of threads here on doing single points but not much on showing mulitiple points on the one map.
 
Last edited:
I never thought I would get it to go but I have

you need to download the google earth plug-in
then reference this
C:\Program Files\Google\Google Earth Plugin\ie\4.3.11528.8566\plugin_ax.dll
Then you can insert the active X control on a form.

To get it to work you need the following

Code:
Dim GE_window As GEWindowCoClass
Me.GEPluginCoClass0.start_
Do
    If Me.GEPluginCoClass0.testEarthInitialized_(0) = 1 Then Exit Do
Loop
Set GE_window = Me.GEPluginCoClass0.getWindow
GE_window.setVisibility (1)
 
dont suppose you could give more info or post a sample db, very much interested in this, cant seem to get it working tho
 
dont suppose you could give more info or post a sample db, very much interested in this, cant seem to get it working tho

not a problem here is an example and a thread of mine that will explain things better http://www.access-programmers.co.uk/forums/showthread.php?t=168131

Please note I do not use the active X control on a form anymore. After the last update of the API, google changed the method of initiating it and I do not think people got it to work again.

This may sound strange but it is my understanding that the only people that google intended to use the active x control on a form are the people that pay google many 10000's per year for there "own internal google earth". Again this is my opinion.

The best method is to use a HTML document and embed google earth in that. I got a free internet sit and set up my html document there.
 
ah well cheers anyway
was your heart set on putting the Active X control on a form?

if yes you can always google around for the last version of the api. it should still allow access to the google servers and work. You may notice that ballons are difficult (at least I could not get it to fire properly) and with the new updates you can do pretty much everything you can do with the google earth program. eg Tours.

here is the thread on the updated version of the API and my comments then on it http://groups.google.com/group/goog...5b8e68e9831?lnk=gst&q=start_#2210f5b8e68e9831 (i could not find it before)

The is a problem with people behind firewalls installing the API so if you google around with words like (corporate firewall) you will find direct links to the old API like here http://groups.google.com/group/goog...lnk=gst&q=corporate+firewall#359bbea9560cf710
 
was just an idea realy, atm im using an embedded web browser going to google maps, and i simply mark a point out by inserting the lat and long into the url when its sent to the browser, i did initialy want an option where it would mark out all the locations in my db..... but tbh its not that important
 
Yeh that is exactly how I started. I thought it would be a good idea to show a number of things on a map and then found out that google maps (run by google) will only show one.

What you are heading towards is to host your own google maps or google earth. I registered an account (free) with 50webs.com. I then registered with google for my passcode. Then you can (with a little HTML knowledge) put a full page google map or google earth onto a page. Then with a little javascript you can send the Lat and Long from your form with embeded webbrowser to place them on a map or earth.

I am pretty sure that my example shows how to do this with earth but I think you can do this with google maps too. I also think you will find more examples for google maps too.
 
web access is no prob got access to an account anyway, think ill give it a go, would be nice to be able to play with more functions
 
hmmmm, id be happy just getting a map which shows multiple markers, other things like distance calculaters etc etc would be handy but tbh would hardly be used, and to be fair would prob just be a gimmick, the mutliple markers is my main objective
 
hmmmm, id be happy just getting a map which shows multiple markers,
Basically the way I did this with google earth was to get my RecordSet and then loop through each record adding each one to google earth.

The other method would be to create a string which is in KML (very similar to XML) format and then loading that into google earth. (I do not like this method as I have problems getting the string right.

other things like distance calculaters etc etc would be handy
Once you have a working HTML page with google eath or maps it should not be too hard to add a Jscript function that accepts two variables (Lat and Long) and returns a distance. http://groups.google.com/group/Google-Maps-API/browse_thread/thread/4d2ce50eba69d97e

The great thing with this is that if you find a webpage that does what you want you can view the sourcecode and check how they did it.

If you are not familiar with Jscript or HTML you are going to need to learn some things. Also I had to remember all my Geography as well from school to understand Lat and Long, degrees, viewpoints etc :-)
 

Users who are viewing this thread

Back
Top Bottom