lsodea
Posts: 18
Joined: Thu Dec 07, 2006 10:24 pm

SerialPort.htm

Thu Dec 07, 2006 10:35 pm

I am trying to get the SerialPort.htm to work. I have a gps device hooked into the USB port on my laptop. The GPSGate is set to read com port 5 and out put to com port 8. I can hyperterminal into com port 8 and get gps results so I know that is working.

When I launch the SerialPort.htm window I get no data even in the Status text box. It seems that NmeaParser is never calling the OnComStatus event.

Not sure what I am missing.

Any help would be greatly appreciated.

Also, any other javascript examples would be great.

Thanks
LSO

I am trying to get the javascript sample SerialPort.htm to work. It seems that the NmeaParser never calls the OnComStatus event.

I have my gps device (hooked into a USB port on the laptop) and COM8 is set up as the output com port.

I can hyperterminal into Com8 and get feedback, so I know the GPS and Com port 8 are working.

Any suggestions would be very helpful. Also, if there are any more javascript samples that would also be helpful.

Thanks

User avatar
johan
GpsGate
Posts: 15423
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: SerialPort.htm

Fri Dec 08, 2006 10:13 am

To get the GPS data directly from GpsGate, you can take a look at this sample:
http://franson.com/gpsgate/toolbar/apidemo/api-demo.html

Let me know if there are parts of the sample you do not understand.

Regards,
Johan

Franson Support

lsodea
Posts: 18
Joined: Thu Dec 07, 2006 10:24 pm

RE: SerialPort.htm

Fri Dec 08, 2006 6:02 pm

Is there anyway that you can send me the js files so that I can look at those?

I'm not sure what is not working on my end, but as I mentioned before, the sample SerialPort.htm that comes with the SDK does not even act like the NmeaParser is getting initialized.

Is there any other documentation for using javascript? I know there is a lot for .Net but, unfortunately, we are not using that -- have no license.

I ran the sample that you sent, but I don't know how to connect it to my gps unit and gpsgate on my laptop.

Thanks
Linda

Andreas2
Posts: 108
Joined: Sun Feb 13, 2005 3:19 pm

RE: SerialPort.htm

Fri Dec 08, 2006 7:39 pm

Hi,

The sample above uses the "Toolbar API", which allows you to receive GPS data without actually dealing with NMEA. You simply
* Include http://update.gpsgate.com/script/gateapi.js in your HTML-file. If update.gpsgate.com for some reason is not accessible, the Toolbar API will load a local version instead.
* Add event listeners using the "ggEventManager.addEventListener" function. There are events available for e.g. gps fix, satellite data and more.

The sample posted by Johan is completely open and you simply need to select "View Source" to view the code. The first page contains code to add event listeners. That page also includes a set of javascript-files that contains additional code e.g. for satelite-bars, satellite-map etc. You can access these at:

http://franson.com/gpsgate/toolbar/apidemo/SatelliteBarPanel.js
http://franson.com/gpsgate/toolbar/apidemo/SatelliteMap.js
http://franson.com/gpsgate/toolbar/apidemo/Compass.js
http://franson.com/gpsgate/toolbar/apidemo/GpsInfoPanel.js

(right click and select download)

You can also see all the objects available in Toolbar API by downloading:
http://update.gpsgate.com/script/gateapi.js

Regards,
Andreas Nilsson
Franson Support

lsodea
Posts: 18
Joined: Thu Dec 07, 2006 10:24 pm

RE: SerialPort.htm

Fri Dec 08, 2006 8:20 pm

Hi Andreas,

Thanks for the links to the js files. I had been looking at the source of the initial web page.

I'm still not "getting it". Maybe, I am over thinking or something.

Would you please send me a short example of how I can get an answer back from gpsgate on whether the gpsgate is installed correctly. I see the isGpsGateInstalled = function() in the api but I'm not sure how to call it, plus I don't want to use the GoogleMapsPlugInXP.GateApiInfo. I need to use the gpsgate activeX object.

Basically, I need to pull the coordinates from the attached gps unit using gpsgate (again, hyperterminal is working). Then I need to pass those coordinates to an ArcIms web site.

Thanks for your help
Linda

Return to “GpsGate for Developers”