03-11-2022 03:33 AM
Good Morning.
I am trying to plot or track a GPS coordinates in a open source map (in this case OpenStreetMap).
Everything goes fine but the map des not refresh to the latest position. Probably I am doing something wrong...
I found several interesting online maps like opensemap but when I try to insert it one error message appear
I think is because is a JavaScript map, do you know how I could integrate in a LabView???
Any help is wellcome!!
PD: I am very new with LabView and I have no idea about JavaScript!!!
Best!
03-11-2022 03:45 AM
Hi Manu,
@ManuParedes wrote:
Everything goes fine but the map des not refresh to the latest position. Probably I am doing something wrong...
I guess that's because of heavy overuse of local variables: use wires instead of locals!
03-11-2022 05:32 AM
I tried the dot net browser instead of the activx based iwebbrowser2 using the snippet from here
This will also result in a javascript related error - which is du to openstreetmaps.org
in some case, you can even navigate to the openastreetmaps javascript - that threw the error - and have a look on it, if you want to scare yourself e.g.
https://opentopomap.org/leaflet/leaflet.elevation/d3.min.js
Bur surprise... the donet browser can render an interactive(!) googlemaps map ...
I am pretty sure you meant to acquire a licence to use google maps commercially ...
03-11-2022 05:51 AM
Hi GerdW.
I trid to put direct cables and seems the same!
03-11-2022 08:40 AM - edited 03-11-2022 08:44 AM
@ManuParedes wrote:
Hi GerdW.
I trid to put direct cables and seems the same!
why don't you attach your .vi or post a real snippet?
so, I type in the url from your screenshot ... and it also works in the dotnet browser ... I am not going to use the deprecated active x browser
https://www.openstreetmap.org/?mlat=43.264721&mlon=-8.633333#map=16/43.264721/-8.633333
initialize the dotnet container before entering the while loop.
the initilized container will be responsive, also when the while loop is not executed.
the while loop is needed to refresh the container and to keep the .vi running ...
to refresh, you apply an event structure - e.g. linked to the url string control via "value changed?" - inside the while loop.
03-13-2022 06:20 PM
turns out - via trial and error - to refresh the dot net browser control inside the while loop - in terms to render a new url via a labview control and the Navigate Methode - the ResetImeMode must be executed.
like this:
11-17-2023 02:32 PM
....and it doesnt work anymore in 2023 - using the same .vi in labview 2020 64bit
I hate database driven web development
11-21-2023 03:10 AM - edited 11-21-2023 03:11 AM
@alexderjuengere wrote:
....and it doesnt work anymore in 2023 - using the same .vi in labview 2020 64bit
You likely will be happier by using WebView2 instead of WebBrowser! What's the difference you may ask?
Well, WebBrowser is the interface to the old Internet Explorer engine. Aside from being terribly insecure to browse our modern internet nowadays, you are also likely to run into all kind of Java Script and other errors rather sooner than later.
WebView2 interfaces to the the Edge engine, a modern and much safer method to go onto the internet.
Internet Explorer is as far as I know only a 32-bit application, so not very surprising that you can not interface to it from 64-bit LabVIEW.
11-23-2023 05:58 AM
@rolfk wrote:
You likely will be happier by using WebView2 instead of WebBrowser!
An it turns out: no javascript errors, when navigating via webview2 to
https://www.openstreetmap.org/?mlat=43.264721&mlon=-8.633333#map=16/43.264721/-8.633333
source:
downloading the nuget file via download package and extracting the contents with 7zip before running the vi. posted in
https://forums.ni.com/t5/LabVIEW/How-to-use-WebView2-control-in-LabView/m-p/4262663#M1241417
this works for me in ms windows 11 pro 23H2, MS Edge WebView2 Runtime Version 114.0.1823.79 (Offizielles Build) (64-Bit),
, and dot net 6.0:
Most of this stuff was already installed on that computer e.g. via windows updates.
--------------------
I also tested on a Windows 10 computer, but with no success which might be due to a different version of Edge, the EDGE WebView2 Runtime or the dot net sdk.
Others had similar issues to e.g. here
11-23-2023 11:37 AM
@alexderjuengere wrote:
I also tested on a Windows 10 computer, but with no success which might be due to a different version of Edge, the EDGE WebView2 Runtime or the dot net sdk.
Others had similar issues to e.g. here
and it works with windows 10 22H2, .net sdk 6.0,