NI Home > Community > NI Discussion Forums
Reply
Member
Paddi
Posts: 12
0 Kudos

Re: Google map API

Hi Garousi,Daniel

   I have to implement google map in lab view where in configuartion mode for user I have to display USA map when VI startups, then allow user to zoom in or out to particular location and select that to make pointer in my case it will be one group, when user selects such 2 to 3 groups and done the configuration. when user go in group view mode, he should be able to see earlier configured groups, and when clcik on those group pointers i wanted to pop up group information-------i need you advice on this, is this possible with the code you guys posted, I am using labview 8.5 please convert your code to 8.5 and post it agian.waiting for your reply  Thanks in advance

Member
Garousi
Posts: 41
0 Kudos

Re: Google map API

Hi

 

I try to convert my code to Labview 8.5 but  I see this Error .

 

Error.PNG

 

sorry

 

M.Garousi
Member
Paddi
Posts: 12
0 Kudos

Re: Google map API

Hi Garousi, thanks for you prompt reply. error seems like the labview crash.

anyway I have converted vis to 8.5. I am seeing in your code we can put marker to the location but that location is hardcoded with co-ordinates.and only one marker can created.

Is it possible here with java script, that we can get location latitude and longitude of mouse click and put the marker over the map by clicking. and also we can retrive those marker positions later on...??

Member
Garousi
Posts: 41
0 Kudos

Re: Google map API

Hi

 

in this pic I try to see that how we can add many marker or how we can update marker .

 

Gmap change marker.PNG

you can use the refrence in event case . 

now I trying to complete Daniel's code ( use google map with jscript ) when it finish I will share here .

M.Garousi
Member
Paddi
Posts: 12
0 Kudos

Re: Google map API

Yes, hopefully this can be the solution for multiple markers, but how we can pass selected location cordinates from map to the marker i am seeing here in code it is hardcoded in array...

Member
Paddi
Posts: 12
0 Kudos

Re: Google map API

Daniel,

 can you suggest how I can achieve below implementations

1) Add marker on map click event

2) get/retrieve earlier added marker information on map using the java script shared by you...

3) generate labview pop up when double click on balloon area

it weill be great if you share the sample code 

 

Pradeep

Member
daniel_huy
Posts: 6
0 Kudos

Re: Google map API

Hi Pradeep,

 

Sorry for not following up. I have been stucked with another project, so I have to put this mapping program on hold for a while.

 

  1. This function I havn't implemented in the past since it wasn't my project's requirement, but I'm pretty sure we could do that. Please follow this link: http://code.google.com/apis/maps/documentation/javascript/basics.html where you could find all sorts of functons supported by google map jscript API.
  2. If you want to get latitude/longitude of the markers after step 1 above, I regret saying that so far I haven't found a way to pass data from JScript to LV. What you can do as a workaround solution is writing that piece of data from JScript to a file, and let LV get the data from there.
  3. If you want some kind of floating box containing information of the selected baloon, this could be handled from the JScript side, given that you pass all necessary information from LV over. If you wan to get response from JScript back to LV and display pop-up, again we couldn't do that except writing into a file as a workaround solution.

I hope that could clarify your matters. And if you could improve the program further, please share with us as well.

 

Thank you !

 

Cheers,

Daniel

 

Member
9945105962
Posts: 3
0 Kudos

Re: Google map API

Hi M.Garousi,

 

This is a very usefull for my ground system. Thank you for uploading.

 

can you include the code to save the images/tiles in the cache/folder and use when internet connection is not available for offline browsing

 

Thank You.

 

SURAJ

Member
Garousi
Posts: 41
0 Kudos

Re: Google map API

Hi SURAJ

 

It is possible . but I don't complete it yet , I will share it when finished . 

M.Garousi
Member
9945105962
Posts: 3
0 Kudos

Re: Google map API

Hi M.Garousi,

 

Any update on the code to save maps in cache and use offline 

 

 

Thank You.

 

SURAJ