NI Home > Community > NI Discussion Forums
Reply
Member
daniel_huy
Posts: 6
0 Kudos

Re: Google map API

Hi Garousi & Richard,

 

As promised, attached is a simplified version of DYNAMIC google map in Labview. Just start the application, click the "Load" to load the map and "Add Marker" to put a marker on the map. Along the way, you might want to take note how easily we could call JScript functions from LV.

 

The attached is only a very simplifed and limited program, which is just for giving an idea how we could accomplish this in LV. There are a lot more functions supported: moveMarker, moveCenter, changeMapBounds, drawPolyline, etc. that due to the intellectual policy of my company, I could not disclose everything. But once you got an idea how initialize() and addMarker() in my program work, the rest should be straight forward. You can find all supported Google Map Api functions following this link: http://code.google.com/apis/maps/documentation/javascript/tutorial.html

 

 Some important notes that you might want to take in consideration:

1. Currently we could not pass any data back from JScript to LV,

2. LV does not know when the called JScript function ends. For ex, addMarker() function is called, but due to slow internet connection, it takes some time to finish. LV does not wait until it finishes, and if you call the drawPolyline() while the first one is not done yet, drawPolyline() will override addMarker(). My workaround solution for now is putting some delay between each JScript functions' calls, and allow user to change this time interval during run-time.

3. Google Map for commercial use is not free, and it's kind of expensive.

 

So guys, please do give out any comment if you have any.

 

@Garousi: I really appreciate if you could share your code as well. So we could seek a best solution for all of us:smileyvery-happy:

 

Thanks so much !

 

Cheers,

Daniel

Member
Garousi
Posts: 41

Re: Google map API

Hi Daniel

 

please check this example , I think we don't have any limited here

 

.GMap.PNG 

 

 

 

I can't upload my zip file . I don't know why  :smileysad:

my sorce file is read :smileywink: please help me to upload file . 

M.Garousi
Member
Garousi
Posts: 41
0 Kudos

Re: Google map API

OK , you can download file in here : GMap.zip 

 

 

M.Garousi
Member
daniel_huy
Posts: 6
0 Kudos

Re: Google map API

Hi Garousi,

 

The picture looks great, I haven't taken a look at the code yet since Im not allowed to download in my company.

 

Btw, r u using the one that you sent me earlier, or google map JScript? And can u elaborate on the point "not limited"? I'm really concerned about that.

 

Thank you !

 

Cheers,
Daniel

Member
junk1400541
Posts: 3
0 Kudos

Re: Google map API

hi  i need  crate  a key  API  for google  but i dont know... i need  create a   server http ?? 

or how to create ?

thanxs and sry for my english jj

Member
Garousi
Posts: 41
0 Kudos

Re: Google map API

Hi Daniel

 

in this picture I use GMap.Net.WindowsForm.Dll , I checked  your source code . when I create many marker and update markers some of that markers can not be updated and give error .

please check my source code and I appreciate that if you send me solution .

 

Map.PNG

M.Garousi
Member
Garousi
Posts: 41
0 Kudos

Re: Google map API

Hi 

Please tell me , what's your means . you want use API key in web browser or use GMap.Net.WindowsForm.dll or use static map in picture control , ... 

M.Garousi
Member
junk1400541
Posts: 3
0 Kudos

Re: Google map API

HEY MF  I NEED YOU HELP  IN THE FIRST EXAMPLE  I NEED CREATE A  WEB SERVER (HTTP) ??  FOR  KEY  API  GOOGLE??

 

I DONT KNOW 

 

 

Member
Garousi
Posts: 41

Re: Google map API

Hi 

if you use my sorce code , you don't need web server or API key , you just use 2 dll that I put in this address : http://www.4shared.com/folder/uK6kv_HZ/_online.html

please check it . if you have any error please share here picture of error and put here picture of project explorer .

same as :

 

project.PNG

M.Garousi
Member
daniel_huy
Posts: 6
0 Kudos

Re: Google map API

Hi Garousi,

 

It's a lot of useful information you put up there. Great job !:smileyvery-happy:

 

Recently I ve been busy with other projects, so this has been put on hold for a while. Btw, have you ever put any thuoght on offline map? Internet connection might be an issue if the users are at remote site.

 

Cheers,

Daniel