LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GPS coordinates and their distance between points in WebBrowser

Hi, please advise.

I have GPS coordinates, which I display in CVI in WebBrowser (Picture 1)

aoj.png

But I have two coordinates and I would like to see the distance between these points on the map as soon as I press the "Search" button. (picture 2)

vzdalenost.png

Don't you know how I should program it in CVI?

(Note: I would also not like to see information on the map, legends, searches, etc. just a clear map).

 

 

Thank you very much for your help 🙂

Project Here:

0 Kudos
Message 1 of 8
(1,728 Views)

That's clearly a Google Maps API problem. It has nothing to do with LabWindows/CVI but simply requires you to add the right parameter options to the WebURL (provided the Google Maps WebAPI supports such parameters). I have no idea if it does but this is something you need to take up with the Google Maps support forum or whoever provides support for this.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 8
(1,680 Views)

I understand LabWindows isn't completely built for that, but I wanted to give it a try. It would help me in working with the location and direction of the azimuth.
One specific point will appear to me, but two is already a problem. Radians are also used in WebURL, so I'm currently trying to see if it will work.

 

If it was only possible to add coordinates to a specific WebURL and the browser would add the rest itself, it could work.

Thank you for your willingness

 

 

0 Kudos
Message 3 of 8
(1,677 Views)

@MajklS wrote:

I understand LabWindows isn't completely built for that, but I wanted to give it a try. It would help me in working with the location and direction of the azimuth.
One specific point will appear to me, but two is already a problem. Radians are also used in WebURL, so I'm currently trying to see if it will work.

 

If it was only possible to add coordinates to a specific WebURL and the browser would add the rest itself, it could work.


It's not that LabWindows/CVI isn't built for that. No software package out there is out of the box. This is a feature that the Google Maps API would have to support and WebAPIs rely on the fact that parameters are usually passed to the WebAPI through the URL,  either as path elements (an URL can encode parameters in the URL path itself sometimes) or as real URL Parameters (that are those pesky elements at the end of an URL that come after the ? (questionmark). Google Maps chose yet another option to add the coordinates with a @ (ampersand) sign as an extra path element.

 

If the API doesn't support a certain features that you would like to have you can spring high and low, and use .Net, Java, C, LabVIEW or whatever but it will simply not be possible to do. It's entirely independent of the used programming environment.

 

Maybe the Google Maps API supports adding two coordinate pairs after 2 parameter elements starting with an @ sign? I don't know and chances are not so great but it could be possible. It is what the Google developer implemented on their Maps server infrastructure that determines what you can do with it. And it should be documented in the Google Maps WebAPI documentation if and what can be done. This forum is definitely not the best place to ask as you are just hoping for the very unlikely chance that there is a LabWindows/CVI developer who has used WebAPI for Google Maps already (not so unlikely) and wanted to do the same thing you want to do (very unlikely). A dedicated Google Maps support forum has a much higher chance to give you an answer IF it can be done at all. They are of course very unlikely to know what LabWindows/CVI is, but once someone can point out an example in C# or Java or whatever that can do it, it is fairly easy to apply that to your LabWindows/CVI program.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 8
(1,667 Views)

I would suggest you to use Maps Static API from Google that should permit you to place two markers on the map by preparing an appropriate URL, but it's not for free: as you can see in the overview you must enable a plan for maps usage. Be prepared for this before starting to consider using these APIs.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 8
(1,661 Views)

Thanks for the clarification, I was just wondering if anyone had tried to apply it or encountered the same problem.

0 Kudos
Message 6 of 8
(1,659 Views)

Thank you, I've come across this before, I'll try to read something about it.

0 Kudos
Message 7 of 8
(1,658 Views)

Not sure how to prepare a suitable URL?

I won't do it in WebBroswer, but I'll open the browser via a button, but I have to enter the exact URL with points A and B.

0 Kudos
Message 8 of 8
(1,553 Views)