LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Map in CVI

Hi,
I would have a question about GPS.
I am currently working with one GPS, where I read geographic longitude, latitude, and altitude data.
And the question is, I would like to draw CVI in a graphical way using a map, for example, from Google and see the movement.
I want to add a map to CVI.
For example, as it appears in the appendix.
Anyone know how to do it?
It would help me a lot.

Thank you for your advice.

I wish you a nice day
(I apologize for my English)
Download All
0 Kudos
Message 1 of 4
(2,721 Views)

Hi MajklS -

A possibly easy solution for you would be to embed a Microsoft Web Browser ActiveX control in your panel. Then, you can program the ActiveX control to display a Google Maps page.

Check out the userint\activex\WebBrowser sample application on how to achieve this.

I hope this helps!

 

Kind regards,
- Johannes

0 Kudos
Message 2 of 4
(2,685 Views)
Hi Johannes,

thank you for your advice, i didn't know about this example.
I'll look at it and try to use it.
Thank you for help
Nice day
Regards
MajklS
0 Kudos
Message 3 of 4
(2,665 Views)
Hi,

so I managed to insert the map into the program. (See picture)

I have one more problem, the page is updated over and over again when plotting geographic location.
(I have a feature in Timer.)

Do you know how to treat it so that the location shows me when moving, but does not update the page? For example, as it is with a classic mobile GPS.

My listing looks like this:

 

GetObjHandleFromActiveXCtrl (panelSerial, SERIAL_WEBBROWSER, &webHandle);
Combo_InsertComboItem (panelSerial, SERIAL_ADRESA, 0,
"https://mapy.cz/zakladni");
SetCtrlVal (panelSerial, SERIAL_ADRESA, "https://mapy.cz/zakladni");

 

GetCtrlVal (panelSerial, SERIAL_LATITUDE, &latitude);
GetCtrlVal (panelSerial, SERIAL_LONGITUDE, &logtitude);
Fmt(mapa, "%s%f%s%f%s%f%s%f", "http://www.mapy.cz/zakladni?x=", logtitude, "&y=", latitude, "&z=17&source=coor&id=", logtitude, "%2C", latitude);

INET_IWebBrowser2Navigate (webHandle, NULL, mapa, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL);
//Install event handler for navigate complete event from web browser
INET_DWebBrwsrEvnts2RegOnNavigateComplete2 (webHandle, NavigateComplete, NULL, 1, NULL);

0 Kudos
Message 4 of 4
(2,661 Views)