Select to view content in your preferred language

Web AppBuilder app and external GPS

5240
7
11-22-2016 07:36 AM
YigalMuntner
Esri Contributor

Is there a way to get Web AppBuilder app run against an external GPS (usb) on a Win7 laptop? The browser can't read the GPS location, while applications like ArcPad can.

Tags (3)
0 Kudos
7 Replies
PascualBenito
Regular Contributor

When I last researched this topic about a year and a half ago, my assessment was that this may not be possible due to how Windows handles allowing access to  external GPS devices via an application running in the browser as opposed to a non-browser based application (like ArcGIS Collector or an app developed in ArcGIS SDK) running natively on the same device. My understanding was that in order to access an external GPS device, the software must make use of the native Windows Location API.  There are then two components of uncertainty when trying to use your external GPS device: 1) is your GPS device recognized by the new Windows Location API,  and 2) does the browser you are using to access your WAB app make use of the native Windows Location API, or will it default to some other geolocation API that will instead return the location of IP Address or something like this.  

It would be interesting to hear if anyone else has concrete experience they can share on trying this out.  

0 Kudos
YigalMuntner
Esri Contributor

We have managed to do this using GpsGate. This product let the browser connect to an external GPS device (USB GPS in our case).

Using sample code from GpsGate, we have replaced the 'My Location' widget in WAB for Developers, so whenever we create a new WAB application, it immediately works with the external GPS. The only thing is that while Google Chrome requires working with https to get geolocation, GpsGate works with http (but works ok).

Yigal 

PascualBenito
Regular Contributor

Hi Yigal, thanks for sharing this info about the success you found in using

gpsgate. With regard to the issue of gpsgate not supporting https, does

this mean that your WAB apps and map services also can not use https and

everything must run via http?

(In our case we are using ArcGIS Portal for Server with Windows

authentication and this requires every component to use SSL, such that

everything has to use https....which may limit our options )

Pascual Benito, PhD

Associate Engineer

Northgate Environmental Management, Inc.

428 13th Street, 4th Floor, Oakland, CA 94612

phone (510) 839-0688, ext. 225; mobile (510) 381-0304; fax (510) 839-4350

www.ngem.com

Certified Bay Area Green Business

CONFIDENTIALITY NOTICE:

This e-mail and its attachments from Northgate Environmental Management,

Inc. contain information that is confidential and/or privileged and is

intended for the sole use of the individual or entity named above. Any

disclosure, copying, distribution, dissemination, or use of this

information by any other person than the intended recipient is prohibited.

If you have received this e-mail in error, please notify the sender via

e-mail or by calling us at 510-839-0688

0 Kudos
YigalMuntner
Esri Contributor

Hello Pascual,

I attach a PDF which explains the way we did it.

I hope it helps.

Yigal

PascualBenito
Regular Contributor

Thanks for the detailed summary document and links to the replacement

widget code. Very helpful info!

Pascual Benito, PhD

Associate Engineer

Northgate Environmental Management, Inc.

428 13th Street, 4th Floor, Oakland, CA 94612

phone (510) 839-0688, ext. 225; mobile (510) 381-0304; fax (510) 839-4350

www.ngem.com

Certified Bay Area Green Business

CONFIDENTIALITY NOTICE:

This e-mail and its attachments from Northgate Environmental Management,

Inc. contain information that is confidential and/or privileged and is

intended for the sole use of the individual or entity named above. Any

disclosure, copying, distribution, dissemination, or use of this

information by any other person than the intended recipient is prohibited.

If you have received this e-mail in error, please notify the sender via

e-mail or by calling us at 510-839-0688

0 Kudos
TheKenerson
Regular Contributor

I am having a real hard time finding this custom widget. It's too bad because it sounds like exactly what i need. Can anyone point me in the right direction?

0 Kudos
PhilippNagel
Emerging Contributor

I solved this issue for our internal use by making a small web server in Python that reads the GPS location, and returns it upon request from the browser. Firefox allows you to change the geolocation service URL, which this relies on. Other browsers don't. This way works with any other mapping or other app that uses HTML5 geolocation.

You can see my code here: city-of-waseca / pygpsgeolocate · GitLab 

It's ugly and probably not very reliable, but works well enough for our purposes. This way does not require a widget, just the regular "Locate" button in any map, though in WAB, that is a out of the box widget. It also requires your site to run on HTTPS.

0 Kudos